Welcome, Guest
Username: Password: Remember me

TOPIC: undefined symbol: mpi_allgather_

undefined symbol: mpi_allgather_ 2 years 1 week ago #41569

Hello all,

I am trying to run the telemac2d API simple example in Ubuntu 22.04.1 (after failed to run it in windows 10), I am using Telemac v8p3r1. I am facing the following error
Traceback (most recent call last):

  File "/home/mohamed/telemac-mascaret/v8p3r1/scripts/python3/telapy/api/api_module.py", line 171, in __init__

    import _api

ImportError: /home/mohamed/telemac-mascaret/v8p3r1/scripts/python3/_api.so: undefined symbol: mpi_allgather_



During handling of the above exception, another exception occurred:



Traceback (most recent call last):

  File "/home/mohamed/telemac-mascaret/v8p3r1/scripts/python3/Trial.py", line 22, in <module>

    my_problem = Telemac2d('t2d_breach.cas', lang=1, comm=MPI.COMM_WORLD)

  File "/home/mohamed/telemac-mascaret/v8p3r1/scripts/python3/telapy/api/t2d.py", line 58, in __init__

    super(Telemac2d, self).__init__("t2d", casfile, user_fortran,

  File "/home/mohamed/telemac-mascaret/v8p3r1/scripts/python3/telapy/api/api_module.py", line 183, in __init__

    raise TelemacException(

utils.exceptions.TelemacException: Error: unable to load the dynamic library _api.so

You can check the environment variable: PYTHONPATH

/home/mohamed/telemac-mascaret/v8p3r1/scripts/python3/_api.so: undefined symbol: mpi_allgather_

My systel.cfg as follows:
# _____                              _______________________________

# ____/ TELEMAC Project Definitions /______________________________/
#
[Configurations]
configs: gfortran gfortranHPC
# _____                        ____________________________________
# ____/ General /___________________________________/
# Global declarations that are set by default for all the configurations
[general]
language: 2
modules:  system
version:  v8p3r1
#
options: static api
#
f2py_name: f2py3
pyd_fcompiler: gnu95
#
sfx_zip:    .zip
sfx_lib:    .a
sfx_obj:    .o
sfx_mod:    .mod
sfx_exe:
#
#
val_root:   <root>/examples
#
val_rank:   all
#
mods_all:   -I <config>
#
incs_all:
#
libs_all:
#
cmd_obj_c: gcc -fPIC -c <srcName> -o <objName>
#
[gfortran.dyn]
brief: GFortran compiler with Open MPI in dynamic mode
#
options: api
#
sfx_lib:    .so
#
mpi_cmdexec: mpirun -machinefile MPI_HOSTFILE -np <ncsize> <exename>
#
cmd_obj:    mpif90 -c -cpp -fPIC -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_MPI -DHAVE_MUMPS -DHAVE_MED -DHAVE_VTK -fallow-invalid-boz <mods> <incs> <f95name>
cmd_lib:    mpif90 -fPIC -shared -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <libname> <objs>
cmd_exe:    mpif90 -fPIC -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <exename> <objs> <libs>
#
libs_all: -L$MUMPSHOME/lib -ldmumps -lmumps_common -lpord
          -L$SCALAPACKHOME/lib -lscalapack
          -lblas
          -lm -L$MEDHOME/lib -lmed -L$HDF5HOME/lib -lhdf5 -ldl -lstdc++ -lz
          -L$METISHOME/lib -lmetis


cmd_obj_c: gcc -c -fPIC <srcName> -o <objName>
#
# Gfortran HPC
#
[gfortranHPC]
brief: GFortran compiler using Open MPI
#
mpi_cmdexec: mpirun -machinefile MPI_HOSTFILE -np <ncsize> <exename>
#
cmd_obj:    mpif90 -c -cpp -fallow-invalid-boz -fPIC -O2 -fconvert=big-endian -frecord-marker=4 -DHAVE_MPI -DHAVE_VTK <mods> <incs> <f95name>
cmd_lib:    ar cru <libname> <objs>
cmd_exe:    mpif90 -fPIC -fconvert=big-endian -frecord-marker=4 -lpthread -lm -o <exename> <objs> <libs>
#
libs_all: -L$METISHOME/lib -lmetis
#

and my pysource.sh is as follows:
# This file is a template for a Linux environment file
# running "source pysource.template.sh" will position all
# the necessary environment variables for telemac
# To adapt to your installation replace word <word> by their local value
###
### TELEMAC settings -----------------------------------------------------------
###
# Path to telemac root dir
export HOMETEL=$HOME/telemac-mascaret/v8p3r1
# Adding python scripts to PATH
export PATH=$HOMETEL/scripts/python3:.:$PATH
# Configuration file
export SYSTELCFG=$HOMETEL/configs/systel.cfg
# Name of the configuration to use
export USETELCFG=gfortranHPC
# Path to this file
export SOURCEFILE=$HOMETEL/configs
### Python
# To force python to flush its output
export PYTHONUNBUFFERED='true'
### API
export PYTHONPATH=$HOMETEL/scripts/python3:$PYTHONPATH
export LD_LIBRARY_PATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$HOMETEL/builds/$USETELCFG/wrap_api/lib:$PYTHONPATH
###
### COMPILERS -----------------------------------------------------------
###
# Here are a few examples for external libraries
#export SYSTEL=/data/projets/projets.002/systel.002

### MPI -----------------------------------------------------------

export MPIHOME=$HOME/opt/openmpi
export PATH=$MPIHOME/bin:$PATH
export LD_LIBRARY_PATH=$MPIHOME/lib:$LD_LIBRARY_PATH

###
### EXTERNAL LIBRARIES -----------------------------------------------------------
###
### HDF5 -----------------------------------------------------------
#export HDF5HOME=$HOME/hdf5-1.10.3/hdf5_install
#export LD_LIBRARY_PATH=$HDF5HOME/lib:$LD_LIBRARY_PATH
#export LD_RUN_PATH=$HDF5HOME/lib:$MEDHOME/lib:$LD_RUN_PATH
### MED  -----------------------------------------------------------
#export MEDHOME=$SYSTEL/LIBRARY/med-3.2.0/arch/C9
#export LD_LIBRARY_PATH=$MEDHOME/lib:$LD_LIBRARY_PATH
#export PATH=$MEDHOME/bin:$PATH
### MUMPS -------------------------------------------------------------
#export MUMPSHOME=$SYSTEL/LIBRARY/mumps/gnu
#export SCALAPACKHOME=$SYSTEL/LIBRARY/scalapack/gnu
#export BLACSHOME=$SYSTEL/LIBRARY/blacs/gnu
### METIS -------------------------------------------------------------
export METISHOME=$HOME/metis-5.1.0make_install
export LD_LIBRARY_PATH=$METISHOME/lib:$LD_LIBRARY_PATH

and I am trying to run the example with the following commands:
$ source pysource.sh
$ python3 Trial.py

as (Trial.py) is the Api example.

Note: I tried to use v8p2r1 and faced the same error.

Can anyone help me, please?
The administrator has disabled public write access.

undefined symbol: mpi_allgather_ 1 year 11 months ago #41675

Hello again,

Can anyone share his systel.cfg file with which he could run the example Telemac2d API in ubuntu?
The administrator has disabled public write access.
Moderators: borisb

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