i'm still trying to compile a self compiled MUMPS (V5) with Elmer using CMake.
I'm able to compile MUMPS V5 and use it in a standalone program. But how to tell Elmer CMAKE that it shloud use this MUMPS instead of the one founded in my /usr/path ?
I must say that the compilation using the debian Mumps is ok, and the execution of our specific solver too!
ELMER + Mumps (from debian) on 1 processor with our method ==> Checked
My goal is ELMER + Mumps (V5 from sources) on 1 processor with our method
So my question is : what should i do in order to compile Elmer and a self compiled MUMPS version like the last one V5.0 for exemple?
I'm missing some options in CMake, or something else....
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - COMPILE with classic debian MUMPS library - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Code: Select all
CMD="$CMAKE $ELMERSRC -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=$IDIR \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
-DWITH_Mumps:BOOL=TRUE \
-DWITH_MPI:BOOL=TRUE"
Execution of my bifurcation analysis method is ok:-- ------------------------------------------------
-- BLAS library: /usr/lib/libf77blas.so;/usr/lib/libatlas.so
-- LAPACK library: /usr/lib/liblapack.so;/usr/lib/libf77blas.so;/usr/lib/libatlas.so
-- ------------------------------------------------
-- Fortran compiler: /usr/bin/gfortran
-- Fortran flags: -O3
-- ------------------------------------------------
-- C compiler: /usr/bin/gcc
-- C flags: -O3
-- ------------------------------------------------
-- CXX compiler: /usr/bin/g++
-- CXX flags: -O3
-- ------------------------------------------------
-- MPI Fortran: TRUE
-- MPI Fortran compiler: /usr/local/bin/mpif90
-- MPI Fortran flags:
-- MPI Fortran include dir: /usr/local/include;/usr/local/lib
-- MPI Fortran libraries: /usr/local/lib/libmpi_f90.so;/usr/local/lib/libmpi_f77.so;/usr/local/lib/libmpi.so;/usr/local/lib/libopen-rte.so;/usr/local/lib/libopen-pal.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libnsl.so;/usr/lib/x86_64-linux-gnu/libutil.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.so
-- MPI Fortran link flags: -Wl,--export-dynamic
-- ------------------------------------------------
-- MPI C: TRUE
-- MPI C compiler: /usr/local/bin/mpicc
-- MPI C flags:
-- MPI C include dir: /usr/local/include
-- MPI C libraries: /usr/local/lib/libmpi.so;/usr/local/lib/libopen-rte.so;/usr/local/lib/libopen-pal.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libnsl.so;/usr/lib/x86_64-linux-gnu/libutil.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.so
-- MPI C flags: -Wl,--export-dynamic
-- ------------------------------------------------
-- Mumps: TRUE
-- Mumps include: /usr/include
-- Mumps libraries: /usr/lib/libdmumps.so;/usr/lib/libmumps_common.so;/usr/lib/libpord.so;/usr/lib/libscalapack-openmpi.so;/usr/lib/libblacs-openmpi.so;/usr/lib/libmetis.so;/usr/lib/libparmetis.so
-- ------------------------------------------------
and it works perfectly.MAIN: Library version: 7.0 (Rev: 799ecc8)
MAIN: MUMPS library linked in.
But as i want to use new functionalities of MUMPS (v5.0), i'm able to compile MUMPS, but as soon as i want to "link" it with Elmer, i don't know how to do it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - trying to COMPILE with self compiled MUMPS library V5 - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
extract from COMPILE_WITH_CMAKE.sh
Code: Select all
# -- -- -- -- -- -- -- -- -- -- MUMPS -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# - - - - - PATH - - - - - - -
MUMPSROOT="/lab/limatb/app/MUMPS/MUMPS_5.0.0_FILES_PAR"
# - - - - - INCLUDE - - - - - - -
MUMPSINC="$MUMPSROOT/include"
# cmumps_c.h cmumps_struc.h dmumps_root.h mumps_compat.h smumps_c.h smumps_struc.h zmumps_root.h
# cmumps_root.h dmumps_c.h dmumps_struc.h mumps_c_types.h smumps_root.h zmumps_c.h zmumps_struc.h
# - - - - - LIB - - - - - - -
# Based on SET(Mumps_LIBRARIES ${MUMPS_D_LIB} ${MUMPS_COMMON_LIB} ${MUMPS_PORD_LIB})
MUMPSLIB="$MUMPSROOT/lib"
MUMPS_D_LIB="$MUMPSLIB/libdmumps.a"
MUMPS_COMMON_LIB="$MUMPSLIB/libmumps_common.a"
MUMPS_PORD_LIB="$MUMPSLIB/libpord.a"
Mumps_LIBRARIES=$MUMPS_D_LIB;$MUMPS_COMMON_LIB;$MUMPS_PORD_LIB
# -- -- -- -- -- -- -- -- -- -- END MUMPS -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# -- -- -- -- -- -- -- -- -- -- MPI -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# CHOICES :
# + MPI Mumps ( MUMPS SEQ ) : WITH_MPI:BOOL=TRUE + MPI_Fortran_LIBRARIES MPI_Fortran_INCLUDE_PATH not so easy to compile with...
# + MPI : WITH_MPI:BOOL=TRUE (ACTUAL TEST)
# + MPI ELMER STUBs ?? : WITH_MPI:BOOL=TRUE and ???
# -- -- -- -- -- -- -- -- -- -- END MPI -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
CMD="$CMAKE $ELMERSRC -DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=$IDIR \
-DCMAKE_C_COMPILER=/usr/bin/gcc \
-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
-DWITH_Mumps:BOOL=TRUE \
-DMumps_INCLUDE_DIR=$MUMPSINC \
-DMumps_LIBRARIES=$Mumps_LIBRARIES \
-DWITH_MPI:BOOL=TRUE "
Code: Select all
/usr/bin/ld: /lab/limatb/app/MUMPS/MUMPS_5.0.0_FILES_PAR/lib/libdmumps.a(dmumps_driver.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
Code: Select all
-ldl /lab/limatb/app/MUMPS/MUMPS_5.0.0_FILES_PAR/lib/libdmumps.a /lab/limatb/app/MUMPS/MUMPS_5.0.0_FILES_PAR/lib/libmumps_common.a /lab/limatb/app/MUMPS/MUMPS_5.0.0_FILES_PAR/lib/libpord.a /usr/local/lib/libmpi_f90.so /usr/local/lib/libmpi_f77.so /usr/local/lib/libmpi.so /usr/local/lib/libopen-rte.so /usr/local/lib/libopen-pal.so /usr/lib/x86_64-linux-gnu/libdl.so /usr/lib/x86_64-linux-gnu/libnsl.so /usr/lib/x86_64-linux-gnu/libutil.so /usr/lib/x86_64-linux-gnu/libm.so /usr/lib/x86_64-linux-gnu/libdl.so
...
I tried many things, but as i'm not so good at Cmake, and in the subtil way of link and includes, i'm really interested if anyone knows how to perform this compilation.
Thanks in advance for your attention on this.