Installation problems for FreeFem++-mpi on Ubuntu 26.04

Dear all,

It’s been a while since I didn’t had build issues of FreeFem :slight_smile: , and after few days, I should say, Iḿ stuck…

The build process runs fine with no errors, and I think there is an issue when building or linking some libraries (ptscoth) built under PETsc.

The symptom:
When running mpi examples that load various libraries like MUMPS, parmmg, HPDDM, PETsc, (essentially all that are built with PETsc), I get the following error related to linking to scotch:

Load error: mmg
fail:
dlerror : /home/julien/Libraries/freefem+±4.16/ff-petsc/r/lib/libmmg.so.5: undefined symbol: _SCOTCHintSort2asc1
list prefix: ‘./’ ‘/home/julien/Libraries/freefem+±4.16/lib/ff++/4.16/lib/mpi/’ list suffix: ‘’ , ‘.so’

(…)

Sorry! You were supposed to get help about:
prun:non-zero-exit
But I couldn’t open the help file:
/usr/lib/x86_64-linux-gnu/pmix2/share/pmix/help-prun.txt: No such file or directory
/usr/lib/x86_64-linux-gnu/prrte3/share/prte/help-prun.txt: No such file or directory.
Sorry!

or

Load error: MUMPS_mpi
fail:
dlerror : /home/garaud/Libraries/freefem+±4.16/ff-petsc/r/lib/libptscotch.so.7.0: undefined symbol: _SCOTCHorderSaveTree
list prefix: ‘./’ ‘/home/julien/Libraries/freefem+±4.16/lib/ff++/4.16/lib/mpi/’ list suffix: ‘’ , ‘.so’

(…)

PMIX ERROR: PMIX_ERR_UNREACH in file ../../../src/server/pmix_server.c at line 3207

Sorry! You were supposed to get help about:
prun:non-zero-exit
But I couldn’t open the help file:
/usr/lib/x86_64-linux-gnu/pmix2/share/pmix/help-prun.txt: No such file or directory
/usr/lib/x86_64-linux-gnu/prrte3/share/prte/help-prun.txt: No such file or directory.
Sorry!

The context:

  • fresh install of ubuntu 26.04
  • Freefem from developp branch
  • the ./configrue --prefix=/home/julien/Libraries/freefem++-4.16 --with-mpi=yes --enable-m64 --enable-downlad --enable-optim --with-hdf5=no
  • I tried to build petsc either separately, or building with make petsc-slepc, and I get the same issue
  • after few attempts, I tried to build petsc separately, and run make check. I get similar errors, related to linking with scotch. So I guess it is probably related to petsc building of scotch/ptscotch

After trying to debug with ai, I still get this kind of errors, and should say that I’m stuck
Did anyone faced similar issues?

I advance, thank for the help! :slight_smile:

Could you please try:

$ cd /home/garaud/Libraries/freefem+±4.16/ff-petsc/r/lib/
$ nm lib*scotch* | grep -i SCOTCHorderSaveTree

and share the output?

hi, the output for nm returns,

         U \_SCOTCHorderSaveTree
         U \_SCOTCHorderSaveTree
         U \_SCOTCHorderSaveTree

0000000000072f90 T _SCOTCHorderSaveTree
0000000000072f90 T _SCOTCHorderSaveTree
0000000000072f90 T _SCOTCHorderSaveTree

What about ldd /home/garaud/Libraries/freefem+±4.16/ff-petsc/r/lib/libptscotch.so.7.0?

I get

linux-vdso.so.1 (0x0000732871083000)
libscotch.so.7.0 => /usr/lib/x86_64-linux-gnu/libscotch.so.7.0 (0x0000732870f94000)
libmpi.so.40 => /usr/lib/x86_64-linux-gnu/libmpi.so.40 (0x0000732870a00000)
libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x0000732870600000)
libscotcherr.so.7.0 => /usr/lib/x86_64-linux-gnu/libscotcherr.so.7.0 (0x0000732870f8f000)
libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x0000732870e67000)
libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x0000732870e49000)
libbz2.so.1.0 => /usr/lib/x86_64-linux-gnu/libbz2.so.1.0 (0x0000732870e34000)
liblzma.so.5 => /usr/lib/x86_64-linux-gnu/liblzma.so.5 (0x0000732870dff000)
libucc.so.1 => /usr/lib/x86_64-linux-gnu/libucc.so.1 (0x00007328709be000)
libpsm2.so.2 => /usr/lib/x86_64-linux-gnu/libpsm2.so.2 (0x0000732870956000)
libfabric.so.1 => /usr/lib/x86_64-linux-gnu/libfabric.so.1 (0x000073287045b000)
libucp.so.0 => /usr/lib/x86_64-linux-gnu/libucp.so.0 (0x00007328702e3000)
libucs.so.0 => /usr/lib/x86_64-linux-gnu/libucs.so.0 (0x00007328708e6000)
libopen-pal.so.80 => /usr/lib/x86_64-linux-gnu/libopen-pal.so.80 (0x0000732870192000)
libevent_core-2.1.so.7 => /usr/lib/x86_64-linux-gnu/libevent_core-2.1.so.7 (0x00007328708b1000)
libevent_pthreads-2.1.so.7 => /usr/lib/x86_64-linux-gnu/libevent_pthreads-2.1.so.7 (0x0000732870df6000)
libhwloc.so.15 => /usr/lib/x86_64-linux-gnu/libhwloc.so.15 (0x000073287084c000)
libpmix.so.2 => /usr/lib/x86_64-linux-gnu/libpmix.so.2 (0x000073286fe00000)
/lib64/ld-linux-x86-64.so.2 (0x0000732871085000)
libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x0000732870de8000)
librdmacm.so.1 => /usr/lib/x86_64-linux-gnu/librdmacm.so.1 (0x000073287082b000)
libefa.so.1 => /usr/lib/x86_64-linux-gnu/libefa.so.1 (0x0000732870dd7000)
libibverbs.so.1 => /usr/lib/x86_64-linux-gnu/libibverbs.so.1 (0x000073287016d000)
libuct.so.0 => /usr/lib/x86_64-linux-gnu/libuct.so.0 (0x0000732870123000)
libucm.so.0 => /usr/lib/x86_64-linux-gnu/libucm.so.0 (0x0000732870106000)
libnl-3.so.200 => /usr/lib/x86_64-linux-gnu/libnl-3.so.200 (0x00007328700e3000)
libudev.so.1 => /usr/lib/x86_64-linux-gnu/libudev.so.1 (0x000073287009c000)
libmunge.so.2 => /usr/lib/x86_64-linux-gnu/libmunge.so.2 (0x0000732870823000)
libnl-route-3.so.200 => /usr/lib/x86_64-linux-gnu/libnl-route-3.so.200 (0x000073286fd64000)

I also tried to configure and compile

by commenting out
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/ so that it does not appear in my path, and hope that petsc will build its own libscotch but some how it is still found (not sure that it would solve at all..)

I would advise you to try from scratch where you let PETSc build everything, instead of relying on the system Open MPI (and who knows what else).

I finally managed by letting petsc do the job.
the issue was that LD_LIBRARY_PATH had some weird links, thus keeping it minimal and letting petsc do the job solved the problem.

thanks for the help :slight_smile:

Business as usual :slight_smile: