[Gmsh] Configuration problem with Intel MKL

Mikhail Artemiev artemiev.mikhail at ngs.ru
Sat Apr 21 10:37:08 CEST 2012


Hi all!
Configuration problem was solved:
I changed CMakeLists.txt in the following way

set(MKL_LIBS_REQUIRED mkl_gf_lp64
                       mkl_gnu_thread
                       mkl_core
                       pthread)
# I knew that mkl_* libraries are there
set(EXTRA_PATH /common/intel/mkl/lib/intel64)
find_all_libraries(LAPACK_LIBRARIES_1
                    MKL_LIBS_REQUIRED
                    ${EXTRA_PATH} "")
set(MKL_LIBS_REQUIRED iomp5 guide)
# I knew that these libs are there
set(EXTRA_PATH
     /common/intel/Compiler/11.1/072/lib/intel64)
find_all_libraries(LAPACK_LIBRARIES_2
                    MKL_LIBS_REQUIRED
                    ${EXTRA_PATH} "")
set(LAPACK_LIBRARIES)
list(APPEND LAPACK_LIBRARIES ${LAPACK_LIBRARIES_1})
list(APPEND LAPACK_LIBRARIES ${LAPACK_LIBRARIES_2})

Configuration process succeeded as well as a compilation
process.
Linking process had an error:

Linking CXX executable gmsh
/common/intel/Compiler/11.1/072/lib/intel64/libiomp5.so:
undefined reference to `pthread_atfork'

I found that the probable solution of this problem was to
change '-lpthread' in Makefile to '-pthread'.
I did it in the file CMakeFiles/gmsh.dir/link.txt and all
was good! :)

Hope this will help somebody.

Mikhail Artemiev