MantisBT - CMake
View Issue Details
0013394CMakeCMakepublic2012-07-11 13:062012-12-03 07:46
Maxime Boissonneault 
Alexey Ozeritsky 
highmajoralways
closedfixed 
LinuxCentOS
CMake 2.8.8 
 
0013394: FindLAPACK does not find MKL 10.3 when using gcc 4.x
Issue was reported in issue 0012925, which was marked as fixed, despite the last entry reporting of this issue a bug.

Here is my path environment :
[mboisson@colosse1 squack-code]$ env | grep PATH
CPLUS_INCLUDE_PATH=/software/tools/gtest/1.6.0_gcc/include:/software/misc-libs/gsl/1.15_gcc/include:/software/compilers/gcc/4.6.1/include/c++/4.6.1
MANPATH=/software/misc-libs/gsl/1.15_gcc/share/man:/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/man/en_US:/software/compilers/gcc/4.6.1/share/man:/software/tools/cmake/2.8.8/man:/clumeq/Modules/3.2.7/share/man:/usr/local/ge6.2u5/man:/opt/torque/man:/opt/moab/share/man::
LMOD_DEFAULT_MODULEPATH=/clumeq/Modules/lmod/modulefiles_mboisson/Core/Compilers:/clumeq/Modules/lmod/modulefiles_mboisson/Core/blas-libs:/clumeq/Modules/lmod/modulefiles_mboisson/Core/Libs:/clumeq/Modules/lmod/modulefiles_mboisson/Core/Apps:/clumeq/Modules/lmod/modulefiles_mboisson/Core/Tools
MODULEPATH_ROOT=/clumeq/Modules/lmod/modulefiles_mboisson
LIBRARY_PATH=/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/compiler/lib/intel64:/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64
LD_LIBRARY_PATH=/software/tools/gtest/1.6.0_gcc/lib:/software/misc-libs/gsl/1.15_gcc/lib:/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/compiler/lib/intel64:/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64:/software/misc-libs/mpc/0.9/lib:/software/misc-libs/mpfr/3.0.1/lib:/software/misc-libs/gmp/5.0.2/lib:/software/compilers/gcc/4.6.1/lib:/software/compilers/gcc/4.6.1/lib64:/opt/torque/lib:/opt/moab/lib::
CPATH=/software/tools/gtest/1.6.0_gcc/include:/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/include
NLSPATH=/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/locale/%l_%t/%N
PATH=/software/misc-libs/gsl/1.15_gcc/bin:/software/compilers/gcc/4.6.1/bin:/software/tools/cmake/2.8.8/bin:/software/apps/lua/5.1.4/bin:/clumeq/bin:/usr/local/ge6.2u5/bin/lx24-amd64:/opt/torque/bin:/opt/torque/sbin:/opt/moab/bin:/opt/moab/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/mboisson/bin:/home/mboisson/Scripts
C_INCLUDE_PATH=/software/tools/gtest/1.6.0_gcc/include:/software/misc-libs/gsl/1.15_gcc/include:/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/include:/software/misc-libs/mpc/0.9/include:/software/misc-libs/mpfr/3.0.1/include:/software/misc-libs/gmp/5.0.2/include:/software/compilers/gcc/4.6.1/include
LUA_PATH=/software/apps/lua/5.1.4/share/lua/5.1/?.lua
MODULEPATH=/clumeq/Modules/lmod/modulefiles_mboisson/Core/Compilers:/clumeq/Modules/lmod/modulefiles_mboisson/Core/blas-libs:/clumeq/Modules/lmod/modulefiles_mboisson/Core/Libs:/clumeq/Modules/lmod/modulefiles_mboisson/Core/Apps:/clumeq/Modules/lmod/modulefiles_mboisson/Core/Tools:/clumeq/Modules/lmod/modulefiles_mboisson/Compilers/gcc/Generic/Libs:/clumeq/Modules/lmod/modulefiles_mboisson/Compilers/gcc/Generic/Apps:/clumeq/Modules/lmod/modulefiles_mboisson/Compilers/gcc/Generic/Tools:/clumeq/Modules/lmod/modulefiles_mboisson/Compilers/gcc/4.6.1/Libs:/clumeq/Modules/lmod/modulefiles_mboisson/Compilers/gcc/4.6.1/Apps:/clumeq/Modules/lmod/modulefiles_mboisson/Compilers/gcc/4.6.1/Tools
LUA_CPATH=/software/apps/lua/5.1.4/lib/lua/5.1/?.so
CPP_INCLUDE_PATH=/software/compilers/gcc/4.6.1/include/c++/4.6.1
CXX_INCLUDE_PATH=/software/compilers/gcc/4.6.1/include/c++/4.6.1
INFOPATH=/software/misc-libs/gsl/1.15_gcc/share/info:/software/misc-libs/mpc/0.9/share/info:/software/misc-libs/mpfr/3.0.1/share/info:/software/misc-libs/gmp/5.0.2/share/info:/software/compilers/gcc/4.6.1/share/info
ACLOCAL_PATH=/software/misc-libs/gsl/1.15_gcc/share/aclocal

Here is the output of CMake :
[mboisson@colosse1 squack-code]$ cmake .
-- CMAKE_INSTALL_PREFIX = /usr/local
-- A library with BLAS API found.
-- A library with BLAS API found.
CMake Error at CMakeModules/FindLAPACK.cmake:324 (message):
  A required library with LAPACK API not found. Please specify library
  location.
Call Stack (most recent call first):
  CMakeLists.txt:24 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!


Here is the last entry of the CMakeError.log :
Determining if the function cheev_ exists failed with the following output:
Change Dir: /home/mboisson/squack-code/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec660771748/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec660771748.dir/build.make CMakeFiles/cmTryCompileExec660771748.dir/build
gmake[1]: entrant dans le répertoire « /home/mboisson/squack-code/CMakeFiles/CMakeTmp »
/software/tools/cmake/2.8.8/bin/cmake -E cmake_progress_report /home/mboisson/squack-code/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec660771748.dir/CheckFunctionExists.c.o
/software/compilers/gcc/4.6.1/bin/gcc -DCHECK_FUNCTION_EXISTS=cheev_ -o CMakeFiles/cmTryCompileExec660771748.dir/CheckFunctionExists.c.o -c /software/tools/cmake/2.8.8/share/cmake-2.8/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec660771748
/software/tools/cmake/2.8.8/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec660771748.dir/link.txt --verbose=1
/software/compilers/gcc/4.6.1/bin/gcc -DCHECK_FUNCTION_EXISTS=cheev_ CMakeFiles/cmTryCompileExec660771748.dir/CheckFunctionExists.c.o -o cmTryCompileExec660771748 -rdynamic -lmkl_gf_lp64 -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_end'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_thread_num'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_end_nowait'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_num_threads'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_num_procs'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_ordered_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_name_end'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_single_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_nested'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_in_parallel'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_end'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_max_threads'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_end_nowait'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_set_nested'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_static_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_dynamic_next'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_name_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_ordered_end'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_dynamic_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_end'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_next'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_barrier'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_sections_start'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_dynamic_next'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_ordered_static_next'
/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_dynamic_start'
collect2: ld a retourné 1 code d'état d'exécution
gmake[1]: *** [cmTryCompileExec660771748] Erreur 1
gmake[1]: quittant le répertoire « /home/mboisson/squack-code/CMakeFiles/CMakeTmp »
gmake: *** [cmTryCompileExec660771748/fast] Erreur 2
No tags attached.
related to 0012925closed Alexey Ozeritsky FindBLAS.cmake and FindLAPACK.cmake Do Not Find Sequential MKL 10.3 
patch find-lapack-mkl.patch (1,123) 2012-07-17 02:54
https://public.kitware.com/Bug/file/4393/find-lapack-mkl.patch
Issue History
2012-07-11 13:06Maxime BoissonneaultNew Issue
2012-07-11 13:09Brad KingRelationship addedrelated to 0012925
2012-07-11 13:09Brad KingAssigned To => Alexey Ozeritsky
2012-07-11 13:09Brad KingStatusnew => assigned
2012-07-12 06:10Janick MartinezNote Added: 0030043
2012-07-17 02:42Alexey OzeritskyStatusassigned => acknowledged
2012-07-17 02:54Alexey OzeritskyFile Added: find-lapack-mkl.patch
2012-07-17 02:55Alexey OzeritskyNote Added: 0030058
2012-07-17 11:28Maxime BoissonneaultNote Added: 0030059
2012-07-26 06:34Alexey OzeritskyStatusacknowledged => resolved
2012-07-26 06:34Alexey OzeritskyResolutionopen => fixed
2012-12-03 07:46David ColeNote Added: 0031801
2012-12-03 07:46David ColeStatusresolved => closed

Notes
(0030043)
Janick Martinez   
2012-07-12 06:10   
I think the problem is the missing -lgomp flag to the linker. It would be nice if the FIND* scripts would add them (I have already added -lgomp to the linker flags in the corresponding pkg-config).
(0030058)
Alexey Ozeritsky   
2012-07-17 02:55   
Can you test the attached patch? Thanks.
(0030059)
Maxime Boissonneault   
2012-07-17 11:28   
It does seem to work with the following compilers :
- gcc 4.4.2
- gcc 4.6.1
- intel 11.1.059
- intel 12.0.0.20110427

Thanks.
(0031801)
David Cole   
2012-12-03 07:46   
Closing resolved issues that have not been updated in more than 4 months.