bsc-pm / dlb

DLB (Dynamic Load Balancing) library is a tool, transparent to the user, that will dynamically react to the application imbalance modifying the number of resources at any given time.
https://pm.bsc.es/dlb
GNU Lesser General Public License v3.0
21 stars 6 forks source link

symbol lookup error with Intel compiler 2021.6.0 #8

Open raymerta opened 1 year ago

raymerta commented 1 year ago

Hi, I am facing a problem when trying dlb with Intel compilers 2021.6.0

symbol lookup error: /library-dev/dlb-iimpi/lib/libdlb_mpi.so: undefined symbol: iso_c_binding_mp_c_funloc_private_

The other installation using GCC & OpenMPI works without problem. Is this known problem with Intel or is there anything that I need to do to make dlb works with Intel?

vlopezh commented 1 year ago

Yes, we have encountered this problem with modern Intel installations. We compile and link both C and Fortran MPI symbols in the same library and the Intel linker throws that error. Unfortunately, we still haven't find a fix but there are two easy workarounds.

As far as I know, this error only appears when explicitly linking an application with libdlb_mpi.so:

A) Instead of linking the application with this library you may link with libdlb.so so that the linker resolves DLB symbols if needed, or not linking at all if you don't use the DLB API. Then, at run time, execute something like mpirun --mpi-flags env LD_PRELOAD=dlb_path/lib/libdlb_mpi.so <binary>. This will make DLB to intercept the appropriate MPI calls and will not complain about the undefined symbol.

B) Build a separate library with only C MPI symbols in it (I'm assuming you application only uses C/C++). Configure with --enable-c-mpi-library, make and make install again and link with -ldlb_mpic instead.