MPI installation issue (kernel_generator)

More
3 years 7 months ago #3622 by Guosheng Fu
Hello,

I have an issue on installing ngsolve with MPI recently on my laptop.
In particular, the kernel generator in ngsolve could not find my local mpi library. This error message seems to be only appearing after version 6.2.2009.
Well, the installation went through in my local cluster, where the exactly same installation procedure is performed. Quite strange... Is there any quick fix?
Code:
[ 6%] Built target kernel_generator [ 6%] Generating matkernel.hpp ./kernel_generator: error while loading shared libraries: libmpi.so.12: cannot open shared object file: No such file or directory

Best,
Guosheng
More
3 years 7 months ago #3623 by lkogler
Hi, Guosheng,

The kernel_generator is a small executable
Code:
ngsolve_build/ngsolve/basiclinalg/kernel_generator

So it seems that this executable links against the MPI library but cannot find it when it is executed.
You can "ldd" the executable to confirm this, you should get a line like:
Code:
libmpi.so.12 => not found

Maybe the path to your MPI library is not in your LD_LIBRARY_PATH?

You could try to put the MPI library into LD_PRELOAD for the build. That should force it to load.

Best,
Lukas
More
3 years 7 months ago #3624 by Guosheng Fu
libmpi.so was not found in kernel_generator
I have already PATH set to find MPI in my bashrc, otherwise cmake does not work.

Now I exported LD_PRELOAD/LD_LIBRARY_PATH in bashrc, but it still didn't find the MPI library...
More
3 years 7 months ago #3625 by lkogler
Can you try to manually execute the kernel_generator with the MPI library preloaded?
Code:
LD_PRELOAD=<your_mpi_library>:$LD_PRELOAD ./kernel_generator

And add the preload path in the shell and ldd the executable?
Code:
export LD_LIBRARY_PATH=<path_to_mpi_library>:$LD_LIBRARY_PATH ldd kernel_generator

Maybe the output can give some indication where the problem lies.

Best, Lukas
More
3 years 7 months ago #3627 by Guosheng Fu
It magically worked after I manually preload MPI library on the command line...
Thanks!
Time to create page: 0.109 seconds