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

Quick fix: error in build.jl #106

Closed amellnik closed 8 years ago

amellnik commented 8 years ago

I went to do some benchmarks today but I'm seeing a new error building on master:

=========================[ ERROR: ParallelAccelerator ]=========================

LoadError: MethodError: `find_library` has no method matching find_library(::ASCIIString)
you may have intended to import Base.find_library
while loading C:\Users\amellnik\.julia\v0.4\ParallelAccelerator\deps\build.jl, in expression starting on line 71

================================================================================

================================[ BUILD ERRORS ]================================

WARNING: ParallelAccelerator had build errors.

 - packages with build errors remain installed in C:\Users\amellnik\.julia\v0.4
 - build the package(s) and all dependencies with `Pkg.build("ParallelAccelerator")`
 - build a single package by running its `deps/build.jl` script

================================================================================

I think the names of the libraries here on lines 71 and 72 need to be enclosed in arrays rather than as single strings. I can submit a pull request at lunch if no one beats me to it. Best -A

amellnik commented 8 years ago

Titling any issue "quick fix" is just asking for trouble. After correcting the issue about it gives me an error on a system without OpenBLAS on the path:

blas_test.cpp:1:19: fatal error: cblas.h: No such file or directory
 #include <cblas.h>
                   ^
compilation terminated.

I'm adding it now to see if it will build with it included.

DrTodd13 commented 8 years ago

The problem is that I tested this with a very recent version and it looks like you are testing with 0.4 where the find_library interface has changed. In 0.5, it looks like find_library(ASCIIString) and in 0.4 it expects an array. I see in 0.5 they added a convenience function for just one library check. I will check-in a fix for this.

DrTodd13 commented 8 years ago

Maybe I should capture the output so you don't see that cblas error but it isn't really an error, just a way of detecting that the system compiler doesn't support blas.

amellnik commented 8 years ago

Ah good catch. Is ParallelAccelerator moving to require 0.5+ or will it continue to support 0.4?

I spoke too soon about OpenBLAS -- I do have it on this system and the folder with cblas.h is on my path but I'm still seeing that error.

DrTodd13 commented 8 years ago

We don't have plans to drop 0.4 support in the immediate future.

We search for OpenBLAS support by looking for libopenblas64_ in the library search path. We test for blas support in the compiler itself by creating a cpp file that includes cblas.h and then trying to compile that. So, OpenBLAS and the cblas.h error are independent.

DrTodd13 commented 8 years ago

Closed with 7f7b4bb..6d24eed.