chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 419 forks source link

use LinearAlgebra fails on OS X #6799

Closed buddha314 closed 7 years ago

buddha314 commented 7 years ago

Summary of Problem

On OS X with openblas installed via brew. Pulled main branch of Chapel from github and did a clean installation.

Steps to Reproduce

Source Code:

use LinearAlgebra;

Compile command: chpl -o linalg linalg_101.chpl

Error

In file included from /var/folders/g5/4zwyfk513hd94tjs1fm5mdq00000gn/T//chpl-buddha-9685.deleteme/_main.c:2:
/var/folders/g5/4zwyfk513hd94tjs1fm5mdq00000gn/T//chpl-buddha-9685.deleteme/chpl__header.h:5:10: fatal error: 'cblas.h' file not found
#include "cblas.h"
         ^
1 error generated.
make: *** [/var/folders/g5/4zwyfk513hd94tjs1fm5mdq00000gn/T//chpl-buddha-9685.deleteme/linalg.tmp] Error 1
error: compiling generated source
buddha314 commented 7 years ago

My fault again, apparently. I'll need to look into the Chapel build system.

chpl -I/usr/local/Cellar/openblas/0.2.19/include \
  -L/usr/local/Cellar/openblas/0.2.19/lib -o d6matrix linalg_101.chpl
ben-albrecht commented 7 years ago

Hey @buddha314 - glad you figured this out in the documentation. I hope that we can include a BLAS/LAPACK distribution in the Chapel installation some day, as noted in #5753.

buddha314 commented 7 years ago

I have to research make or other build systems with Chapel. Also, will the sparse matrix stuff happen in the LinearAlgebra package or be an pass-through to BLAS/LAPACK?

ben-albrecht commented 7 years ago

make is what most Chapel developers use today. The Linear Algebra test directory includes an example Makefile for MKL. It used to be for OpenBLAS, so you could check the git history to get the version you need.