MantisBT - CMake
View Issue Details
0012925CMakeCMakepublic2012-02-01 03:072012-12-03 07:46
andreasvoegel 
Alexey Ozeritsky 
lowfeaturealways
closedfixed 
Apple MacOS X10.4.10
 
CMake 2.8.8CMake 2.8.8 
0012925: FindBLAS.cmake and FindLAPACK.cmake Do Not Find Sequential MKL 10.3
Intel MKL version 10.3 ships with a sequential version. FindBLAS and FindLAPACK only have support for the parallel versions, however. A fix seems as easy as adding an extra BLA_VENDOR for the the sequential version of MKL.
No tags attached.
related to 0013394closed Alexey Ozeritsky FindLAPACK does not find MKL 10.3 when using gcc 4.x 
Issue History
2012-02-01 03:07andreasvoegelNew Issue
2012-02-01 03:14Alexey OzeritskyAssigned To => Alexey Ozeritsky
2012-02-01 03:14Alexey OzeritskyStatusnew => assigned
2012-02-05 09:09Alexey OzeritskyNote Added: 0028476
2012-04-05 18:05Maxime BoissonneaultNote Added: 0029083
2012-04-05 18:15Maxime BoissonneaultNote Edited: 0029083bug_revision_view_page.php?bugnote_id=29083#r593
2012-04-05 19:28Maxime BoissonneaultNote Added: 0029084
2012-04-06 04:08Alexey OzeritskyNote Added: 0029085
2012-04-06 08:10Maxime BoissonneaultNote Added: 0029087
2012-04-06 08:11Maxime BoissonneaultNote Edited: 0029087bug_revision_view_page.php?bugnote_id=29087#r595
2012-04-06 08:12Maxime BoissonneaultNote Edited: 0029087bug_revision_view_page.php?bugnote_id=29087#r596
2012-04-19 16:09David ColeTarget Version => CMake 2.8.8
2012-04-19 16:09David ColeStatusassigned => resolved
2012-04-19 16:09David ColeFixed in Version => CMake 2.8.8
2012-04-19 16:09David ColeResolutionopen => fixed
2012-07-11 13:09Brad KingRelationship addedrelated to 0013394
2012-12-03 07:46David ColeNote Added: 0031806
2012-12-03 07:46David ColeStatusresolved => closed

Notes
(0028476)
Alexey Ozeritsky   
2012-02-05 09:09   
I've added new vendor (Intel10_lp64_seq)
commit:
http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=e69e816d21732b092b33ff7d36b7cc478350344e [^]
(0029083)
Maxime Boissonneault   
2012-04-05 18:05   
(edited on: 2012-04-05 18:15)
Thanks for the fix. It does work for me, however, I get a warning now (I've put FindBLAS and FindLAPACK in my CMakeModules folder to replace the ones that come with the cmake installation (2.8.7) on our server). I have tested it with all combinations of MKL 10.3.2 and MKL 10.2.2.025 with the compilers Intel 11.1.059, Intel 12.0.4, gcc 4.4.2 and gcc 4.6.1.


Here is the output :
CMake Warning (dev) at CMakeModules/FindBLAS.cmake:546 (if):
  given arguments:

    "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_intel_lp64.so" "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_intel_thread.so" "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_core.so" "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/compiler/lib/intel64/libiomp5.so"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:23 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.

-- A library with BLAS API found.
CMake Warning (dev) at CMakeModules/FindBLAS.cmake:546 (if):
  given arguments:

    "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_intel_lp64.so" "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_intel_thread.so" "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_core.so" "/software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/compiler/lib/intel64/libiomp5.so"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeModules/FindLAPACK.cmake:142 (find_package)
  CMakeLists.txt:24 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.

(0029084)
Maxime Boissonneault   
2012-04-05 19:28   
It however seems that this new FindBLAS does not work on Mac OS X with the Accelerate framework.
(0029085)
Alexey Ozeritsky   
2012-04-06 04:08   
Try latest version

http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindBLAS.cmake;h=9eadfd125de9a6135bcad1cff103f15ae5415723;hb=HEAD [^]
(0029087)
Maxime Boissonneault   
2012-04-06 08:10   
(edited on: 2012-04-06 08:12)
Ok, it now works with :
Mac :
- gcc4.2.1 + Accelerate
Linux (CentOS) :
- Intel 12.0.4 + mkl/10.2.2.025 or mkl/10.3.4
- Intel 11.1.059 + mkl/10.2.2.025 or mkl/10.3.4
- gcc 4.6.1 + mkl/10.2.2.025
- gcc 4.4.2 + mkl/10.2.2.025

However, with gcc 4.6.1 or gcc 4.4.2 + mkl/10.3.4, it fails at finding LAPACK.
It looks like with gcc, it does not detect the sequential version of MKL, but rather first the multi-threaded version, and then it does not include the -fopenmp flag.

I get the following CMakeError.log message :

 30 /software/tools/cmake/2.8.7/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
 31 /software/compilers/gcc/4.6.1/bin/gcc -DCHECK_FUNCTION_EXISTS=cheev_ CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o -o cmTryCompileExec -rdynamic -lmkl_gf_lp64 -lmkl_intel_lp64 - lmkl_gnu_thread -lmkl_core -lpthread -lm
 32 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_end'
 33 /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'
 34 /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'
 35 /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'
 36 /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'
 37 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_ordered_start'
 38 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_start'
 39 /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'
 40 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_start'
 41 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_single_start'
 42 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_get_nested'
 43 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_in_parallel'
 44 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_loop_end'
 45 /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'
 46 /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'
 47 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `omp_set_nested'
 48 /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'
 49 /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'
 50 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_critical_start'
 51 /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'
 52 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_ordered_end'
 53 /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'
 54 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_parallel_end'
 55 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_sections_next'
 56 /software/intel/parallel_studio_xe_2011_update2/composerxe-2011.4.191/mkl/lib/intel64/libmkl_gnu_thread.so: undefined reference to `GOMP_barrier'
 57 /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'
 58 /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'
 59 /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'
 60 /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'
 61 collect2: ld a retourné 1 code d'état d'exécution
 62 gmake[1]: *** [cmTryCompileExec] Erreur 1
 63 gmake[1]: quittant le répertoire « /home/mboisson/squack-code/CMakeFiles/CMakeTmp »
 64 gmake: *** [cmTryCompileExec/fast] Erreur 2

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