Welcome, Guest
Username: Password: Remember me

TOPIC: MUMPS not recognised in conda [linux]

MUMPS not recognised in conda [linux] 7 months 4 days ago #43469

  • tomsail
  • tomsail's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Thank you received: 10
Hello,

I have trying to package TELEMAC directly from the sources for Linux and macOs, in order to match @nicogodet's implementation for windows.

for reference here is the forum item for telemac conda package for windows www.opentelemac.org/index.php/kunena/2-w...elemac-conda-package

Now, I have finally succeeded to find the right mumps conda library to implement: which are:
mumps-mpi
and
mumps-common
reference : github.com/conda-forge/mumps-feedstock

(original mumps conda library provides "libdmumps.a" which is static so compilation does not work for the API in dynamic)


However I still can't run the example test creaocean. Steps to replicate:

install telemac-mascaret package for linux:
mamba create -n telemac -c tomsail telemac-mascaret

activate
mamba activate telemac
mamba install gcc
(forgot to include it in the package)

make sure you have the mumps libraries in the $HOMETEL/lib folder :
ll $HOMETEL/lib | grep mumps
-rwxrwxr-x   2 saillth users   2309584 Mar 11  2022 libcmumps-5.2.1.so*
-rwxrwxr-x   2 saillth users   2270664 Mar 11  2022 libcmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        22 Oct 14 08:06 libcmumps_seq.so -> libcmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        18 Oct 14 08:06 libcmumps.so -> libcmumps-5.2.1.so*
-rwxrwxr-x   2 saillth users   2268328 Mar 11  2022 libdmumps-5.2.1.so*
-rwxrwxr-x   2 saillth users   2229408 Mar 11  2022 libdmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        22 Oct 14 08:06 libdmumps_seq.so -> libdmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        18 Oct 14 08:06 libdmumps.so -> libdmumps-5.2.1.so*
-rwxrwxr-x   2 saillth users     25504 Mar  9  2022 libesmumps-6.so*
-rwxrwxr-x   2 saillth users     25504 Mar  9  2022 libesmumps.so*
-rwxrwxr-x   2 saillth users    382640 Mar 11  2022 libmumps_common-5.2.1.so*
-rwxrwxr-x   2 saillth users    423504 Mar 11  2022 libmumps_common_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        28 Oct 14 08:06 libmumps_common_seq.so -> libmumps_common_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        24 Oct 14 08:06 libmumps_common.so -> libmumps_common-5.2.1.so*
-rwxrwxr-x   2 saillth users     25504 Mar  9  2022 libptesmumps-6.so*
-rwxrwxr-x   2 saillth users     25504 Mar  9  2022 libptesmumps.so*
-rwxrwxr-x   2 saillth users   2264280 Mar 11  2022 libsmumps-5.2.1.so*
-rwxrwxr-x   2 saillth users   2229456 Mar 11  2022 libsmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        22 Oct 14 08:06 libsmumps_seq.so -> libsmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        18 Oct 14 08:06 libsmumps.so -> libsmumps-5.2.1.so*
-rwxrwxr-x   2 saillth users   2280864 Mar 11  2022 libzmumps-5.2.1.so*
-rwxrwxr-x   2 saillth users   2250136 Mar 11  2022 libzmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        22 Oct 14 08:06 libzmumps_seq.so -> libzmumps_seq-5.2.1.so*
lrwxrwxrwx   1 saillth users        18 Oct 14 08:06 libzmumps.so -> libzmumps-5.2.1.so*

make sure the libraries paths are correctly entered in the systel.cfg:
cat $HOMETEL/configs/systel.cfg

...
incs_mumps: -I$MUMPSHOME/include
flags_mumps: -DHAVE_MUMPS
libs_mumps: $MUMPSHOME/lib/libdmumps-5.2.1.so
            $MUMPSHOME/lib/libmumps_common-5.2.1.so
            $MUMPSHOME/lib/libpord-5.2.1.so
            $SCALAPACKHOME/lib/libscalapack.so
            -L$BLACSHOME -lblas
libs_so_mumps: -L$MUMPSHOME/lib -ldmumps -lmumps_common -lpord
               -L$SCALAPACKHOME/lib -lscalapack
               -lblas

libs_so_mumps_mkl: -L$MUMPSHOME/lib -ldmumps -lmumps_common -lpord
                   -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
                   -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_def
                   -lpthread -lm -ldl
...
#
# GFortran
#
[S10.gfortran.dyn]
brief: Scibian 10 dynamic build using GFortran 8.3.0 and Open MPI.
options: api
#
f2py_name: f2py3
pyd_fcompiler: gnu95
sfx_lib:    .so
#
obj_flags: -O2 -fPIC [fflags_gfo] [flags_mpi] [flags_mumps] 
lib_flags: -fPIC -shared [fflags_gfo]
#
exe_flags: -fPIC [fflags_gfo]
#
cmd_lib:    [fc] [lib_flags] -o <libname> <objs>
incs_all: [incs_mumps]
# libs_all: [libs_so]
# libs_all: [libs_so_mumps] [libs_med] [libs_metis] [libs_gotm]
libs_all: [libs_mumps] [libs_metis]
libs_so: [libs_so_mumps] [libs_metis]
cflags: -fPIC
#

compile telemac:
compile_telemac.py

compilation runs fine

run test case:
git clone https://gitlab.pam-retd.fr/otm/telemac-mascaret.git
cd telemac-mascaret/examples/artemis/creocean
artemis.py art_creocean_2.cas

error:
WITH NO PARALLELISM,
 NO DIRECT SYSTEM SOLVER 9 USE 8

 PLANTE: PROGRAM STOPPED AFTER AN ERROR
 RETURNING EXIT CODE:            2
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 2.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
The administrator has disabled public write access.

MUMPS not recognised in conda [linux] 7 months 2 days ago #43472

  • nicogodet
  • nicogodet's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 128
  • Thank you received: 31
Hi,

Im' not answering to your issue but I would suggest you to drop all definition of MUMPSHOME, etc.. in systel.cfg (check my config file)
If packages are installed using mamba/conda, it shouldn't be needed as folders are in $PATH.

It simplifies both systel.cfg and activate.sh
The administrator has disabled public write access.

MUMPS not recognised in conda [linux] 7 months 1 day ago #43473

  • tomsail
  • tomsail's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Thank you received: 10
Thanks @nicogodet,
Indeed compilation still works fine with a lighter version of the config file:
$ cat $HOMETEL/configs/systel.cfg
# _____                              _______________________________
# ____/ TELEMAC Project Definitions /______________________________/
#
[Configurations]
configs: S10.gfortran.dyn gnu.dynamic.debug
# gnu.static gnu.static.debug 
# gnu.dynamic gnu.dynamic.debug
#
# _____                   __________________________________________
# ____/ Windows generals /_________________________________________/
#
[general]
modules:    system
#
sfx_zip:    gztar
sfx_lib:    .a
sfx_obj:    .o
sfx_mod:    .mod
sfx_exe:
#
val_root:   <root>\examples
val_rank:   all
#
# METIS info
#
libs_metis: -lmetis
#
# MPI info
#
incs_mpi: -kind:byte -I$MPIHOME/include
flags_mpi: -DHAVE_MPI
libs_mpi: -L$HOMETEL/lib -lmpichf90 -lmpich -lopa -lmpl -lrt -lpthread
mpi_cmdexec: mpirun -np <ncsize> <exename>
fc: mpif90
#
# MUMPS info
#
# incs_mumps: -I%CONDA_PREFIX%/Library/mingw-w64/include
flags_mumps: -DHAVE_MUMPS
libs_mumps: -ldmumps -lmumps_common -lpord
            -lscalapack
            -lblas -llapack
#
# Generic compilation info
#
cmd_obj: mpif90 -c [obj_flags] <mods> <incs> <f95name>
cmd_obj_c: gcc -c [cflags] <srcName> -o <objName>
cmd_exe: mpif90 [exe_flags] -o <exename> <objs> <libs>
#
incs_all:
libs_all: -lgfortran [libs_metis] [libs_mpi] [libs_mumps]
#
mods_all: -I <config>
#
cflags:
fflags_gfo: -cpp -fconvert=big-endian -frecord-marker=4 -DHAVE_I16
fflags_debug_gfo: -g -Wall -fcheck=all -fbacktrace -fbounds-check -finit-integer=-1 -finit-real=nan -ffpe-trap=invalid,zero,overflow
#
options: api
#
# Python modules generation options
#
f2py_name: f2py3
pyd_fcompiler: gnu95
#
# _____                     ________________________________________
# ____/ GNU configurations /_______________________________________/
#
[gnu.static]
brief: Windows static build using Mingw and MS-MPI
#
sfx_lib: .a
cmd_lib: ar cru <libname> <objs>
obj_flags: -O2 [fflags_gfo] [flags_mpi] [flags_mumps]
exe_flags: -fPIC [fflags_gfo]
#
[S10.gfortran.dyn]
brief: Scibian 10 dynamic build using GFortran 8.3.0 and Open MPI.
options: api
#
f2py_name: f2py3
pyd_fcompiler: gnu95
sfx_lib:    .so
#
obj_flags: -O2 -fPIC [fflags_gfo] [flags_mpi] [flags_mumps] 
lib_flags: -fPIC -shared [fflags_gfo]
#
exe_flags: -fPIC [fflags_gfo]
#
cmd_lib:    [fc] [lib_flags] -o <libname> <objs>
incs_all: 
# libs_all: [libs_so]
# libs_all: [libs_so_mumps] [libs_med] [libs_metis] [libs_gotm]
libs_all: [libs_mumps] [libs_metis]
libs_so: [libs_so_mumps] [libs_metis]
cflags: -fPIC
#
[gnu.dynamic.debug]
brief: Windows dynamic build using Mingw and MS-MPI, in debug mode.
#
sfx_lib: .dll
cmd_lib: mpif90 -fPIC -shared [fflags_gfo] [fflags_debug_gfo] -Wl,--subsystem,windows,--out-implib,<libname>.a -o <libname> <objs> <libs>
cflags: -fPIC
obj_flags: -c -O0 -fPIC [fflags_gfo] [fflags_debug_gfo] [flags_mpi] [flags_mumps]
exe_flags: -fPIC [fflags_gfo] [fflags_debug_gfo]

but
artemis.py art_creocean_2.cas
still fails with the same error
The administrator has disabled public write access.

MUMPS not recognised in conda [linux] 6 months 2 weeks ago #43566

  • tomsail
  • tomsail's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Thank you received: 10
EDIT: I found the fix.

actually my MUMPS was working!
The error above is returned because I was running in sequential.

running
artemis.py art_creocean.cas --ncsize 4
runs completely fine.

If you want to run artemis with just one core, you just need to change SYSTEM SOLVER to 8 as specified in the log file above
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.