NWChem 6.6 -segmentation fault

From NWChem

Viewed 1237 times, With a total of 12 Posts
Jump to: navigation, search

Clicked A Few Times
Threads 2
Posts 9
Dear all,

I compiled NWChem 6.6 on Ubuntu 17.04. I used the following steps.


export NWCHEM_TOP=/home/ravi/Desktop/nwchem-6.6
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES=all python

export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y

export LIBMPI="-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi"
export MPI_LIB=/usr/lib/x86_64-linux-gnu/openmpi/lib
export MPI_INCLUDE=/usr/lib/x86_64-linux-gnu/openmpi/include

export USE_NOFSCHECK=TRUE
export MRCC_METHODS=TRUE

export PYTHONHOME=/usr/lib/python3.5
export PYTHONVERSION=3.5
export USE_PYTHONCONFIG=Y
export USE_PYTHON64=Y
export PYTHONLIBTYPE=so
export PYTHONCONFIGDIR=config-3.5m-x86_64-linux-gnu

export USE_SCALAPACK=y
export SCALAPACK="-L/usr/lib/libscalapack-openmpi.so.1 -llibblacs-openmpi.so.1"

> cd $NWCHEM_TOP/src
> make clean
> make 64_to_32

export BLASOPT="-lopenblas -lpthread -lrt"
export BLAS_SIZE=4
export USE_64TO32=y
export USE_INTERNALBLAS=y

   Compilation

> make nwchem_config
> make 64_to_32
> make cc=icc F=gfortran


I have got nwchem binaries, however, whilst trying to run a test job, I got segmentation fault error.

Here is the input file:

echo
title "Nitrogen cc-pvdz SCF geometry optimization"
geometry

 n 0 0 0

 n 0 0 1.08

end

basis

 n library cc-pvdz

end

scf

direct

end

task scf optimize


>nwchem n2.nw > n2.out

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

Backtrace for this error:

   0 0x7f819ed74ed7 in ???
1 0x7f819ed7410d in ???
2 0x7f819e4947ef in ???
3 0x7f819f0e8244 in ???
4 0x559d69bf316a in ???
5 0x559d69bf321b in ???
6 0x559d69bf208e in ???
7 0x559d672ed2de in nwchem

      at /home/ravi/Desktop/nwchem-6.6/src/nwchem.F:84

   8 0x559d672ede84 in main

      at /home/ravi/Desktop/nwchem-6.6/src/nwchem.F:369

Segmentation fault (core dumped)


Could someone please help to resolve the error?

Thank you.
KRISH

Forum Vet
Threads 9
Posts 1570
  • Python 3 is not supported

  • Did you apply the following patch?

http://www.nwchem-sw.org/download.php?f=Ga_argv.patch.gz

http://www.nwchem-sw.org/index.php/Special:AWCforum/st/id1269

Clicked A Few Times
Threads 2
Posts 9
Dear Dr. Edoapra,

I applied the patch which you have mentioned. In addition, I modified the Python library details as shown below and recombiled nwchem.

export PYTHONHOME=/usr/lib/python2.7
export PYTHONVERSION=2.7
export PYTHONCONFIGDIR=config-x86_64-linux-gnu

>make clean
> make nwchem_config
> make 64_to_32
> make cc=icc FC=gfortran

Although I have got the nwchem binary, when I ran the n2-test run (input file -see the first post), I again got the similar segmentation fault error.

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

Backtrace for this error:
  1. 0 0x7f5a53569ed7 in ???
  2. 1 0x7f5a5356910d in ???
  3. 2 0x7f5a52c897ef in ???
  4. 3 0x7f5a538dd244 in ???
  5. 4 0x55c995bf91ab in ???
  6. 5 0x55c995bf925c in ???
  7. 6 0x55c995bf80cf in ???
  8. 7 0x55c9932f32de in nwchem
at /home/ravi/Desktop/nwchem-6.6/src/nwchem.F:84
  1. 8 0x55c9932f3e84 in main
at /home/ravi/Desktop/nwchem-6.6/src/nwchem.F:369
Segmentation fault (core dumped)

How can I solve this problem?

Thank you.
KRISH

Forum Vet
Threads 9
Posts 1570
Krish
My suggestion is for you to wait until the next release (6.8) of NWChem comes out

Clicked A Few Times
Threads 2
Posts 9
NWChem 6.8 compiling error
I compiled NWchem 6.8 on Ubuntu.17.04 using the following steps.

export NWCHEM_TOP=/home/ravi/Desktop/nwchem-6.8
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES=all python

export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y

export LIBMPI="-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi"
export MPI_LIB=/usr/lib/x86_64-linux-gnu/openmpi/lib
export MPI_INCLUDE=/usr/lib/x86_64-linux-gnu/openmpi/include

export USE_NOFSCHECK=TRUE
export MRCC_METHODS=TRUE

export PYTHONHOME=/usr/lib/python3.5
export PYTHONVERSION=3.5
export USE_PYTHONCONFIG=Y
export USE_PYTHON64=Y
export PYTHONLIBTYPE=so
export PYTHONCONFIGDIR=config-3.5m-x86_64-linux-gnu

export USE_SCALAPACK=y
export SCALAPACK="-L/usr/lib/libscalapack-openmpi.so.1 -llibblacs-openmpi.so.1"

> cd $NWCHEM_TOP/src
> make clean
> make 64_to_32

export BLASOPT="-lopenblas -lpthread -lrt"
export BLAS_SIZE=4
export USE_64TO32=y
export USE_INTERNALBLAS=y

  Compilation


> make nwchem_config
> make 64_to_32
> make cc=icc F=gfortran

I am getting the following error. How do I solve this problem? Could you please help me?

make nwchem.o stubs.o
make[1]: Entering directory '/home/ravi/Desktop/nwchem-6.8/src'
gfortran -m64 -ffast-math -Warray-bounds -fdefault-integer-8 -fno-tree-dominator-opts -finline-functions -O2 -g -fno-aggressive-loop-optimizations -fno-tree-dominator-opts -g -O -I. -I/home/ravi/Desktop/nwchem-6.8/src/include -I/home/ravi/Desktop/nwchem-6.8/src/tools/install/include -DGFORTRAN -DCHKUNDFLW -DGCC4 -DGCC46 -DEXT_INT -DLINUX -DLINUX64 -DPARALLEL_DIAG -DCOMPILATION_DATE="'`date +%a_%b_%d_%H:%M:%S_%Y`'" -DCOMPILATION_DIR="'/home/ravi/Desktop/nwchem-6.8'" -DNWCHEM_BRANCH="'6.8'" -c -o nwchem.o nwchem.F
gfortran -m64 -ffast-math -Warray-bounds -fdefault-integer-8 -fno-tree-dominator-opts -finline-functions -O2 -g -fno-aggressive-loop-optimizations -fno-tree-dominator-opts -g -O -I. -I/home/ravi/Desktop/nwchem-6.8/src/include -I/home/ravi/Desktop/nwchem-6.8/src/tools/install/include -DGFORTRAN -DCHKUNDFLW -DGCC4 -DGCC46 -DEXT_INT -DLINUX -DLINUX64 -DPARALLEL_DIAG -DCOMPILATION_DATE="'`date +%a_%b_%d_%H:%M:%S_%Y`'" -DCOMPILATION_DIR="'/home/ravi/Desktop/nwchem-6.8'" -DNWCHEM_BRANCH="'6.8'" -c -o stubs.o stubs.F
make[1]: Leaving directory '/home/ravi/Desktop/nwchem-6.8/src'
gfortran -L/home/ravi/Desktop/nwchem-6.8/lib/LINUX64 -L/home/ravi/Desktop/nwchem-6.8/src/tools/install/lib -o /home/ravi/Desktop/nwchem-6.8/bin/LINUX64/nwchem nwchem.o stubs.o -lnwctask -lccsd -lmcscf -lselci -lmp2 -lmoints -lstepper -ldriver -loptim -lnwdft -lgradients -lcphf -lesp -lddscf -ldangchang -lguess -lhessian -lvib -lnwcutil -lrimp2 -lproperty -lsolvation -lnwints -lprepar -lnwmd -lnwpw -lofpw -lpaw -lpspw -lband -lnwpwlib -lcafe -lspace -lanalyze -lqhop -lpfft -ldplot -ldrdy -lvscf -lqmmm -lqmd -letrans -lpspw -ltce -lbq -lmm -lcons -lperfm -ldntmc -lccca -ldimqm -lnwcutil -lga -larmci -lpeigs -lperfm -lcons -lbq -lnwcutil -L/usr/lib/libscalapack-openmpi.so.1 -llibblacs-openmpi.so.1 -l64to32 -lopenblas -lpthread -lrt -lnwclapack -lnwcblas -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lrt -lpthread -lm -lpthread
/usr/bin/ld: cannot find -llibblacs-openmpi.so.1
collect2: error: ld returned 1 exit status
GNUmakefile:33: recipe for target 'all' failed
make: *** [all] Error 1

Clicked A Few Times
Threads 2
Posts 9
In the previous post, for the python related setup, I have used the following set up.

export PYTHONHOME=/usr/lib/python2.7
export PYTHONVERSION=2.7
export USE_PYTHONCONFIG=Y
export USE_PYTHON64=Y
export PYTHONLIBTYPE=so
export PYTHONCONFIGDIR=config-x86_64-linux-gnu

Forum Vet
Threads 9
Posts 1570
Please send the output of the following command to check the installed files for Scalapack and Blacs


dpkg-query -l | egrep scalapa

dpkg-query -l | egrep blacs

dpkg-query -S blacs

dpkg-query -S scalap


Clicked A Few Times
Threads 2
Posts 9
Here are the outputs:

> dpkg-query -l | egrep scalapa
ii libscalapack-openmpi1 1.8.0-13build2 amd64 Scalable Linear Algebra Package - Shared libs. for OpenMPI

>dpkg-query -l | egrep blacs
ii libblacs-openmpi1 1.1-38 amd64 Basic Linear Algebra Comm. Subprograms - Shared libs. for OpenMPI

>dpkg-query -S blacs
libblacs-openmpi1: /usr/share/doc/libblacs-openmpi1/README
libblacs-openmpi1: /usr/share/doc/libblacs-openmpi1/copyright
libblacs-openmpi1: /usr/lib/libblacs-openmpi.so.1
libblacs-openmpi1: /usr/lib/libblacsF77init-openmpi.so.1.1
libblacs-openmpi1: /usr/share/doc/libblacs-openmpi1/changelog.Debian.gz
libblacs-openmpi1: /usr/lib/libblacsCinit-openmpi.so.1.1
libblacs-openmpi1: /usr/share/doc/libblacs-openmpi1
libblacs-openmpi1: /usr/lib/libblacsF77init-openmpi.so.1
libblacs-openmpi1: /usr/lib/libblacs-openmpi.so.1.1
libblacs-openmpi1: /usr/lib/libblacsCinit-openmpi.so.1

>dpkg-query -S scalap
libscalapack-openmpi1: /usr/share/doc/libscalapack-openmpi1
libscalapack-openmpi1: /usr/share/doc/libscalapack-openmpi1/copyright
libscalapack-openmpi1: /usr/share/doc/libscalapack-openmpi1/README.gz
libscalapack-openmpi1: /usr/share/doc/libscalapack-openmpi1/changelog.Debian.gz
libscalapack-openmpi1: /usr/lib/libscalapack-openmpi.so.1
libscalapack-openmpi1: /usr/lib/libscalapack-openmpi.so.1.8.0

Forum Vet
Threads 9
Posts 1570
wrong value of SCALAPACK env. variable
Please use the following

export SCALAPACK="-lscalapack-openmpi -lblacs-openmpi"

If this does not work, please send the output of the following commands

ls -l /usr/lib/libblacs-ope*

ls -l /usr/lib/libscalapack-ope*

Clicked A Few Times
Threads 2
Posts 9
Dear Dr. Edoapra,

When I used

export SCALAPACK="-lscalapack-openmpi -lblacs-openmpi"

I have got the following error:


make[1]: Leaving directory '/home/ravi/Desktop/nwchem-6.8/src'
gfortran -L/home/ravi/Desktop/nwchem-6.8/lib/LINUX64 -L/home/ravi/Desktop/nwchem-6.8/src/tools/install/lib -o /home/ravi/Desktop/nwchem-6.8/bin/LINUX64/nwchem nwchem.o stubs.o -lnwctask -lccsd -lmcscf -lselci -lmp2 -lmoints -lstepper -ldriver -loptim -lnwdft -lgradients -lcphf -lesp -lddscf -ldangchang -lguess -lhessian -lvib -lnwcutil -lrimp2 -lproperty -lsolvation -lnwints -lprepar -lnwmd -lnwpw -lofpw -lpaw -lpspw -lband -lnwpwlib -lcafe -lspace -lanalyze -lqhop -lpfft -ldplot -ldrdy -lvscf -lqmmm -lqmd -letrans -lpspw -ltce -lbq -lmm -lcons -lperfm -ldntmc -lccca -ldimqm -lnwcutil -lga -larmci -lpeigs -lperfm -lcons -lbq -lnwcutil -lscalapack-openmpi -lblacs-openmpi -l64to32 -lopenblas -lpthread -lrt -lnwclapack -lnwcblas -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lrt -lpthread -lm -lpthread
/usr/bin/ld: cannot find -lscalapack-openmpi
/usr/bin/ld: cannot find -lblacs-openmpi
collect2: error: ld returned 1 exit status
GNUmakefile:33: recipe for target 'all' failed
make: *** [all] Error 1


>ls -l /usr/lib/libblacs-ope*
lrwxrwxrwx 1 root root 23 Mar 25 2017 /usr/lib/libblacs-openmpi.so.1 -> libblacs-openmpi.so.1.1


>ls -l /usr/lib/libscalapack-ope*
lrwxrwxrwx 1 root root 29 Oct 22 2016 /usr/lib/libscalapack-openmpi.so.1 -> libscalapack-openmpi.so.1.8.0
-rw-r--r-- 1 root root 6982336 Oct 22 2016 /usr/lib/libscalapack-openmpi.so.1.8.0

Forum Vet
Threads 9
Posts 1570
Your scalapack installation is not quite ready for usage.
Could you please install libscalapack-mpi-dev and libblacs-mpi-dev by typing

sudo apt-get install libscalapack-mpi-dev libblacs-mpi-dev

Clicked A Few Times
Threads 2
Posts 9
> sudo apt-get install libscalapack-mpi-dev libblacs-mpi-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
 linux-headers-4.10.0-38 linux-headers-4.10.0-38-generic linux-image-4.10.0-38-generic
linux-image-extra-4.10.0-38-generic linux-signed-image-4.10.0-38-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
 mpi-default-dev
Suggested packages:
 scalapack-doc
The following NEW packages will be installed:
 libblacs-mpi-dev libscalapack-mpi-dev mpi-default-dev
0 upgraded, 3 newly installed, 0 to remove and 132 not upgraded.
Need to get 2,255 kB/2,259 kB of archives.
After this operation, 11.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libblacs-mpi-dev amd64 1.1-38
 404  Not Found [IP: 91.189.88.162 80]
Err:2 http://in.archive.ubuntu.com/ubuntu zesty/universe amd64 libscalapack-mpi-dev amd64 1.8.0-13build2
 404  Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/b/blacs-mpi/libblacs-mpi-dev_1.1-38_amd6... 404 Not Found [IP: 91.189.88.162 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/s/scalapack/libscalapack-mpi-dev_1.8.0-1... 404 Not Found [IP: 91.189.88.162 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


>apt-get update
Reading package lists... Done
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

Forum Vet
Threads 9
Posts 1570
Please seek assistance for Ubuntu installation in more appropriate channels, for example
http://askubuntu.com
By the way, you might want to keep in mind that Ubuntu 17.04 is not an LTS release\
https://wiki.ubuntu.com/LTS


Forum >> NWChem's corner >> Compiling NWChem



Who's here now Members 0 Guests 2 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC