Chapel: Error in executing chapel programs on compiler.

Created on 18 Mar 2018  路  4Comments  路  Source: chapel-lang/chapel


I am new to Chapel and have been trying to install it with LLVM support. The make and make check commands work successfully but when I try to generate LLVM IR from a sample chapel program, it gives an error saying fatal error: 'cblas.h' file not found.

I would be happy if someone guided me on how to tackle this situation here.

Summary of Problem

Steps to Reproduce

Compile command(s):

```source util/setchplenv.bash
export CHPL_LLVM=llvm
make -j24
make check
chpl loop-opt-examples.chpl --llvm --llvm-print-ir=test10d --llvm-print-ir-stage=full > ir.ll

**Output of the last command**

:2:10: fatal error: 'cblas.h' file not found

include "cblas.h"

     ^~~~~~~~~

1 error generated.
error: error running clang during code generation
```

Configuration Information

  • Output of chpl --version:
    chpl Version 1.16.0 Copyright (c) 2004-2017, Cray Inc. (See LICENSE file for more details)
  • Output of $CHPL_HOME/util/printchplenv --anonymize:

    CHPL_TARGET_PLATFORM: linux64
    CHPL_TARGET_COMPILER: gnu
    CHPL_TARGET_ARCH: native
    CHPL_LOCALE_MODEL: flat
    CHPL_COMM: none
    CHPL_TASKS: qthreads
    CHPL_LAUNCHER: none
    CHPL_TIMERS: generic
    CHPL_UNWIND: none
    CHPL_MEM: jemalloc
    CHPL_MAKE: make
    CHPL_ATOMICS: intrinsics
    CHPL_GMP: gmp
    CHPL_HWLOC: hwloc
    CHPL_REGEXP: re2
    CHPL_WIDE_POINTERS: struct
    CHPL_AUX_FILESYS: none
    
  • Back-end compiler and version, e.g. gcc --version or clang --version:
    gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Libraries / Modules Won't fix / Ain't broke user issue

Most helpful comment

Hi all,
Thanks for the help. I have now successfully installed libblas library and now chapel is able to generate LLVM-IR properly.

Regards
Sahil Yerawar

All 4 comments

Hi @ysahil97 -- I'm not an expert on our LLVM support but am checking to see if I can reproduce this. If I'm not able to make progress, we may have better luck on Monday when those more knowledgeable in LLVM and BLAS are in the office (@dmk42 @ben-albrecht @mppf).

OK, I was able to reproduce. I'm guessing the problem is that you're using a module that requires BLAS to be installed (like LinearAlgebra whose requirements are noted here), but I don't have BLAS installed myself, so don't know if that's the only problem or not offhand.

I see you are on Ubuntu. Try this to get cblas.h.

apt-get install libblas-dev

Hi all,
Thanks for the help. I have now successfully installed libblas library and now chapel is able to generate LLVM-IR properly.

Regards
Sahil Yerawar

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vasslitvinov picture vasslitvinov  路  3Comments

buddha314 picture buddha314  路  3Comments

bradcray picture bradcray  路  3Comments

ankingcodes picture ankingcodes  路  3Comments

ben-albrecht picture ben-albrecht  路  3Comments