Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Using broadcast fails with OptFramework error #122

Open
zerocewl opened this issue Sep 16, 2016 · 1 comment
Open

Using broadcast fails with OptFramework error #122

zerocewl opened this issue Sep 16, 2016 · 1 comment

Comments

@zerocewl
Copy link

zerocewl commented Sep 16, 2016

Hello,
I tried to use @acc function br(N) b=collect(1:N); broadcast(+,b,b')end

but this error comes up

julia> br(1000)
C:\Users\hiddenUserName\AppData\Local\Temp\jul556A.tmp/cgen_output1.cpp:2:19: fatal er
ror: cblas.h: No such file or directory
 #include <cblas.h>
                   ^
compilation terminated.
OptFramework failed to optimize function ##br#13544 in optimization pass Paralle
lAccelerator.Driver.toCGen with error ErrorException("failed process: Process(`'
C:\\Users\\hiddenUserName\\.julia\\v0.4\\WinRPM\\deps\\usr\\x86_64-w64-mingw32\\sys-ro
ot\\mingw\\bin\\g++' -O3 -fopenmp -std=c++11 -g -fpic -I 'C:\\Users\\hiddenUserName\\.
julia\\v0.4\\WinRPM\\deps\\usr\\x86_64-w64-mingw32\\sys-root\\mingw\\include' -c
 -o 'C:\\Users\\hiddenUserName\\AppData\\Local\\Temp\\jul556A.tmp/cgen_output1.o' 'C:\
\Users\\hiddenUserName\\AppData\\Local\\Temp\\jul556A.tmp/cgen_output1.cpp'`, ProcessE
xited(1)) [1]")
1000x1000 Array{Int64,2}:

Any suggestions for this error? Maybe any openblas path or variable is missing?

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

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

backend_compiler = USE_MINGW
openblas_lib = "libopenblas64_"
mkl_lib = ""
sys_blas = 0
@DrTodd13
Copy link
Member

My Windows config.jl looks similar to yours but I'm unable to replicate this issue for some other reasons. However, I can at least confirm that even though libopenblas.dll is present that cblas.h is not. I'm not an openblas expert but I do believe it uses cblas.h so maybe this is some Windows Julia thing about it being missing.

I did try your example with Julia 0.5 with PROSPECT_MODE=threads and it works. With 0.5 and PROSPECT C mode, there is an issue where we can't compile the collect function that is explicitly called here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants