Compilation of Quantum Espresso + PLUMED needs .ipl libs

I have seemingly successfully compiled Quantum Espresso 7.0 using the hpc_sdk. Both GPU-accelerated and standard operation seem to work and very efficiently.

However, I run into an issue when patching with the PLUMED 2.9.4 code. When PLUMED attempts to write extra outputs I get a Segmentation Fault (11) indicating that QE, through PLUMED, is attempting to access g++ libraries, specifically libpthread and libc.

Both of these libraries are present in the referenced library directories, albeit as .ipl files. Any recommendations on how to make sure these different type of libraries are linked in the autoconf would be appreciated.

PLUMED autoconf input:

./configure \
CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/mpic++ \
CXXFLAGS=-std=c++11 \
CC=/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/mpicc \
FC=/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/openmpi/openmpi-3.1.5/bin/mpifort \
LIBS='-fortranlibs -lrt -lpthread -llapack -lblas -lc'

QE autoconf input:

./configure \
--enable-parallel=yes \
--enable-openmp=yes \
--with-scalapack=yes \
MPIF90=/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/comm_libs/openmpi/openmpi-3.1.5/bin/mpifort \
F90=/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/compilers/bin/nvfortran \
CC=/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/comm_libs/openmpi/openmpi-3.1.5/bin/mpicc \
CPP=/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/compilers/bin/nvprepro \
BLAS_LIBS=/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/compilers/lib/libblas.a \
LAPACK_LIBS=/opt/nvidia/hpc_sdk/Linux_x86_64/22.7/compilers/lib/liblapack.a

Hi ghartma and welcome!

I’m not familiar with PLUMED so wont be able to help with that. I’d suggest you reach out to the developers for help with PLUMED.

Also, I’m not clear what you mean by “.ipl” files. For the PGI compiler, an “.ipl” file was the IPA (Inter-procedural Analysis) library link files use to store information used during the IPA recompile step. However, we haven’t supported IPA since PGI was rebranded to NVHPC back in 2020, so I’m not sure why these would be needed here.

If “.ipl” is something different in your context, please let me know.

libpthread and libc are standard system libraries. We link with libc by default in all cases and with libpthread by default when OpenMP is enabled, so there’s no need to add them.

-Mat

>reach out to PLUMED devs

will do

>.ipl files

they appear to be present in place of some libraries (.a or .so) for instance

/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/compilers/lib/libc.ipl or

/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/compilers/lib/libpthread.ipl

>libs are linked by default

I might be doing something wrong, as the segmentation fault references the gcc libraries, i.e. I may need to force the autoconf/make process to not search for these libs in gcc

These aren’t libraries, these are the IPA files for these libraries. The actual libraries would be included with your system library directory (like “/usr/lib64”).

The cause of the seg fault is unlikely to be due to the libraries themselves. For example you might see a seg fault coming from a libc routine, but the cause would be due to the data being passed into these routines. If you can post the full stack trace from the seg fault, that might give clues on the cause.

This is the default error:

[cfl4:3664689] *** Process received signal ***
[cfl4:3664689] Signal: Segmentation fault (11)
[cfl4:3664689] Signal code: Address not mapped (1)
[cfl4:3664689] Failing at address: 0x40
[cfl4:3664699] [ 0] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libpthread.so.0(+0x12cf0)[0x7f92ad840cf0]
[cfl4:3664699] [ 1] /work/greg/plumed/2.9.4/src/lib/libplumed.so(plumed_f_gfinalize+0xb)[0x7f92b062a70b]
[cfl4:3664699] [ 2] /work/greg/qe/7.0_plumed/bin/pw.x[0x5a48cf]
[cfl4:3664699] [ 3] /work/greg/qe/7.0_plumed/bin/pw.x[
[cfl4:3664699] [ 4] /work/greg/qe/7.0_plumed/bin/pw.x[0x4881b3]
[cfl4:3664699] [ 5] /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libc.so.6(__libc_start_main+0xe5)[0x7f92acc30d85]
[cfl4:3664699] [ 6] /work/greg/qe/7.0_plumed/bin/pw.x[0x4880be]
[cfl4:3664699] *** End of error message ***

I will see if the debug options will provide detail on the data but cannot recompile until later

I’ve added the debug tags to my PLUMED compilation, the only additional output is:

pw.x: Plumed.h:4010: void plumed_finalize(plumed): Assertion `plumed_check_pimpl(pimpl)' failed.
[cfl4:3683352] *** Process received signal ***
[cfl4:3683352] Signal: Aborted (6)
[cfl4:3683352] Signal code:  (-6)

Yes, it’s likely a problem coming from PLUMED. What’s wrong, I have no idea.

You can try updating your compiler version (26.3 is our latest release) to see if that helps, but otherwise you might want to ask the PLUMED developers for advice.