View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013509 | CMake | CMake | public | 2012-09-03 07:09 | 2016-06-10 14:31 | ||||
Reporter | Bogdan Cristea | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | PC x86_64 Athlon | OS | openSUSE | OS Version | 12.1 | ||||
Product Version | CMake 2.8.6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0013509: FindBLAS.cmake cannot find acml5.1.0 | ||||||||
Description | ACML5.1.0 was installed in the default location (/opt). Using cmake .. does not find ACML library. When using cmake .. -DBLA_VENDOR=ACML the following error message is generated: -- A library with BLAS API not found. Please specify library location. │CMake Error at cmake/Modules/FindBLAS.cmake:295 (list): │ list index: 0 out of range (-0, 18446744073709551615) │Call Stack (most recent call first): │ cmake/Modules/FindLAPACK.cmake:140 (find_package) │ CMakeLists.txt:29 (find_package) | ||||||||
Steps To Reproduce | - Install cmake 2.8.6 - Install ACML5.1.0 for Linux - Create a CMakeLists.txt file in order to detect blas library: find_package(BLAS) - Create a folder build below the folder containing CMakeLists.txt - Change folder to build and use 'cmake ..' | ||||||||
Additional Information | FindLAPACK is also affected by this bug. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | FindBLAS.cmake.patch [^] (1,332 bytes) 2012-09-03 07:09 [Show Content]
FindBLAS.cmake.newpatch [^] (1,307 bytes) 2012-09-03 15:25 FindBLAS.cmake.new2.patch [^] (2,043 bytes) 2012-09-08 17:22 [Show Content] FindBLAS.cmake.new3.patch [^] (1,355 bytes) 2012-09-09 15:29 [Show Content] CMakeError.log [^] (6,483 bytes) 2012-09-10 10:11 CMakeError_atlas.log [^] (1,711 bytes) 2012-09-10 14:34 | ||||||||
Relationships | |
Relationships |
Notes | |
(0030823) Rolf Eike Beer (developer) 2012-09-03 13:59 |
Just 2 stylistic nitpicks: -for the first change, does "if (_libraries_work)" work? It should do the same as your construct -directly below your second change is another "if (_ACML_ROOT)", please put your code for this in the existing if |
(0030825) Bogdan Cristea (reporter) 2012-09-03 15:29 |
Corrected patch according to your observations. For some reason I am unable to delete the first patch (FindBLAS.cmake.patch) |
(0030960) Bogdan Cristea (reporter) 2012-09-08 17:21 |
I have made tests using MKL library (11.0) installed on openSUSE 12.1 x86_64. I needed to change again the patch in order to comply with MKL. Also the environment variables were not handled correctly. Currently my mkl installation is detected with the following commands: export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64 cmake .. -DBLA_VENDOR=Intel10_64lp ACML detection works too. |
(0030970) Alexey Ozeritsky (reporter) 2012-09-09 15:06 |
That will not work - set(_libdir ENV LD_LIBRARY_PATH) + set(_libdir $ENV{LD_LIBRARY_PATH}) Try to set LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:/usr/local/lib and you will see why. According to manual: find_library( <VAR> name | NAMES name1 [name2 ...] [HINTS path1 [path2 ... ENV var]] [PATHS path1 [path2 ... ENV var]] So ENV is ok |
(0030971) Alexey Ozeritsky (reporter) 2012-09-09 15:16 |
patch v3 attached |
(0030975) Bogdan Cristea (reporter) 2012-09-10 08:56 edited on: 2012-09-10 08:58 |
Your approach is not correct, one needs to use set(_libdir $ENV{LD_LIBRARY_PATH}) in order to get LD_LIBRARY_PATH variable content (see also http://www.cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables [^]) When several paths separated by ':' are in LD_LIBRARY_PATH this approach does not work indeed. |
(0030976) Alexey Ozeritsky (reporter) 2012-09-10 09:30 |
I don't want to get LD_LIBRARY_PATH variable content. I want to pass _libdir to find_library as is. find_library will get and parse LD_LIBRARY_PATH variable content. |
(0030977) Bogdan Cristea (reporter) 2012-09-10 09:45 edited on: 2012-09-10 09:53 |
I see your point, indeed MKL is detected with the following commands: export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64/ cmake .. -DBLA_VENDOR=Intel10_64lp |
(0030978) Alexey Ozeritsky (reporter) 2012-09-10 10:03 |
Did you set LD_LIBRARY_PATH before making the changes ? Can you attach CMakeFiles/CMakeError.log ? |
(0030979) Bogdan Cristea (reporter) 2012-09-10 10:10 |
Sure, please note that the first pass does not detect MKL: -- Found Threads: TRUE -- Looking for sgemm_ -- Looking for sgemm_ - not found -- Looking for sgemm_ -- Looking for sgemm_ - found -- A library with BLAS API found. -- A library with BLAS API found. -- Looking for cheev_ -- Looking for cheev_ - found -- A library with LAPACK API found. -- Configuring done |
(0030980) Bogdan Cristea (reporter) 2012-09-10 10:17 |
For ATLAS detection too, some corrections would be needed (library name has changed from atlas to satlas or tatlas) diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake index c984193..9e69259 100644 --- a/cmake/Modules/FindBLAS.cmake +++ b/cmake/Modules/FindBLAS.cmake @@ -79,11 +79,11 @@ set(${LIBRARIES}) set(_combined_name) if (NOT _libdir) if (WIN32) - set(_libdir $ENV{LIB}) + set(_libdir ENV LIB) elseif (APPLE) - set(_libdir $ENV{DYLD_LIBRARY_PATH}) + set(_libdir ENV DYLD_LIBRARY_PATH) else () - set(_libdir $ENV{LD_LIBRARY_PATH}) + set(_libdir ENV LD_LIBRARY_PATH) endif () endif () @@ -172,7 +172,7 @@ if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") BLAS dgemm "" - "f77blas;atlas" + "f77blas;satlas;tatlas;atlas;gfortran" "" ) endif() |
(0030981) Alexey Ozeritsky (reporter) 2012-09-10 10:19 |
That is cmake standard output. I need CMakeFiles/CMakeError.log your building directory. |
(0030982) Bogdan Cristea (reporter) 2012-09-10 10:22 |
I have attached that file. |
(0030983) Alexey Ozeritsky (reporter) 2012-09-10 10:54 edited on: 2012-09-10 10:54 |
I see the following -L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lpthread -lm So, LD_LIBRARY_PATH works and the problem is somewhere else. Did you try to use mklvars.sh script ? /opt/intel/path-to-mkl/bin/mklvars.sh cmake .. -DBLA_VENDOR=Intel10_64lp |
(0030984) Bogdan Cristea (reporter) 2012-09-10 13:41 |
It seems that there is a misunderstanding: - I have checked with the patch you propose and I am able to detect MKL libraries (by setting first LD_LIBRARY_PATH) - I have not used any other script - Please check also ATLAS library detection, it seems that the library name has changed. |
(0030985) Alexey Ozeritsky (reporter) 2012-09-10 14:05 |
ATLAS library detection works for me. Please provide - ATLAS version - rpm -ql your-atlas-package | grep .so - CMakeFiles/CMakeError.log |
(0030986) Bogdan Cristea (reporter) 2012-09-10 14:38 |
ATLAS version: 3.10.0 (installed from openSUSE 12.1 repos) /usr/lib64/atlas/libsatlas.so.3.0 /usr/lib64/atlas/libtatlas.so.3.0 see attached file CMakeError_atlas.log. Note that the detected library is the static version. This error file is obtained by setting first LD_LIBRARY_PATH to /usr/lib64/atlas |
(0033030) Brad King (manager) 2013-05-13 13:52 |
Moving to backlog awaiting a new volunteer module maintainer: http://www.cmake.org/Wiki/CMake:Module_Maintainers [^] |
(0042111) Kitware Robot (administrator) 2016-06-10 14:28 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-09-03 07:09 | Bogdan Cristea | New Issue | |
2012-09-03 07:09 | Bogdan Cristea | File Added: FindBLAS.cmake.patch | |
2012-09-03 13:59 | Rolf Eike Beer | Note Added: 0030823 | |
2012-09-03 15:25 | Bogdan Cristea | File Added: FindBLAS.cmake.newpatch | |
2012-09-03 15:29 | Bogdan Cristea | Note Added: 0030825 | |
2012-09-03 16:52 | Rolf Eike Beer | Assigned To | => Alexey Ozeritsky |
2012-09-03 16:52 | Rolf Eike Beer | Status | new => assigned |
2012-09-04 03:24 | Alexey Ozeritsky | Status | assigned => acknowledged |
2012-09-08 17:21 | Bogdan Cristea | Note Added: 0030960 | |
2012-09-08 17:22 | Bogdan Cristea | File Added: FindBLAS.cmake.new2.patch | |
2012-09-09 15:06 | Alexey Ozeritsky | Note Added: 0030970 | |
2012-09-09 15:16 | Alexey Ozeritsky | File Added: FindBLAS.cmake.new3.patch | |
2012-09-09 15:16 | Alexey Ozeritsky | Note Added: 0030971 | |
2012-09-09 15:18 | Alexey Ozeritsky | File Deleted: FindBLAS.cmake.new3.patch | |
2012-09-09 15:18 | Alexey Ozeritsky | File Added: FindBLAS.cmake.new3.patch | |
2012-09-09 15:28 | Alexey Ozeritsky | File Deleted: FindBLAS.cmake.new3.patch | |
2012-09-09 15:29 | Alexey Ozeritsky | File Added: FindBLAS.cmake.new3.patch | |
2012-09-10 08:56 | Bogdan Cristea | Note Added: 0030975 | |
2012-09-10 08:58 | Bogdan Cristea | Note Edited: 0030975 | |
2012-09-10 09:30 | Alexey Ozeritsky | Note Added: 0030976 | |
2012-09-10 09:45 | Bogdan Cristea | Note Added: 0030977 | |
2012-09-10 09:46 | Bogdan Cristea | Note Edited: 0030977 | |
2012-09-10 09:53 | Bogdan Cristea | Note Edited: 0030977 | |
2012-09-10 10:03 | Alexey Ozeritsky | Note Added: 0030978 | |
2012-09-10 10:10 | Bogdan Cristea | Note Added: 0030979 | |
2012-09-10 10:11 | Bogdan Cristea | File Added: CMakeError.log | |
2012-09-10 10:17 | Bogdan Cristea | Note Added: 0030980 | |
2012-09-10 10:19 | Alexey Ozeritsky | Note Added: 0030981 | |
2012-09-10 10:22 | Bogdan Cristea | Note Added: 0030982 | |
2012-09-10 10:54 | Alexey Ozeritsky | Note Added: 0030983 | |
2012-09-10 10:54 | Alexey Ozeritsky | Note Edited: 0030983 | |
2012-09-10 13:41 | Bogdan Cristea | Note Added: 0030984 | |
2012-09-10 14:05 | Alexey Ozeritsky | Note Added: 0030985 | |
2012-09-10 14:34 | Bogdan Cristea | File Added: CMakeError_atlas.log | |
2012-09-10 14:38 | Bogdan Cristea | Note Added: 0030986 | |
2013-05-13 13:52 | Brad King | Assigned To | Alexey Ozeritsky => |
2013-05-13 13:52 | Brad King | Status | acknowledged => backlog |
2013-05-13 13:52 | Brad King | Note Added: 0033030 | |
2016-06-10 14:28 | Kitware Robot | Note Added: 0042111 | |
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved |
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |