how to compile Elmer using a self-compiled MUMPS?

Discussion about building and installing Elmer
Post Reply
YannGuevel
Posts: 30
Joined: 26 May 2014, 12:37
Antispam: Yes

how to compile Elmer using a self-compiled MUMPS?

Post by YannGuevel »

Hello,

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"
-- ------------------------------------------------
-- 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
-- ------------------------------------------------
Execution of my bifurcation analysis method is ok:
MAIN: Library version: 7.0 (Rev: 799ecc8)
MAIN: MUMPS library linked in.
and it works perfectly.

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 "
  
It gives some error when trying to Linking Fortran shared library libelmersolver.so

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
I noticed that the command to Linking libelmersolver.so have multiple inclusion of the same options. This one appears twice in the same command

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.
YannGuevel
Posts: 30
Joined: 26 May 2014, 12:37
Antispam: Yes

Re: how to compile Elmer using a self-compiled MUMPS?

Post by YannGuevel »

Little up.
-DWITH_Mumps:BOOL=TRUE \
-DMumps_INCLUDE_DIR=A\
-DMumps_LIBRARIES=B \
I'm pretty dure that A is the include dir of Mumps.
Is B a list of MUMPS libraries, or a path, or ....*
Maybe another options is nedded?

When i compile it seems that the link options have redondant information about the librairies...

Anyone had done those kind of Elmer linking whith self compiled libraries?
Thanks again if you have , even a small, information on this.
dekoder87
Posts: 31
Joined: 22 Oct 2014, 19:42
Antispam: Yes
Location: United Kingdom

Re: how to compile Elmer using a self-compiled MUMPS?

Post by dekoder87 »

Hi,

I was linking self compiled HYPRE in example.
First of all I uninstalled HYPRE from repository.
Then I compiled HYPRE using Cmake-gui and I set HYPRE_INSTALL_PREFIX to /usr so I know where my new compiled HYPRE was installed.
If Cmake cannot find your library you can set location of Include and library to right folders in my example it was:

Hypre_INCLUDE_DIR /usr/include
Hypre_LIBRARIES /usr/lib/libHYPRE.a

for MUMPS installed from repository in OpenSUSE 13.2 I had error message:

Code: Select all

Finding Mumps
CMake Error at cmake/Modules/FindMumps.cmake:149 (MESSAGE):
  Mumps library not found.
Call Stack (most recent call first):
  CMakeLists.txt:127 (FIND_PACKAGE)
So I had to set up location of MUMPS manualy.
In YaST2 (Package manager in OpenSUSE) I have searched for MUMPS
Then I selected package mumps and I clicked list of files:

Code: Select all

mumps - A MUltifrontal Massively Parallel Sparse direct Solver
 
/usr/lib64/libcmumps_seq.so.4.9.2
/usr/lib64/libdmumps_seq.so.4.9.2
/usr/lib64/libmpiseq_seq.so.4.9.2
/usr/lib64/libmumps_common_seq.so.4.9.2
/usr/lib64/libpord_seq.so.4.9.2
/usr/lib64/libsmumps_seq.so.4.9.2
/usr/lib64/libzmumps_seq.so.4.9.2
/usr/share/doc/packages/mumps
/usr/share/doc/packages/mumps/ChangeLog
/usr/share/doc/packages/mumps/LICENSE
/usr/share/doc/packages/mumps/MATLAB
/usr/share/doc/packages/mumps/MATLAB/INSTALL
/usr/share/doc/packages/mumps/MATLAB/INSTALL/Makefile.INTEL
/usr/share/doc/packages/mumps/MATLAB/INSTALL/Makefile.PGF90
/usr/share/doc/packages/mumps/MATLAB/INSTALL/Makefile.SGI32
/usr/share/doc/packages/mumps/MATLAB/INSTALL/Makefile.SUN
/usr/share/doc/packages/mumps/MATLAB/INSTALL/Makefile.g95
/usr/share/doc/packages/mumps/MATLAB/Makefile
/usr/share/doc/packages/mumps/MATLAB/README
/usr/share/doc/packages/mumps/MATLAB/dmumps.m
/usr/share/doc/packages/mumps/MATLAB/initmumps.m
/usr/share/doc/packages/mumps/MATLAB/lhr01.mat
/usr/share/doc/packages/mumps/MATLAB/make.inc
/usr/share/doc/packages/mumps/MATLAB/multiplerhs_example.m
/usr/share/doc/packages/mumps/MATLAB/mumps_help.m
/usr/share/doc/packages/mumps/MATLAB/mumpsmex.c
/usr/share/doc/packages/mumps/MATLAB/printmumpsstat.m
/usr/share/doc/packages/mumps/MATLAB/schur_example.m
/usr/share/doc/packages/mumps/MATLAB/simple_example.m
/usr/share/doc/packages/mumps/MATLAB/sparserhs_example.m
/usr/share/doc/packages/mumps/MATLAB/zmumps.m
/usr/share/doc/packages/mumps/MATLAB/zsimple_example.m
/usr/share/doc/packages/mumps/README
/usr/share/doc/packages/mumps/SCILAB
/usr/share/doc/packages/mumps/SCILAB/Help
/usr/share/doc/packages/mumps/SCILAB/Help/help_dmumps.html
/usr/share/doc/packages/mumps/SCILAB/Help/help_dmumps.xml
/usr/share/doc/packages/mumps/SCILAB/Help/help_initmumps.html
/usr/share/doc/packages/mumps/SCILAB/Help/help_initmumps.xml
/usr/share/doc/packages/mumps/SCILAB/Help/help_zmumps.html
/usr/share/doc/packages/mumps/SCILAB/Help/help_zmumps.xml
/usr/share/doc/packages/mumps/SCILAB/Help/manrev.dtd
/usr/share/doc/packages/mumps/SCILAB/Help/whatis.htm
/usr/share/doc/packages/mumps/SCILAB/README
/usr/share/doc/packages/mumps/SCILAB/builder.sce
/usr/share/doc/packages/mumps/SCILAB/dmumps.sci
/usr/share/doc/packages/mumps/SCILAB/examples
/usr/share/doc/packages/mumps/SCILAB/examples/cmplx_example.sce
/usr/share/doc/packages/mumps/SCILAB/examples/double_example.sce
/usr/share/doc/packages/mumps/SCILAB/examples/ex.sci
/usr/share/doc/packages/mumps/SCILAB/examples/ex_rhs.sci
/usr/share/doc/packages/mumps/SCILAB/examples/schur_example.sce
/usr/share/doc/packages/mumps/SCILAB/examples/sparseRHS_example.sce
/usr/share/doc/packages/mumps/SCILAB/initmumps.sci
/usr/share/doc/packages/mumps/SCILAB/intmumpsc.c
/usr/share/doc/packages/mumps/SCILAB/loader.sce
/usr/share/doc/packages/mumps/SCILAB/zmumps.sci
/usr/share/doc/packages/mumps/VERSION
/usr/share/doc/packages/mumps/doc
/usr/share/doc/packages/mumps/doc/userguide_4.9.2.pdf
/usr/share/doc/packages/mumps/doc/userguide_4.9.2.ps
As you can see all libraries were installed in /usr/lib64
so I set in Cmake-gui
MUMPS_COMMON_LIB to /usr/lib64
MUMPS_D_LIB to /usr/lib64
MUMPS_PORD_LIB to /usr/lib64

then in YaST2 I selected mumps-devel and I found in similar way that mumps include directory is /usr/include/mumps
So again I set in Cmake-gui

Mumps_include_DIR to /usr/include/mumps

I hope that this information will help you.

Regards,

Jacek
dekoder87
Posts: 31
Joined: 22 Oct 2014, 19:42
Antispam: Yes
Location: United Kingdom

Re: how to compile Elmer using a self-compiled MUMPS?

Post by dekoder87 »

small update

when configuring using cmake gui you need to add full path to library instead providing only path to directory where library is contained i.ex.:

instead MUMPS_COMMON_LIB to /usr/lib64 you need to specify MUMPS_COMMON_LIB to /usr/lib64/libmumps_common_seq.so (You can try also using libmumps_common_seq.so.version number or libmumps_common_seq.a)

same for other mumps libraries. I cannot try to use compiled MUMPS to verify it because I am waiting for email with source code of MUMPS

location of include files still need to be specified as directory.

Jacek
YannGuevel
Posts: 30
Joined: 26 May 2014, 12:37
Antispam: Yes

Re: how to compile Elmer using a self-compiled MUMPS?

Post by YannGuevel »

Thanks for the info, i'll try this ASAP, and let you know.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: how to compile Elmer using a self-compiled MUMPS?

Post by raback »

Hi Yann,

I got a hint that while compiling MUMPS you should include -fPIC flag for eventual succesfull linking.

-Peter
YannGuevel
Posts: 30
Joined: 26 May 2014, 12:37
Antispam: Yes

Re: how to compile Elmer using a self-compiled MUMPS?

Post by YannGuevel »

Thanks a lot for the trick, i'll try this asap.
YannGuevel
Posts: 30
Joined: 26 May 2014, 12:37
Antispam: Yes

Re: how to compile Elmer using a self-compiled MUMPS?

Post by YannGuevel »

Hi,

actually the -fPIC for MUMPS_5.0 compilation looks like removing some errors during compilation.

I create a toolchain in order to make MUMPs_5.0 being found with my self-compile MUMPS_5.0:

Code: Select all

SET(MUMPSROOT /lab/limatb/app/MUMPS/MUMPS_5.0.0_FILES_fPIC_OpenBLAS)
#   -   -   -   -   -  MUMPS INCLUDE -   -   -   -   -   -   -
# Mumps_INCLUDE_DIR
SET(MUMPSINCLUDE "${MUMPSROOT}/include")
SET(Mumps_INCLUDE_DIR ${MUMPSINCLUDE})
#I tried this after reading a post in this forum while not using CMake.
ADD_DEFINITIONS(-I${MUMPSINCLUDE})
# V Lib
ADD_DEFINITIONS(-ldmumps)
ADD_DEFINITIONS(-lmumps_common)
ADD_DEFINITIONS(-lpord)


#   -   -   -   -   -  MUMPS LIB -   -   -   -   -   -   - 
SET(MUMPSLIB  "${MUMPSROOT}/lib")
ADD_DEFINITIONS(-L${MUMPSLIB})

# V Lib
ADD_DEFINITIONS(-ldmumps)
ADD_DEFINITIONS(-lmumps_common)
ADD_DEFINITIONS(-lpord)

# Hard lilnk to *.a
SET(MUMPS_D_LIB ${MUMPSLIB}/libdmumps.a)
SET(MUMPS_COMMON_LIB ${MUMPSLIB}/libmumps_common.a)
SET(MUMPS_PORD_LIB ${MUMPSLIB}/libpord.a)
SET(Mumps_LIBRARIES ${MUMPS_D_LIB} ${MUMPS_COMMON_LIB} ${MUMPS_PORD_LIB} ${SCOTCH_LIBRAIRIES} ${SCALAPACK_LIBRARIES})
SET(MUMPSLIBS_FOUND TRUE)

MARK_AS_ADVANCED(Mumps_LIBRARIES)
SET(Mumps_FOUND TRUE)

MARK_AS_ADVANCED(
  MUMPSINCLUDE
  MUMPSLIB
  Mumps_INCLUDE_DIR 
  Mumps_LIBRARIES 
  MUMPS_COMMON_LIB
  MUMPS_D_LIB 
  MUMPS_PORD_LIB 
  SCALAPACK_LIBRARIES)

Using this i'm able to get an ElemerSolver executable with no error at all, but Still no self-copmiled Mumps_5.0 inside...

ldd command with the "TryingtoGetMumpsV5" ElmerSolver version
ldd ElmerSolver
linux-vdso.so.1 => (0x00007ffe2e136000)
libelmersolver.so => /lab/limatb/app/ELMER/VERSIONs/ELMERDEB7MUMPSV5OpenBLAS/bin/../lib/elmersolver/libelmersolver.so (0x00007f3f4d2de000)
libmatc.so => /lab/limatb/app/ELMER/VERSIONs/ELMERDEB7MUMPSV5OpenBLAS/bin/../lib/elmersolver/libmatc.so (0x00007f3f4d0b9000)
libfhuti.so => /lab/limatb/app/ELMER/VERSIONs/ELMERDEB7MUMPSV5OpenBLAS/bin/../lib/elmersolver/libfhuti.so (0x00007f3f4ce87000)
libarpack.so => /lab/limatb/app/ELMER/VERSIONs/ELMERDEB7MUMPSV5OpenBLAS/bin/../lib/elmersolver/libarpack.so (0x00007f3f4cc37000)
libopenblas.so.0 => /usr/lib/libopenblas.so.0 (0x00007f3f4b762000)
libscalapack-openmpi.so.1 => /usr/lib/libscalapack-openmpi.so.1 (0x00007f3f4ae4f000)
libblacs-openmpi.so.1 => /usr/lib/libblacs-openmpi.so.1 (0x00007f3f4ac21000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3f4aa04000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3f4a782000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3f4a57e000)
libesmumps-5.1.so => /usr/lib/libesmumps-5.1.so (0x00007f3f4a379000)
libscotch-5.1.so => /usr/lib/libscotch-5.1.so (0x00007f3f4a110000)
libscotcherr-5.1.so => /usr/lib/libscotcherr-5.1.so (0x00007f3f49f0e000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f3f49bf7000)
libparpack.so => /lab/limatb/app/ELMER/VERSIONs/ELMERDEB7MUMPSV5OpenBLAS/bin/../lib/elmersolver/libparpack.so (0x00007f3f499ae000)
libmpi_f90.so.0 => /usr/local/lib/libmpi_f90.so.0 (0x00007f3f497ab000)
libmpi_f77.so.0 => /usr/local/lib/libmpi_f77.so.0 (0x00007f3f49572000)
libmpi.so.0 => /usr/local/lib/libmpi.so.0 (0x00007f3f492c7000)
libopen-rte.so.0 => /usr/local/lib/libopen-rte.so.0 (0x00007f3f4907a000)
libopen-pal.so.0 => /usr/local/lib/libopen-pal.so.0 (0x00007f3f48e24000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f3f48c0c000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f3f48a09000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3f487f2000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f3f485bd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3f48232000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3f47f2a000)
liblapack.so.3gf => /usr/lib/liblapack.so.3gf (0x00007f3f47359000)
libblacsCinit-openmpi.so.1 => /usr/lib/libblacsCinit-openmpi.so.1 (0x00007f3f47157000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3f4da60000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3f46f40000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3f46d37000)
Whereas while using the Mumps4.10 comming fro the .DEB
ldd ElmerSolver
linux-vdso.so.1 => (0x00007ffdd33d4000)
libelmersolver.so => /lab/limatb/app/ELMER/ELMERANMMUMPSDEBIAN/bin/../lib/elmersolver/libelmersolver.so (0x00007f58db0a0000)
libmatc.so => /lab/limatb/app/ELMER/ELMERANMMUMPSDEBIAN/bin/../lib/elmersolver/libmatc.so (0x00007f58dae7b000)
libfhuti.so => /lab/limatb/app/ELMER/ELMERANMMUMPSDEBIAN/bin/../lib/elmersolver/libfhuti.so (0x00007f58dac49000)
libarpack.so => /lab/limatb/app/ELMER/ELMERANMMUMPSDEBIAN/bin/../lib/elmersolver/libarpack.so (0x00007f58da9f9000)
libf77blas.so.3 => /usr/lib/libf77blas.so.3 (0x00007f58da7b1000)
libatlas.so.3 => /usr/lib/libatlas.so.3 (0x00007f58da1b6000)
liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007f58d95e5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f58d93e0000)
libdmumps-4.10.0.so => /usr/lib/libdmumps-4.10.0.so (0x00007f58d92b2000)
libmumps_common-4.10.0.so => /usr/lib/libmumps_common-4.10.0.so (0x00007f58d9272000)
libpord-4.10.0.so => /usr/lib/libpord-4.10.0.so (0x00007f58d925c000)

libscalapack-openmpi.so.1 => /usr/lib/libscalapack-openmpi.so.1 (0x00007f58d8949000)
libmetis.so.3.1 => /usr/lib/libmetis.so.3.1 (0x00007f58d86ff000)
libparmetis.so.3.1 => /usr/lib/libparmetis.so.3.1 (0x00007f58d84bf000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f58d81a9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f58d7f27000)
libparpack.so => /lab/limatb/app/ELMER/ELMERANMMUMPSDEBIAN/bin/../lib/elmersolver/libparpack.so (0x00007f58d7cdd000)
libmpi_f90.so.0 => /usr/local/lib/libmpi_f90.so.0 (0x00007f58d7ada000)
libmpi_f77.so.0 => /usr/local/lib/libmpi_f77.so.0 (0x00007f58d78a2000)
libmpi.so.0 => /usr/local/lib/libmpi.so.0 (0x00007f58d75f6000)
libopen-rte.so.0 => /usr/local/lib/libopen-rte.so.0 (0x00007f58d73a9000)
libopen-pal.so.0 => /usr/local/lib/libopen-pal.so.0 (0x00007f58d7154000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f58d6f3b000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f58d6d38000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f58d6b22000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f58d68ec000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f58d6561000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f58d625a000)
libcblas.so.3 => /usr/lib/libcblas.so.3 (0x00007f58d603c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f58d5e20000)
libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f58d4975000)
/lib64/ld-linux-x86-64.so.2 (0x00007f58db668000)
libblacs-openmpi.so.1 => /usr/lib/libblacs-openmpi.so.1 (0x00007f58d4747000)
libblacsCinit-openmpi.so.1 => /usr/lib/libblacsCinit-openmpi.so.1 (0x00007f58d4545000)

As i said i'm able to use a self-compiled MUMPS with our fortran code, but i'd like to make it work with Elmer as i'm already using it with the .DEB version.

Thanks again if someone knows how to compile those libs with CMake...
YannGuevel
Posts: 30
Joined: 26 May 2014, 12:37
Antispam: Yes

Re: how to compile Elmer using a self-compiled MUMPS?

Post by YannGuevel »

Hello,

i managed to compile Elmer with a self-complied version of MUMPS_v5 using openBlas for MutliThread ability.
It is not straigth forward but it's working... still have some stuff to check.

I compiled Mumps as a ".so" shared library (as in a debian package).
I added some information in a toolchain file CMake procedure in order to check the good Mumps libs.

Some lines might not be usefull so that when everything is check and confirmed i'll try to post a draft of an HowToCompileElmer+SelfCompiledMumps.
Post Reply