seg fault running QE with environ

53 views
Skip to first unread message

Jerry Greenberg

unread,
Dec 5, 2024, 7:51:43 PM12/5/24
to quantum-environ-users

Hi,
 
I attemped to build QE with Environ for a user on one of our clusters at SDSC (www.sdsc.edu). The cluster ("expanse") has AMD (Rome) processors and is running Rocky 8.

My build environment was gcc/10.2.0, openmpi/4.1.3 and intel-mkl/2020.4.304 for both Environ and QE (which I built with cmake).

I buit Environ with configure and make, , then I built QE with a reference to the Environ build:

cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/jsun7/qe/qe-7.3.1 -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF -DQE_ENABLE_MPI:BOOL=ON -DQE_ENABLE_OPENMP:BOOL=OFF -DQE_ENABLE_SCALAPACK:BOOL=ON -DQE_ENABLE_ELPA:BOOL=OFF -DQE_ENABLE_LIBXC:BOOL=OFF -DCMAKE_C_COMPILER:STRING=/cm/shared/apps/spack/0.17.3/cpu/b/opt/spack/linux-rocky8-zen2/gcc-10.2.0/openmpi-4.1.3-oq3qvsvt5mywjzy7xzrfeh6eebiujvbm/bin/mpicc -DCMAKE_Fortran_COMPILER:STRING=/cm/shared/apps/spack/0.17.3/cpu/b/opt/spack/linux-rocky8-zen2/gcc-10.2.0/openmpi-4.1.3-oq3qvsvt5mywjzy7xzrfeh6eebiujvbm/bin/mpif90 -DENVIRON_ROOT=/home/jsun7/qe/qe-7.3.1/Environ ..

For any input I get the same consistent error.

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

Backtrace for this error:
#0 0x15554b5fcb4f in ???
#1 0xa95431 in __class_iontype_MOD_set_iontype_id
at /home/jsun7/qe/qe-7.3.1/Environ/src/iontype.f90:572
#2 0xa94f1c in __class_iontype_MOD_init_environ_iontype
at /home/jsun7/qe/qe-7.3.1/Environ/src/iontype.f90:214
#3 0xa82516 in __class_ions_MOD_init_environ_ions
at /home/jsun7/qe/qe-7.3.1/Environ/src/ions.f90:245
#4 0xa88e58 in __class_environ_MOD_environ_init_physical
at /home/jsun7/qe/qe-7.3.1/Environ/src/main.f90:978
#5 0xa88cf5 in __class_environ_MOD_init_environ_base
at /home/jsun7/qe/qe-7.3.1/Environ/src/main.f90:234
#6 0x6aef1e in environ_base_module_MOD_init_environ_base
at /home/jsun7/qe/qe-7.3.1/Modules/environ_base_module.f90:122
#7 0x4580ad in init_run
at /home/jsun7/qe/qe-7.3.1/PW/src/init_run.f90:137
#8 0x4d48f1 in run_pwscf
at /home/jsun7/qe/qe-7.3.1/PW/src/run_pwscf.f90:160
#9 0x407cab in pwscf
at /home/jsun7/qe/qe-7.3.1/PW/src/pwscf.f90:85
#10 0x4079ec in main
at /home/jsun7/qe/qe-7.3.1/PW/src/pwscf.f90:40

Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.

mpirun noticed that process rank 0 with PID 398074 on node exp-9-56 exited on signal 11 (Segmentation fault).

~

Thanks,

Jerry
 

Eric Read

unread,
Dec 5, 2024, 8:48:33 PM12/5/24
to quantum-environ-users
It seems that you installed Environ inside the quantum espresso folder and  causes issues during installation. If you compile Environ outside of the Quantum Espresso folder and recompile Quantum Espresso, it should work.

Alex

unread,
Feb 26, 2025, 5:42:59 PMFeb 26
to quantum-environ-users
Hi Eric,

I've been running into the same issue as the person in the original post was running into (a segfault at the same point in the code). I tried compiling Environ outside the QE folder, but it did not help for me, and it led to the same issue. I tried compiling QE with ./configure and make and with cmake and make (based on another thread which suggested cmake might be better to use), but no matter what I've done, I get both Environ and QE compile successfully, but I get a segfault upon running QE when it does the Environ set up.

Thank you,
Alex

Eric Read

unread,
Mar 25, 2025, 12:29:21 PMMar 25
to quantum-environ-users
What compiler and compiler version are you using? It may be a good idea to try a different compiler version or potentially a different compiler entirely.
Reply all
Reply to author
Forward
0 new messages