Welcome, Guest
Username: Password: Remember me

TOPIC: TelApy import error

TelApy import error 5 years 10 months ago #32371

  • liuy
  • liuy's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Hello,
I am trying to compile TelApy of V7P3R0 on Linux platform, follow some advice from this forum, here is my cfg file options.
options: static api
par_cmdexec:   <config>/partel < PARTEL.PAR >> <partel.log>
mpi_cmdexec:   mpirun -wdir <wdir> -np <ncsize> <exename>

cmd_obj:    mpif90 -cpp -c -O3 -fPIC -convert big_endian -DHAVE_MPI <mods> <incs> <f95name>
cmd_lib:    ar cru <libname> <objs>
cmd_exe:    mpif90 -fPIC -o <exename> <objs> <libs>

incs_all:  /export21/openmpi/include
libs_all:  /export21/openmpi/lib/libmpi.so  
           /lib/metis510gnu/lib/libmetis.a
sfx_zip:    .gztar
sfx_lib:    .so
sfx_obj:    .o
sfx_mod:    .mod
sfx_exe:
#
val_root:   <root>/examples
val_rank:   all
mods_all:   -I <config>
# also possible val_rank:   <3 >7 6
cmd_obj_c: icc -c <srcName> -o <objName>

After run compileTELEMAC.py, it shows no error. But when i try to import the api module in python,seems some error happens from mpi.
import _api
ImportError: ./lib/_api.so: undefined symbol: mpi_allgather_
hope you can help me,thanks.
The administrator has disabled public write access.

TelApy import error 5 years 10 months ago #32414

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Hi,

You need to compile the telemac libraries in dynamic, metis as well.
You can find informations on how to do that here:
wiki.opentelemac.org/doku.php?id=installation_on_linux
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
The following user(s) said Thank You: liuy

TelApy import error 5 years 10 months ago #32437

  • liuy
  • liuy's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Hi,yugi,Thanks for your reply.
Recently ,I have update my Telemac model to V8p0r0,I use gfortran on Ubuntu. Compile metis in dynamic by
cmake -D CMAKE_INSTALL_PREFIX=<install_path> -DSHARED=TRUE .
there is a "libmetis.so" in my install_path.
attachment are my cfg file,after compile telemac,there are no errors,but when i try to use the API,METIS_PartMeshDual are undefined in libpartel.so,error shows below:
import _api
ImportError: /home/liuy/v8p0r0/builds/ubugfopenmp/wrap_api/lib/libpartel.so: undefined symbol: METIS_PartMeshDual

hope you can help me,thank you again.
Attachments:
The administrator has disabled public write access.

TelApy import error 5 years 10 months ago #32438

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Did you had The path to the library to LD_LIBRARY_PATH ?
export LD_LIBRARY_PATH=$METISHOME/lib:$LD_LIBRARY_PATH
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

TelApy import error 5 years 10 months ago #32439

  • liuy
  • liuy's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
Thank you again yugi.
I did your procedure and recompile Telemac.
But errors remains.
I have try some other command to see what happens. There are lots of undefined symbol in libpartel.so,include the METIS_PartMeshDual.
My mpi are Open MPI 2.1.1, Does the metis compatible with my mpi ?

$ ldd -r libpartel.so
linux-vdso.so.1 (0x00007ffff6079000)
	libgfortran.so.4 => /usr/lib/x86_64-linux-gnu/libgfortran.so.4 (0x00007fddea520000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fddea300000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdde9f00000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fdde9cc0000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdde9920000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdde96f0000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fddeac00000)
undefined symbol: __bief_def_MOD_ncsize	(./libpartel.so)
undefined symbol: __declarations_special_MOD_lu	(./libpartel.so)
undefined symbol: __bief_def_MOD_nptir	(./libpartel.so)
undefined symbol: get_mesh_title_	(./libpartel.so)
undefined symbol: get_data_time_	(./libpartel.so)
undefined symbol: get_bnd_color_	(./libpartel.so)
undefined symbol: get_bnd_connectivity_	(./libpartel.so)
undefined symbol: front2_	(./libpartel.so)
undefined symbol: get_data_var_list_	(./libpartel.so)
undefined symbol: get_data_nvar_	(./libpartel.so)
undefined symbol: open_mesh_	(./libpartel.so)
undefined symbol: get_data_value_	(./libpartel.so)
undefined symbol: METIS_PartMeshDual	(./libpartel.so)
undefined symbol: get_nodes_per_element_	(./libpartel.so)
undefined symbol: add_data_	(./libpartel.so)
undefined symbol: read_mesh_info_	(./libpartel.so)
undefined symbol: get_bnd_numbering_	(./libpartel.so)
undefined symbol: get_bnd_nelem_	(./libpartel.so)
undefined symbol: check_allocate_	(./libpartel.so)
undefined symbol: set_bnd_	(./libpartel.so)
undefined symbol: plante_	(./libpartel.so)
undefined symbol: extens_	(./libpartel.so)
undefined symbol: close_bnd_	(./libpartel.so)
undefined symbol: set_header_	(./libpartel.so)
undefined symbol: get_data_ntimestep_	(./libpartel.so)
undefined symbol: get_free_id_	(./libpartel.so)
undefined symbol: get_bnd_npoin_	(./libpartel.so)
undefined symbol: get_mesh_l2g_numbering_	(./libpartel.so)
undefined symbol: open_bnd_	(./libpartel.so)
undefined symbol: get_mesh_date_	(./libpartel.so)
undefined symbol: transfer_group_part_info_	(./libpartel.so)
undefined symbol: check_call_	(./libpartel.so)
undefined symbol: voisin_	(./libpartel.so)
undefined symbol: elebd_	(./libpartel.so)
undefined symbol: get_bnd_value_	(./libpartel.so)
undefined symbol: get_mesh_connectivity_	(./libpartel.so)
undefined symbol: set_mesh_	(./libpartel.so)
undefined symbol: get_mesh_coord_	(./libpartel.so)
undefined symbol: close_mesh_	(./libpartel.so)
undefined symbol: get_bnd_ipobo_	(./libpartel.so)
The administrator has disabled public write access.

TelApy import error 5 years 10 months ago #32441

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
It think i see the issue.
You need to add other folder to your LD_LIBRARY_PATH.
You can have a look at configs/pysource.template.sh
For what to add.
I would also suggest removing incs_all and the link to mpi.so from libs_all.
They are not needed mpif90 already adds them.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

TelApy import error 5 years 9 months ago #32909

Hi, liuy. Did you solve the error? I encountered the same error although successfully compiled.
The administrator has disabled public write access.
Moderators: borisb

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