SCF energy of the NWChem sample (H2O)


Clicked A Few Times
Dear all,

Just finish the compilation of NWChem and test for the sample input (H2O)

start h2o
title "Water in 6-31g basis set" 

geometry units au
O 0.00000000 0.00000000 0.00000000
H 0.00000000 1.43042809 -1.10715266
H 0.00000000 -1.43042809 -1.10715266
end
basis
H library 6-31g
O library 6-31g
end
task scf

In NWChem website it states that "The final energy should be -75.983998.".
However, my calculation results in "Total SCF energy = -99.730842584334"

Does anyone know the reason?

Thank you!

Clicked A Few Times
Another question

I test the "restart" optimization example of H2O in the website.
Just find that the optimization was not converge in 20 cycles.
Even I use the "maxiter 5000", the optimization is still not converge in 5000 cycles.
I wonder why a small molecule take such a large optimization cycle number but still not converge.

Does anyone know why?

The below text is the input file



start h2o
title "Water in 6-31g basis set"
permanent_dir /home/hong/mutant/scratch
scratch_dir /home/hong/mutant/scratch

geometry units au
O 0.00000000 0.00000000 0.00000000
H 0.00000000 1.43042809 -1.10715266
H 0.00000000 -1.43042809 -1.10715266
end
basis
H library 6-31g
O library 6-31g
end

 restart h2o
title "Water geometry optimization"
driver
maxiter 5000
end

task scf optimize




Thank you!

Forum Vet
This means that the NWChem installation you are using is not working correctly.
Could you please provide details about the NWChem installation you are using?

Quote:Hong420 Jun 26th 8:02 pm
Dear all,

Just finish the compilation of NWChem and test for the sample input (H2O)

start h2o
title "Water in 6-31g basis set" 

geometry units au
O 0.00000000 0.00000000 0.00000000
H 0.00000000 1.43042809 -1.10715266
H 0.00000000 -1.43042809 -1.10715266
end
basis
H library 6-31g
O library 6-31g
end
task scf

In NWChem website it states that "The final energy should be -75.983998.".
However, my calculation results in "Total SCF energy = -99.730842584334"

Does anyone know the reason?

Thank you!

Clicked A Few Times
Quote:Edoapra Jun 27th 4:43 pm
This means that the NWChem installation you are using is not working correctly.
Could you please provide details about the NWChem installation you are using?



OS  : Ubuntu 18.04
NWChem : nwchem-6.8.1-release.revision-v6.8-133-ge032219-src.2018-06-14.tar.bz2

setenv NWCHEM_TOP /home/hong/nwchem-6.8.1
setenv NWCHEM_TARGET LINUX64
setenv ARMCI_NETWORK SOCKETS
setenv USE_MPI y
setenv USE_MPIF y
setenv USE_MPIF4 y
setenv LIBMPI "-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi"
setenv MPI_LIB /usr/lib/mpich
setenv MPI_INCULDE /usr/include/mpich
setenv NWCHEM_MODULES "all python"
setenv USE_NOFSCHECK TRUE
setenv USE_NOIO TRUE
setenv LIB_DEFINES -DDFLT_TOT_MEM=16777216
setenv PYTHONHOME /usr/bin/python2.7
setenv PYTHONVERSION 2.7
setenv USE_PYTHONCONFIG Y
setenv USE_INTERNALBLAS y
setenv USE_64TO32 y
setenv LD_LIBRARY_PATH /usr/local/lib

cd $NWCHEM_TOP/src
make clean
make 64_to_32
make nwchem_config NWCHEM_MODULES="all"
make >& make.log


Thank you!

Clicked A Few Times
delete
repeat post

Forum Vet
I would suggest the following changes

setenv BLAS_SIZE 8
setenv PYTHONHOME /usr
unsetenv MPI_LIB 
unsetenv LIBMPI
unsetenv MPI_INCLUDE
unsetenv LD_LIBRARY_PATH

cd $NWCHEM_TOP/src/tools
rm -rf build install
make
cd ../64to32blas
make clean
make
cd ..
make link

Clicked A Few Times
I install as followings

setenv NWCHEM_TOP /home/hong/nwchem-6.8.1
setenv NWCHEM_TARGET LINUX64
setenv ARMCI_NETWORK SOCKETS
setenv USE_MPI y
setenv USE_MPIF y
setenv USE_MPIF4 y
setenv BLAS_SIZE 8
setenv PYTHONHOME /usr
setenv NWCHEM_MODULES "all python"
setenv USE_NOFSCHECK TRUE
setenv USE_NOIO TRUE
setenv LIB_DEFINES -DDFLT_TOT_MEM=16777216
setenv PYTHONHOME /usr/bin/python2.7
setenv PYTHONVERSION 2.7
setenv USE_PYTHONCONFIG Y
setenv USE_INTERNALBLAS y
setenv USE_64TO32 y
unsetenv MPI_LIB
unsetenv LIBMPI
unsetenv MPI_INCLUDE
unsetenv LD_LIBRARY_PATH

cd $NWCHEM_TOP/src
make clean
cd $NWCHEM_TOP/src/tools
rm -rf build install
make

after the "make" the error message resulted

Quote:
In file included from ../ga-5.6.5/tcgmsg/tcgmsg-mpi/misc.c:5:0:
../ga-5.6.5/tcgmsg/tcgmsg-mpi/misc.c: In function ‘tcgi_alt_pbegin’:
../ga-5.6.5/tcgmsg/tcgmsg-mpi/misc.c:145:9: error: static assertion failed: "MPI_Errhandler_set was removed in MPI-3.0. Use MPI_Comm_set_errhandler instead."
        MPI_Errhandler_set(TCGMSG_Comm, MPI_ERRORS_RETURN);
^
Makefile:7980: recipe for target 'tcgmsg/tcgmsg-mpi/misc.lo' failed
make[3]: *** [tcgmsg/tcgmsg-mpi/misc.lo] Error 1
Makefile:8272: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
Makefile:5166: recipe for target 'all' failed
make[1]: *** [all] Error 2
GNUmakefile:651: recipe for target 'build/.libs/libga.a' failed
make: *** [build/.libs/libga.a] Error 1



Did I do anything wrong?

Forum Vet
You need a fix for OpenMPI 4.x that was not available when 6.8.1 was released.
Here is how to get the fix

cd $NWCHEM_TOP/src/tools
rm -rf ga-5.6.5.tar.gz build install ga-5.6.5
wget https://github.com/edoapra/ga/releases/download/v5.6.5/ga-5.6.5.tar.gz
make

Clicked A Few Times
After performing all the "setenv", nwchem is installed as follows.

Quote:

cd $NWCHEM_TOP/src/tools
rm -rf ga-5.6.5.tar.gz build install ga-5.6.5
wget https://github.com/edoapra/ga/releases/download/v5.6.5/ga-5.6.5.tar.gz
make

cd $NWCHEM_TOP/src
make clean
cd $NWCHEM_TOP/src/tools
rm -rf build install
make

cd ../64to32blas
make clean
make
cd ..
make link


After the "make link" the error message resulted

Quote:

make nwchem.o stubs.o
make[1]: Entering directory '/home/hong/nwchem-6.8.1/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/hong/nwchem-6.8.1/src/include -I/home/hong/nwchem-6.8.1/src/tools/install/include -DMPICH_NO_ATTR_TYPE_TAGS -DGFORTRAN -DCHKUNDFLW -DGCC4 -DGCC46 -DEXT_INT -DLINUX -DLINUX64 -DNOIO -DEAFHACK -DPARALLEL_DIAG -DCOMPILATION_DATE="'`date +%a_%b_%d_%H:%M:%S_%Y`'" -DCOMPILATION_DIR="'/home/hong/nwchem-6.8.1'" -DNWCHEM_BRANCH="'6.8.1'" -c -o nwchem.o nwchem.F
nwchem.F:4:2:

#include "mafdecls.fh"
1~~ ~~ ~~ ~~ ~~ ~
Fatal Error: errquit.fh: No such file or directory
compilation terminated.
<builtin>: recipe for target 'nwchem.o' failed
make[1]: *** [nwchem.o] Error 1
make[1]: Leaving directory '/home/hong/nwchem-6.8.1/src'
GNUmakefile:54: recipe for target 'link' failed
make: *** [link] Error 2


Thank you.

Forum Vet
can you send me the log file of the compilation in the tools directory and the result of the commands

head -30 $NWCHEM_TOP/src/tools/build/config.log

ls -Rl $NWCHEM_TOP/src/tools/install

Clicked A Few Times
head -30 $NWCHEM_TOP/src/tools/build/config.log

Quote:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Global Arrays (GA) configure 5.6.5, which was
generated by GNU Autoconf 2.69. Invocation command line was

 $ ../ga-5.6.5/configure --prefix=/home/hong/nwchem-6.8.1/src/tools/install --with-tcgmsg --with-mpi=-I/usr/local/include -I/usr/local/lib -L/usr/local/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi --enable-peigs --enable-underscoring --disable-mpi-tests --without-scalapack --without-lapack --without-blas --with-sockets CC=cc CXX=g++ F77=gfortran FFLAGS=-fno-aggressive-loop-optimizations ARMCI_DEFAULT_SHMMAX_UBOUND=131072

    1. --------- ##
    2. Platform. ##
    3. --------- ##

hostname = Mutant
uname -m = x86_64
uname -r = 4.18.0-25-generic
uname -s = Linux
uname -v = #26~18.04.1-Ubuntu SMP Thu Jun 27 07:28:31 UTC 2019

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin



ls -Rl $NWCHEM_TOP/src/tools/install

Quote:
/home/hong/nwchem-6.8.1/src/tools/install:
?? 12
drwxrwxr-x 2 hong hong 4096 7? 4 08:51 bin
drwxrwxr-x 2 hong hong 4096 7? 4 08:51 include
drwxrwxr-x 2 hong hong 4096 7? 4 08:51 lib

/home/hong/nwchem-6.8.1/src/tools/install/bin:
?? 60
-rwxr-xr-x 1 hong hong 17384 7? 4 08:51 adjust.x
-rwxr-xr-x 1 hong hong 9748 7? 4 08:51 armci-config
-rwxr-xr-x 1 hong hong 13040 7? 4 08:51 collisions.x
-rwxr-xr-x 1 hong hong 11388 7? 4 08:51 ga-config

/home/hong/nwchem-6.8.1/src/tools/install/include:
?? 244
-rw-r--r-- 1 hong hong 17249 7? 4 08:51 armci.h
-rw-r--r-- 1 hong hong 405 7? 4 08:51 chemio.h
-rw-r--r-- 1 hong hong 213 7? 4 08:51 coms.h
-rw-r--r-- 1 hong hong 2013 7? 4 08:51 dra.fh
-rw-r--r-- 1 hong hong 2721 7? 4 08:51 dra.h
-rw-r--r-- 1 hong hong 665 7? 4 08:51 eaf.fh
-rw-r--r-- 1 hong hong 1117 7? 4 08:51 eaf.h
-rw-r--r-- 1 hong hong 2422 7? 4 08:51 elio.h
-rw-r--r-- 1 hong hong 954 7? 4 08:51 error.h
-rw-r--r-- 1 hong hong 491 7? 4 08:51 farg.h
-rw-r--r-- 1 hong hong 692 7? 4 08:51 gacommon.h
-rw-r--r-- 1 hong hong 32477 7? 4 08:51 ga.h
-rw-r--r-- 1 hong hong 344 7? 4 08:51 ga-mpi.fh
-rw-r--r-- 1 hong hong 273 7? 4 08:51 ga-mpi.h
-rw-r--r-- 1 hong hong 22797 7? 4 08:51 ga-papi.h
-rw-r--r-- 1 hong hong 22771 7? 4 08:51 ga-wapi.h
-rw-r--r-- 1 hong hong 10462 7? 4 08:51 global.fh
-rw-r--r-- 1 hong hong 1027 7? 4 08:51 gpc.h
-rw-r--r-- 1 hong hong 5628 7? 4 08:51 macdecls.h
-rw-r--r-- 1 hong hong 951 7? 4 08:51 macommon.h
-rw-r--r-- 1 hong hong 2647 7? 4 08:51 maf2c.fh
-rw-r--r-- 1 hong hong 4991 7? 4 08:51 mafdecls.fh
-rw-r--r-- 1 hong hong 805 7? 4 08:51 matypes.h
-rw-r--r-- 1 hong hong 3368 7? 4 08:51 message.h
-rw-r--r-- 1 hong hong 286 7? 4 08:51 msgtypesc.h
-rw-r--r-- 1 hong hong 239 7? 4 08:51 msgtypesf.h
-rw-r--r-- 1 hong hong 4533 7? 4 08:51 parmci.h
-rw-r--r-- 1 hong hong 321 7? 4 08:51 scope.h
-rw-r--r-- 1 hong hong 295 7? 4 08:51 sf.fh
-rw-r--r-- 1 hong hong 870 7? 4 08:51 sf.h
-rw-r--r-- 1 hong hong 377 7? 4 08:51 string-util.h
-rw-r--r-- 1 hong hong 721 7? 4 08:51 table.h
-rw-r--r-- 1 hong hong 157 7? 4 08:51 tcgmsg.fh
-rw-r--r-- 1 hong hong 1534 7? 4 08:51 tcgmsg.h
-rw-r--r-- 1 hong hong 464 7? 4 08:51 typesf2c.h

/home/hong/nwchem-6.8.1/src/tools/install/lib:
?? 2956
-rw-r--r-- 1 hong hong 467474 7? 4 08:51 libarmci.a
-rwxr-xr-x 1 hong hong 1139 7? 4 08:51 libarmci.la
-rw-r--r-- 1 hong hong 2545888 7? 4 08:51 libga.a
-rwxr-xr-x 1 hong hong 1188 7? 4 08:51 libga.la


Thank you.

Forum Vet
cd $NWCHEM_TOP/src
make

Clicked A Few Times
NWChem was successfully compiled. But the SCF energy is still different from the example (-99 vs -75).

I am afraid I did sth wrong from the starting so I re-install ubuntu and re-compile the nwchem as followings:

Quote:

OS  : Ubuntu 18.04 (basic essential)
NWChem  : nwchem-6.8.1-release.revision-v6.8-133-ge032219-src.2018-06-14.tar.bz2
gcc  : apt-get install build-essential
gfortran  : sudo apt-get install gfortran
openmpi  : wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.1.tar.bz2
                           tar -xvf openmpi-4.0.1.tar.bz2
cd openmpi-4.0.1
./configure --prefix=/usr/local
sudo make all install
OpenBLAS  : sudo apt-get install libopenblas-dev
python  : sudo apt-get install python-dev
mpich  : sudo apt install mpich

setenv NWCHEM_TOP /home/hong/nwchem-6.8.1
setenv NWCHEM_TARGET LINUX64
setenv ARMCI_NETWORK SOCKETS
setenv USE_MPI y
setenv USE_MPIF y
setenv USE_MPIF4 y
setenv BLAS_SIZE 8
setenv PYTHONHOME /usr
setenv NWCHEM_MODULES "all python"
setenv USE_NOFSCHECK TRUE
setenv USE_NOIO TRUE
setenv LIB_DEFINES -DDFLT_TOT_MEM=16777216
setenv PYTHONVERSION 2.7
setenv USE_PYTHONCONFIG Y
setenv USE_INTERNALBLAS y
setenv USE_64TO32 y
setenv MPI_LOC /usr/local
setenv MPI_INCLUDE $MPI_LOC/include
setenv MPI_LIB $MPI_LOC/lib
setenv LD_LIBRARY_PATH /usr/local/lib
setenv LIBMPI "-pthread -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi"

cd $NWCHEM_TOP/src
make nwchem_config

cd $NWCHEM_TOP/src/tools
rm -rf ga-5.6.5.tar.gz build install ga-5.6.5
wget https://github.com/edoapra/ga/releases/download/v5.6.5/ga-5.6.5.tar.gz
make

cd $NWCHEM_TOP/src
make
cd $NWCHEM_TOP/src/tools
rm -rf build install
make
cd ../64to32blas
make clean
make
cd ..
make link

mkdir /usr/local/NWChem
mkdir /usr/local/NWChem/bin
mkdir /usr/local/NWChem/data

cp $NWCHEM_TOP/bin/${NWCHEM_TARGET}/nwchem /usr/local/NWChem/bin
cd /usr/local/NWChem/bin
chmod 755 nwchem

cd $NWCHEM_TOP/src/basis
cp -r libraries /usr/local/NWChem/data

cd $NWCHEM_TOP/src/
cp -r data /usr/local/NWChem

cd $NWCHEM_TOP/src/nwpw
cp -r libraryps /usr/local/NWChem/data

ln -s /usr/local/NWChem/data/default.nwchemrc $HOME/.nwchemrc


I compiled with no error. However "nwchem: Command not found." was returned when I enter "nwchem h2osp.nw >& h2osp.out &".

Did I miss sth?

Thank you

Forum Vet
Since you re using Ubuntu 18.04, my suggestion is to try the packages available from the github site, instead of try to compile the source code.
Here are the installation instructions

sudo apt -y install mpi-default-bin libgfortran4 libopenblas-base \
libopenmpi2 libscalapack-openmpi2.0 openmpi-bin libquadmath0 \
libfabric1 libhwloc5 libibverbs1 libpsm-infinipath1 \
openmpi-common libhwloc-plugins libnl-route-3-200 \
ocl-icd-libopencl1  librdmacm1

wget https://github.com/nwchemgit/nwchem/releases/download/6.8.1-release/nwchem-data_6.8.1+133+gitge032219-2_all.ubuntu_bionic.deb

wget https://github.com/nwchemgit/nwchem/releases/download/6.8.1-release/nwchem_6.8.1+133+gitge032219-2_amd64.ubuntu_bionic.deb

sudo dpkg -i nwchem_6.8.1+133+gitge032219-2_amd64.ubuntu_bionic.deb \ 
nwchem-data_6.8.1+133+gitge032219-2_all.ubuntu_bionic.deb


Forum Vet
There is no problem to compile NWCHEM 6.8 source code successfully on Ubuntu 18.04.

Clicked A Few Times
Quote:Edoapra Jul 10th 5:24 pm
Since you re using Ubuntu 18.04, my suggestion is to try the packages available from the github site, instead of try to compile the source code.
Here are the installation instructions

sudo apt -y install mpi-default-bin libgfortran4 libopenblas-base \
libopenmpi2 libscalapack-openmpi2.0 openmpi-bin libquadmath0 \
libfabric1 libhwloc5 libibverbs1 libpsm-infinipath1 \
openmpi-common libhwloc-plugins libnl-route-3-200 \
ocl-icd-libopencl1  librdmacm1

wget https://github.com/nwchemgit/nwchem/releases/download/6.8.1-release/nwchem-data_6.8.1+133+gitge032219-2_all.ubuntu_bionic.deb

wget https://github.com/nwchemgit/nwchem/releases/download/6.8.1-release/nwchem_6.8.1+133+gitge032219-2_amd64.ubuntu_bionic.deb

sudo dpkg -i nwchem_6.8.1+133+gitge032219-2_amd64.ubuntu_bionic.deb \ 
nwchem-data_6.8.1+133+gitge032219-2_all.ubuntu_bionic.deb




It works.
Thank you!


Forum >> NWChem's corner >> Running NWChem