Segmentation fault after making the abinit excutables

Hello all,

I’m trying to compile a basic parallel version of abinit. I’ve downloaded abinit-9.6.2, and configured it with the parameters below:

# MPI settings

# linear algebra settings
LINALG_LIBS="-L/usr/lib/x86_64-linux-gnu -llapack -lblas"

# mandatory libraries

Then I run the command make -j32. I’m doing all these on a system with Intel Xeon Gold 5218 CPU, memory space 31.3 GiB, and OS Ubuntu 20.04.2 LTS with Open MPI installed.

The making process went smoothly, and I got ~/build/src/98_main/abinit executable after that. But when I tried to run:

abinit -b

the terminal returned:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x14acc82d677d in ???
#1  0x14acc82d5993 in ???
#2  0x14acc84b341f in ???
#3  0x14acc82d5e9b in ???
#4  0x14acc8454a8d in ???
#5  0x14acc84425fb in ???
#6  0x55a54ac8c851 in __m_xmpi_MOD_xmpi_init
	at ../../../../../shared/common/src/12_hide_mpi/m_xmpi.F90:763
#7  0x55a5497afaa6 in abinit
	at ../../../src/98_main/abinit.F90:202
#8  0x55a5497ba9da in main
	at ../../../src/98_main/abinit.F90:88
Segmentation fault (core dumped)

Trying to run it in parallel by using:

mpirun -np 4 abinit -b

also returned a similar error, all four processes were killed by signal 11 (segmentation fault).

I’ve also installed mkl (libmkl-full-dev) as the default alternative for blas and lapack, could this be the problem?


perhaps a problem of library during link…

what is the output of

ldd abinit

Hi, thanks for your reply.

The output of ldd abinit is: (0x00007ffdf45e1000) => /usr/lib/x86_64-linux-gnu/ (0x00001516103d3000) => /usr/lib/x86_64-linux-gnu/ (0x000015160fcf3000) => /usr/lib/x86_64-linux-gnu/ (0x000015160fc75000) => /lib/x86_64-linux-gnu/ (0x000015160fc50000) => /usr/lib/x86_64-linux-gnu/ (0x000015160fa6f000) => /lib/x86_64-linux-gnu/ (0x000015160f920000) => /usr/lib/x86_64-linux-gnu/ (0x000015160f8bb000) => /lib/x86_64-linux-gnu/ (0x000015160f8a0000) => /lib/x86_64-linux-gnu/ (0x000015160f6ae000) => /lib/x86_64-linux-gnu/ (0x000015160f6a6000) => /usr/lib/x86_64-linux-gnu/ (0x000015160f581000) => /usr/lib/x86_64-linux-gnu/ (0x000015160f2b9000)
	/lib64/ (0x0000151616ad9000) => /usr/lib/x86_64-linux-gnu/ (0x000015160f26f000) => /usr/lib/x86_64-linux-gnu/ (0x000015160f14a000) => /usr/lib/x86_64-linux-gnu/ (0x000015160f09c000) => /usr/lib/x86_64-linux-gnu/ (0x000015160f073000) => /usr/lib/x86_64-linux-gnu/ (0x000015160ecf6000) => /usr/lib/x86_64-linux-gnu/ (0x000015160ec67000) => /usr/lib/x86_64-linux-gnu/ (0x000015160ebad000) => /usr/lib/x86_64-linux-gnu/ (0x000015160eb5c000) => /lib/x86_64-linux-gnu/ (0x000015160eb55000) => /usr/lib/x86_64-linux-gnu/ (0x000015160eaff000) => /usr/lib/x86_64-linux-gnu/ (0x000015160eafa000) => /usr/lib/x86_64-linux-gnu/ (0x000015160eaf5000) => /lib/x86_64-linux-gnu/ (0x000015160ead9000) => /usr/lib/x86_64-linux-gnu/ (0x000015160eab0000) => /usr/lib/x86_64-linux-gnu/ (0x000015160ea8d000) => /usr/lib/x86_64-linux-gnu/ (0x000015160ea6d000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e9ff000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e9ec000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e9b2000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e7dc000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e78d000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e737000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e726000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e718000) => /lib/x86_64-linux-gnu/ (0x000015160e6eb000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e6e0000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e6d5000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e553000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e51c000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e498000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e1c2000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e08a000) => /usr/lib/x86_64-linux-gnu/ (0x000015160e074000) => /usr/lib/x86_64-linux-gnu/ (0x000015160df97000) => /usr/lib/x86_64-linux-gnu/ (0x000015160df66000) => /lib/x86_64-linux-gnu/ (0x000015160df5f000) => /usr/lib/x86_64-linux-gnu/ (0x000015160df50000) => /lib/x86_64-linux-gnu/ (0x000015160df32000) => /usr/lib/x86_64-linux-gnu/ (0x000015160df15000) => /usr/lib/x86_64-linux-gnu/ (0x000015160ded0000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dead000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dea1000) => /lib/x86_64-linux-gnu/ (0x000015160de98000) => /usr/lib/x86_64-linux-gnu/ (0x000015160de8c000) => /usr/lib/x86_64-linux-gnu/ (0x000015160ddf9000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dd52000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dd1a000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dcff000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dcd5000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dcc3000) => /usr/lib/x86_64-linux-gnu/ (0x000015160dc75000) => /usr/lib/x86_64-linux-gnu/ (0x000015160db4c000) => /lib/x86_64-linux-gnu/ (0x000015160db11000)

And speaking of the library, I remember another issue occurred during the installation of hdf5-dev via apt. The terminal reported a dependency error about libjpeg-dev that apt cannot solve, so I tried to install it first, which led to a series of dependency errors, at the end of that series is a similar issue like this. I tried to install gfortran-7 as that post suggested, then finished the installation of hdf5-dev without further issues. Could this be related?


In the output of the ldd command, I notice that there are 2 versions of the library : and : it’s the problem… but how it happened… during an OS upgrade?

I started from scratch :
-minimum installation of Ubuntu 20.04.4 LTS
-installation of these packages :

  • apt install make patch m4
  • apt install gfortran g++ ( => version 9.4 )
  • apt install libopenmpi-dev
  • apt install libhdf5-dev libnetcdf-dev libnetcdff-dev libxc-dev
  • apt install libmkl-sequential libmkl-core libmkl-gf-lp64 libmkl-interface-dev libmkl-dev
  • apt install libpython3.8-dev

-my ac9 file :

# MPI settings

# linear algebra settings
LINALG_LIBS="-L/usr/lib/x86_64-linux-gnu -Wl,--start-group  -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group"


# mandatory libraries

-compilation : OK ( only library :wink: )
-all tests pass :slight_smile:


Thanks very much! Seems indeed an env problem. This system has too many messy packages to fix on my own, but I’m the sole user of it now, so I just reinstalled everything and started from scratch, and problem solved I think? At least test run was finished cleanly.
Thanks again, I know this (restarting everything in a clean environment) is not a doable solution for everyone who might also be reading this thread, but the problem is very much like the different versions of the same library.

1 Like