IntelLabs / ParallelAccelerator.jl

The ParallelAccelerator package, part of the High Performance Scripting project at Intel Labs
BSD 2-Clause "Simplified" License
294 stars 32 forks source link

Building Pkg throws fatal error: cblas.h: No such file or directory (on Windows 7) #121

Closed zerocewl closed 7 years ago

zerocewl commented 7 years ago

Edit: The original issue was splitted.

Hello, Pkg.build("ParallelAccelerator") throws an error: blas_test.cpp:1:19: fatal error: cblas.h: No such file or directory but i'm not sure if this is a "real" error or only a hint.

I used CompilerTools and ParallelAccelerator packages via Pkg.add and Pkg.checkout with the same result.

julia> Pkg.build("ParallelAccelerator")
INFO: Building WinRPM
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repos
itories/windows:/mingw:/win32/openSUSE_13.2/repodata/repomd.xml
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repos
itories/windows:/mingw:/win64/openSUSE_13.2/repodata/repomd.xml
INFO: Building ParallelAccelerator
ParallelAccelerator: build.jl begin.
ParallelAccelerator: Building j2c-array shared library
Installing ParallelAccelerator for Windows.
Build directory is C:\Users\HiddenUserName\.julia\v0.4\ParallelAccelerator\deps
Installing gcc-c++.
INFO: Nothing to do
INFO: Multiple package candidates found for mingw64-unistd-pthread-devel, pickin
g newest.
INFO: Nothing to do
INFO: Multiple package candidates found for mingw64-unistd-pthread-devel, pickin
g newest.
INFO: Nothing to do
Installed gcc is version
g++ (GCC) 6.2.0
Copyright (C) 2016 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.

Building libj2carray.dll.
bcpp not found and will not be used.
blas_test.cpp:1:19: fatal error: cblas.h: No such file or directory
 #include <cblas.h>
                   ^
compilation terminated.
ParallelAccelerator: build.jl done.

My config.jl in ParallelAccelerator\deps\generated looks like that:

backend_compiler = USE_MINGW
openblas_lib = "libopenblas64_"
mkl_lib = ""
sys_blas = 0

I'm using Win 7 with Julia 0.4.6:

 julia> versioninfo()
Julia Version 0.4.6
Commit 2e358ce (2016-06-19 17:16 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

The same error seems to happens here: https://github.com/IntelLabs/ParallelAccelerator.jl/issues/115

DrTodd13 commented 7 years ago

Can you paste the contents of your deps/generated/config.jl file? The blas_test.cpp error you see while building is not really an error but our way of testing if your system compiler supports blas. We really should suppress the output of this since it isn't something to be really concerned about but people see "error" and think something has gone wrong.

zerocewl commented 7 years ago

EDIT: Splitted issue...

i think the content of the config.jl file is already in the above text, but i can paste it again ;-)

backend_compiler = USE_MINGW
openblas_lib = "libopenblas64_"
mkl_lib = ""
sys_blas = 0

The same "error" comes up if the broadcast function should be optimized... Should i use a manual install of openBlas instead?

DrTodd13 commented 7 years ago

ParallelAccelerator can't use the Julia version of OpenBlas. If you want high-speed gemm then install OpenBlas separately and rebuild ParallelAccelerator.