NWCHEM Compile Error

148 views
Skip to first unread message

Hyuna Shin

unread,
Mar 19, 2021, 10:39:15 AM3/19/21
to NWChem Forum

Hello. I have trying install the NWchem. I want to install the NWchem in parallel.
My OS is CentOS 7, GCC version is 7.3.1, Make version is 4.2.1. And I configure Nwchem with Intel MKL, OpenMPI (v 3.1.6), Pyhton2.7.5 and GA (v 5.8)

My .bashrc is

'''
export NWCHEM_TOP=/opt/nwchem
export NWCHEM_TARGET=LINUX64
export ARMCI_NETWORK=MPI-PR
export NWCHEM_MODULES=all
export USE_NOFSCHECK=TRUE
export USE_NOIO=TRUE
export MRCC_METHODS=TRUE
export CCSDTQ=TRUE
export PYTHONVERSION=2.7
export BLASOPT="-L/opt/intel/mkl/lib/intel64"
export LAPACK_LIB="-L/opt/intel/mkl/lib/intel64"
export LIBMPI="-L$MPI_LIB -lmpi_mpifh -lmpi_usempif08 -lmpi -lmpi_usempi_ignore_tkr"
export FC=gfortran
export CC=gcc
export CXX=g++
export NWCHEM_MPIF_WRAP=/opt/mpi/bin/mpifort
export NWCHEM_MPIC_WRAP=/opt/mpi/bin/mpicc
export NWCHEM_MPICXX_WRAP=/opt/mpi/bin/mpicxx
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/opt/mpi
export MPI_LIB=/opt/mpi/lib
export MPI_INCLUDE=/opt/mpi/include
export PATH=$NWCHEM_TOP/bin/$NWCHEM_TARGET:$PATH
export LD_LIBRARY_PATH=$NWCHEM_TOP/lib/$NWCHEM_TARGET:$LD_LIBRARY_PATH
'''
I saw and followed it on this site https://nwchemgit.github.io/Compiling-NWChem.html

I do % /opt/nwchem/src and % make -j6 2> error.

But I get an error. I attached the error file.

I don't know why the error occurs.Please help me install NWchem. I am willing to give you additional information you need. Please help me.

error.txt

Edoardo Aprà

unread,
Mar 22, 2021, 3:39:26 PM3/22/21
to NWChem Forum
Your settings of BLASOPT and LAPACK_LIB are the root cause of you failed compilation. Please use the following

export BLASOPT="-L/opt/intel/mkl/lib/intel64 lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
export LAPACK_LIB=$BLASOPT

I would also unset all your MPI variables. It's better let the makefile detect them once you have mpif90 in your PATH
Then, please do the following

cd /opt/nwchem/src/tools
rm -rf build install
make FC=ifort
cd ..
make FC=ifort link

More details for MKL settings at



Hyuna Shin

unread,
Mar 25, 2021, 10:34:25 AM3/25/21
to NWChem Forum
Dear Edoardo Aprà

I tried that

export BLASOPT="-L/opt/intel/mkl/lib/intel64 lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
export LAPACK_LIB=$BLASOPT

cd /opt/nwchem/src/tools
rm -rf build install
make FC=ifort
cd ..
make FC=ifort link

But an error has occurred so I remove the `nwchem` directory and re git clone the NWchem. 

My .bashrc file is 

export NWCHEM_TOP=/opt/nwchem
export NWCHEM_TARGET=LINUX64
export ARMCI_NETWORK=MPI-PR
export NWCHEM_MODULES=all
export USE_NOFSCHECK=TRUE
export USE_NOIO=TRUE
export MRCC_METHODS=TRUE
export CCSDTQ=TRUE
export PYTHONVERSION=2.7
export BLASOPT="-L/opt/intel/mkl/lib/intel64 lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl"
export LAPACK_LIB=$BLASOPT
##export BLASOPT="-L/opt/intel/mkl/lib/intel64"
##export LAPACK_LIB="-L/opt/intel/mkl/lib/intel64"
#export LIBMPI="-lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_core -lmkl_sequential -lmkl_blacs_intelmpi_ilp64"
export LIBMPI="-L$MPI_LIB -lmpi_mpifh -lmpi_usempif08 -lmpi -lmpi_usempi_ignore_tkr"
export FC=gfortran
export CC=gcc
export CXX=g++
export NWCHEM_MPIF_WRAP=/opt/mpi/bin/mpifort
export NWCHEM_MPIC_WRAP=/opt/mpi/bin/mpicc
export NWCHEM_MPICXX_WRAP=/opt/mpi/bin/mpicxx
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/opt/mpi
export MPI_LIB=/opt/mpi/lib
export MPI_INCLUDE=/opt/mpi/include
export PATH=$NWCHEM_TOP/bin/$NWCHEM_TARGET:$PATH
export LD_LIBRARY_PATH=$NWCHEM_TOP/lib/$NWCHEM_TARGET:$LD_LIBRARY_PATH

I am a student in theoretical quantum chemistry lab. I have to compile the NWchem code because I want to study the NWchem code. (Actually, I am a beginner to compilation. So, I desperately need help. :'( )

Can you help me my installation? Everyone's help is desperate.
2021년 3월 23일 화요일 오전 4시 39분 26초 UTC+9에 Edoardo Aprà님이 작성:

Natalie Stuart

unread,
Sep 9, 2021, 3:34:22 PM9/9/21
to NWChem Forum
I am having similar compilation issues, which may be due to my settings of BLASOPT. 
Based on the NWCHEM compilation instructions, I am unsure about what the BLASOPT environment variable is doing. 
Should it be a path to the BLAS library on my system?

Thanks
-Natalie Stuart


Edoardo Aprà

unread,
Sep 9, 2021, 3:35:43 PM9/9/21
to NWChem Forum
Yes, BLASOPT defines the linking options for the BLAS library.
More details at
Reply all
Reply to author
Forward
0 new messages