NWChem compiled with PGI but segfaults when testing

47 views
Skip to first unread message

Malcolm Hillebrand

unread,
Apr 7, 2021, 12:24:03 PM4/7/21
to NWChem Forum
Hi all,

As per title, I have compiled NWChem 7.0.2 using PGI 16.7, but running with the test file nwchem.nw segfaults in libpthreads.so and I haven't seen this exact error elsewhere.

Also as a note, I had to edit two of the source files before PGI would compile them -- changing the "ISNAN" call in nwpwxc_vdw3a.F to ieee_is_nan, and escaping the backslashes in '\' instances (-> '\\') in nwpwxc_vdw3c.F. So it is possible I have missed something in the process, since I had to make these changes!

The error output is in the attached txt file. The environment variables for the setup are as listed here. Compiled with `make nwchem_config NWCHEM_MODULES=all; make FC=pgf90 CC=pgcc`.

export USE_MPI=y
export USE_64TO32=y
export NWCHEM_TARGET=LINUX64
export BLAS_SIZE=4
export LAPACK_SIZE=4
export SCALAPACK_SIZE=4
export USE_PYTHONCONFIG=y
export PYTHONVERSION=2.7
export PYTHONHOME=/usr
export BLASOPT=" -L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_pgi_thread -lmkl_core -pgf90libs -mp -lpthread -lm -ldl" #for pgi
export LAPACK_LIB=$BLASOPT
export LD_LIBRARY_PATH=/usr/lib64/:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin/:$PATH

It's quite possible there is a simple mistake causing this, but thanks in advance for any help!
error_trace.txt

Edoardo Aprà

unread,
Apr 7, 2021, 12:32:07 PM4/7/21
to NWChem Forum
ilp64 corresponds to BLAS_SIZE and LAPACK_SIZE=8
I would suggest skipping use of CC=pgcc since we hardly ever tested this option.
This is what I am suggesting to try

export BLAS_SIZE=8
export LAPACK_SIZE=8
cd $NWCHEM_TOP/src/tools
rm -rf build install
make FC=pgf90
cd ../64to32blas
make clean
make FC=pgf90
cd ..
make FC=pgf90 link

PS The compilation failure you reported is discussed in https://github.com/nwchemgit/nwchem/issues/340

Malcolm Hillebrand

unread,
Apr 8, 2021, 11:05:57 AM4/8/21
to NWChem Forum
Thanks a lot, that does the trick.
I still used CC=pgcc though -- without this I get "configure: error: linking to Fortran libraries from C fails". With pgcc the linking is happy and it seems everything else works fine.

And thanks for the compilation link, -Mbackslash is a more elegant solution. I see that the "ISNAN" issue isn't raised there, but it is mentioned in a comment in the code.
Reply all
Reply to author
Forward
0 new messages