Pages

12 June 2013

449. Nwchem 6.3 -- updated sources. Compiling on Debian

The previous post uses the sources from the 17th of May.


What's new?
Maybe it's just me, but I can't find any obvious location where they list the differences between the 28th of June and the 17th of June releases. In fact, I wouldn't have known that there was a new version out unless someone had specifically pointed it out to me.

Anyway, luckily there's diff. There were more changes than the ones I'm showing below, but most of them were minor ones such as .stamp files and a re-done pair of QA test output files.
  1 Only in nwchem-6.3-src.2013-05-28/QA/tests: rodft-cam
  2 diff -r nwchem-6.3-src.2013-05-17/src/nwdft/scf_dft/dft_canorg.F nwchem-6.3-src.2013-05-28/src/nwdft/scf_dft/dft_canorg.F
  3 6c6
  4 < c     $Id: dft_canorg.F 23846 2013-03-19 04:08:25Z edo $
  5 ---
  6 > c     $Id: dft_canorg.F 24271 2013-05-24 06:48:33Z niri $
  7 279c279,280
  8 <          if(iter.ge.nfock/2)iswitc = iswitc+1
  9 ---
 10 >          if(iter.ge.nfock/2) iswitc = iswitc+1
 11 >          if(abs(delta).lt.1d-6) iswitc = iswitc+2
 12 diff -r nwchem-6.3-src.2013-05-17/src/nwdft/scf_dft/dft_scf.F nwchem-6.3-src.2013-05-28/src/nwdft/scf_dft/dft_scf.F
 13 9c9
 14 < c     $Id: dft_scf.F 23988 2013-04-08 23:06:52Z d3y133 $
 15 ---
 16 > c     $Id: dft_scf.F 24269 2013-05-24 00:55:11Z edo $
 17 819c819
 18 <          iswitc = 1
 19 ---
 20 >          iswitc = 2
 21 diff -r nwchem-6.3-src.2013-05-17/src/nwdft/scf_dft_cg/dft_roks_fock.F nwchem-6.3-src.2013-05-28/src/nwdft/scf_dft_cg/dft_roks_fock.F
 22 6c6
 23 < * $Id: dft_roks_fock.F 23999 2013-04-10 18:23:02Z d3y133 $
 24 ---
 25 > * $Id: dft_roks_fock.F 24274 2013-05-24 07:34:16Z niri $
 26 102c102
 27 <       double precision edisp    ! [input] dispersion corrrection
 28 ---
 29 >       double precision Edisp    ! [input] dispersion correction
 30 107c107
 31 <       double precision errmax, ebq
 32 ---
 33 >       double precision errmax, Ebq
 34 124c124
 35 <       integer g_tmp(2)
 36 ---
 37 >       integer g_tmp(nset)
 38 326a327,335
 39 >         call ga_zero(g_tmp(1))
 40 >         if (nopen.gt.0) then
 41 >           g_tmp(2) = ga_create_atom_blocked(geom, basis,
 42 >      $                                      'dft_roks_fock: tmp2')
 43 >           g_tmp(3) = ga_create_atom_blocked(geom, basis,
 44 >      $                                      'dft_roks_fock: tmp3')
 45 >           call ga_zero(g_tmp(2))
 46 >           call ga_zero(g_tmp(3))
 47 >         endif
 48 330d338
 49 <         call ga_zero(g_tmp(1))
 50 339c347
 51 <      $     tol2e, oskel, iv_dens, g_tmp(1), .false., .false.)
 52 ---
 53 >      $     tol2e, oskel, iv_dens, g_tmp, .false., .false.)
 54 340a349,352
 55 >         if (nopen.gt.0) then
 56 >           call ga_dadd(1d0,iv_fock(2),1d0,g_tmp(2),iv_fock(2))
 57 >           call ga_dadd(1d0,iv_fock(3),1d0,g_tmp(3),iv_fock(3))
 58 >         endif
 59 344a357,360
 60 >         if (nopen.gt.0) then
 61 >           call ga_zero(g_tmp(2))
 62 >           call ga_zero(g_tmp(3))
 63 >         endif
 64 353c369
 65 <      $     tol2e, oskel, iv_dens, g_tmp(1), .false., .true.)
 66 ---
 67 >      $     tol2e, oskel, iv_dens, g_tmp, .false., .true.)
 68 354a371,374
 69 >         if (nopen.gt.0) then
 70 >           call ga_dadd(1d0,iv_fock(2),1d0,g_tmp(2),iv_fock(2))
 71 >           call ga_dadd(1d0,iv_fock(3),1d0,g_tmp(3),iv_fock(3))
 72 >         endif
 73 358a379,385
 74 >         if (nopen.gt.0) then
 75 >           if (.not. ga_destroy(g_tmp(2))) call errquit
 76 >      $               ('xc_getv: ga corrupt?',0, GA_ERR)
 77 >           if (.not. ga_destroy(g_tmp(3))) call errquit
 78 >      $               ('xc_getv: ga corrupt?',0, GA_ERR)
 79 >         endif
 80 > c
 81 383c410
 82 <       etwo = etwo_closed + etwo_open + edisp
 83 ---
 84 >       etwo = etwo_closed + etwo_open + Edisp
 85 diff -r nwchem-6.3-src.2013-05-17/src/tools/GNUmakefile nwchem-6.3-src.2013-05-28/src/tools/GNUmakefile
 86 342a343,346
 87 > ifeq ($(ARMCI_NETWORK),SOCKETS)
 88 >         MAYBE_ARMCI = --with-sockets
 89 > endif # SOCKETS
 90 >
 91 Only in nwchem-6.3-src.2013-05-28/src/util: util_ga_version.F
 92 diff -r nwchem-6.3-src.2013-05-17/src/util/util_nwchem_version.F nwchem-6.3-src.2013-05-28/src/util/util_nwchem_version.F
 93 4c4
 94 <       nwrev="24252"
 95 ---
 96 >       nwrev="24277"

The section in red is the Iswtch.patch in http://verahill.blogspot.com.au/2013/05/424-nwchem-63-on-debian-wheezy.html.

I'm guessing that this patch is also included: http://www.nwchem-sw.org/index.php/Special:AWCforum/st/id840/rodft_and_range_separated-functi....html
I've indicated it in blue.

Purple is probably to make sure that SOCKETS gets implemented correctly -- there were issues with that before.

I f I were to guess I'd say that if you compiled nwchem as shown here: http://verahill.blogspot.com.au/2013/05/424-nwchem-63-on-debian-wheezy.html
AND if you are not going to use CAM with open-shell molecules, then you are not in a hurry to recompile.

The former issue is manifested in slow run times, while the second issue is manifested in crashing calculations, so neither should be able to fly under the radar.

Anyway

The GabEdit Patch
The following patch allows you to use GabEdit as a GUI to nwchem, and allows you to compile nwchem with python support.
Copy the following and paste it into a file, e.g. 6.3.patch, and put it into /opt/nwchem/nwchem-6.3-src.2013-05-28:

diff -rupN src.original/config/makefile.h src/config/makefile.h
--- src.original/config/makefile.h      2013-04-15 12:41:45.016853322 +1000
+++ src/config/makefile.h       2013-04-15 12:38:44.933319544 +1000
@@ -2039,7 +2039,7 @@ endif
 
      ifeq ($(BUILDING_PYTHON),python)
 #   EXTRA_LIBS += -ltk -ltcl -L/usr/X11R6/lib -lX11 -ldl
-     EXTRA_LIBS +=    -lnwcutil  -lpthread -lutil -ldl
+     EXTRA_LIBS +=    -lnwcutil  -lpthread -lutil -ldl -lssl -lz
   LDOPTIONS = -Wl,--export-dynamic 
      endif
 ifeq ($(NWCHEM_TARGET),CATAMOUNT)
diff -rupN src.original/ddscf/movecs_pr_anal.F src/ddscf/movecs_pr_anal.F
--- src.original/ddscf/movecs_pr_anal.F 2013-04-15 12:41:45.036852381 +1000
+++ src/ddscf/movecs_pr_anal.F  2013-04-15 12:23:28.100409225 +1000
@@ -195,7 +195,7 @@ c
  22         format(1x,2('  Bfn.  Coefficient  Atom+Function  ',5x))
             write(LuOut,23)
  23         format(1x,2(' ----- ------------  ---------------',5x))
-            do klo = 0, min(n-1,9), 2
+            do klo = 0, min(n-1,199), 2
                khi = min(klo+1,n-1)
                write(LuOut,2) (
      $              int_mb(k_list+k)+1, 
diff -rupN src.original/ddscf/rohf.F src/ddscf/rohf.F
--- src.original/ddscf/rohf.F   2013-04-15 12:41:45.036852381 +1000
+++ src/ddscf/rohf.F    2013-04-15 12:23:28.100409225 +1000
@@ -153,7 +153,7 @@ c
             ilo = 1
             ihi = nmo
          endif
-         call movecs_print_anal(basis, ilo, ihi, 0.15d0, g_movecs, 
+         call movecs_print_anal(basis, ilo, ihi, 0.01d0, g_movecs, 
      $        'ROHF Final Molecular Orbital Analysis', 
      $        .true., dbl_mb(k_eval), oadapt, int_mb(k_irs),
      $        .true., dbl_mb(k_occ))
diff -rupN src.original/ddscf/scf_vec_guess.F src/ddscf/scf_vec_guess.F
--- src.original/ddscf/scf_vec_guess.F  2013-04-15 12:41:45.036852381 +1000
+++ src/ddscf/scf_vec_guess.F   2013-04-15 12:23:28.100409225 +1000
@@ -511,19 +511,19 @@ c
          nprint = min(nclosed+nopen+30,nmo)
          if (scftype.eq.'RHF' .or. scftype.eq.'ROHF') then
             call movecs_print_anal(basis, 1,
-     &           nprint, 0.15d0, g_movecs, 
+     &           nprint, 0.01d0, g_movecs, 
      &           'ROHF Initial Molecular Orbital Analysis', 
      &           .true., dbl_mb(k_eval), oadapt, int_mb(k_irs),
      &           .true., dbl_mb(k_occ))
          else
             nprint = min(nalpha+20,nmo)
             call movecs_print_anal(basis, max(1,nbeta-20),
-     &           nprint, 0.15d0, g_movecs, 
+     &           nprint, 0.01d0, g_movecs, 
      &           'UHF Initial Alpha Molecular Orbital Analysis', 
      &           .true., dbl_mb(k_eval), oadapt, int_mb(k_irs),
      &           .true., dbl_mb(k_occ))
             call movecs_print_anal(basis, max(1,nbeta-20),
-     &           nprint, 0.15d0, g_movecs(2), 
+     &           nprint, 0.01d0, g_movecs(2), 
      &           'UHF Initial Beta Molecular Orbital Analysis', 
      &           .true., dbl_mb(k_eval+nbf), oadapt, int_mb(k_irs+nmo),
      &           .true., dbl_mb(k_occ+nbf))
diff -rupN src.original/ddscf/uhf.F src/ddscf/uhf.F
--- src.original/ddscf/uhf.F    2013-04-15 12:41:45.036852381 +1000
+++ src/ddscf/uhf.F     2013-04-15 12:23:28.096409414 +1000
@@ -144,11 +144,11 @@ C
          enddo
          ihi = max(ihi-1,1)
  9611    continue
-         call movecs_print_anal(basis, ilo, ihi, 0.15d0, g_movecs, 
+         call movecs_print_anal(basis, ilo, ihi, 0.01d0, g_movecs, 
      $        'UHF Final Alpha Molecular Orbital Analysis', 
      $        .true., dbl_mb(k_eval), oadapt, int_mb(k_irs),
      $        .true., dbl_mb(k_occ))
-         call movecs_print_anal(basis, ilo, ihi, 0.15d0, g_movecs(2), 
+         call movecs_print_anal(basis, ilo, ihi, 0.01d0, g_movecs(2), 
      $        'UHF Final Beta Molecular Orbital Analysis', 
      $        .true., dbl_mb(k_eval+nbf), oadapt, int_mb(k_irs+nmo),
      $        .true., dbl_mb(k_occ+nbf))
diff -rupN src.original/mcscf/mcscf.F src/mcscf/mcscf.F
--- src.original/mcscf/mcscf.F  2013-04-15 12:41:45.000854073 +1000
+++ src/mcscf/mcscf.F   2013-04-15 12:23:23.748613695 +1000
@@ -719,7 +719,7 @@ c
       if (util_print('final vectors analysis', print_default))
      $     call movecs_print_anal(basis, 
      $     max(1,nclosed-10), min(nbf,nclosed+nact+10),
-     $     0.15d0, g_movecs, 'Analysis of MCSCF natural orbitals',
+     $     0.01d0, g_movecs, 'Analysis of MCSCF natural orbitals',
      $     .true., dbl_mb(k_evals), .true., int_mb(k_sym), 
      $     .true., dbl_mb(k_occ))
 c     
diff -rupN src.original/nwdft/scf_dft/dft_mxspin_ovlp.F src/nwdft/scf_dft/dft_mxspin_ovlp.F
--- src.original/nwdft/scf_dft/dft_mxspin_ovlp.F        2013-04-15 12:41:45.604825677 +1000
+++ src/nwdft/scf_dft/dft_mxspin_ovlp.F 2013-04-15 12:23:28.228403211 +1000
@@ -184,14 +184,14 @@ c
       call ga_sync()
 c
       call movecs_print_anal(basis,int_mb(k_non),int_mb(k_non)
-     & ,0.15d0,g_alpha,'Alpha Orbitals without Beta Partners',
+     & ,0.01d0,g_alpha,'Alpha Orbitals without Beta Partners',
      &   .false., 0.0 ,.false., 0 , .false., 0 )
 c
       if (nct.GE.2) then
       do i = 2,nct
       ind = int_mb(k_non+i-1)
       call movecs_print_anal(basis,ind,ind
-     & ,0.15d0,g_alpha,' ',
+     & ,0.01d0,g_alpha,' ',
      &   .false., 0.0 ,.false., 0 , .false., 0 )
       enddo
       endif
@@ -350,7 +350,7 @@ c      endif
 c      endif
 c 9990 format(/,18x,'THERE ARE',i3,1x,'UN-PARTNERED ALPHA ORBITALS')
 c
-       call movecs_print_anal(basis, 1, nalp, 0.15d0, g_ualpha,
+       call movecs_print_anal(basis, 1, nalp, 0.01d0, g_ualpha,
      & 'Alpha Orb. w/o Beta Partners (after maxim. alpha/beta overlap)',
      &   .false., 0.0 ,.false., 0 , .false., 0 )
 c
diff -rupN src.original/nwdft/scf_dft/dft_scf.F src/nwdft/scf_dft/dft_scf.F
--- src.original/nwdft/scf_dft/dft_scf.F        2013-04-15 12:41:45.608825490 +1000
+++ src/nwdft/scf_dft/dft_scf.F 2013-04-15 12:23:28.228403211 +1000
@@ -1774,7 +1774,7 @@ c
             else
                blob='DFT Final Beta Molecular Orbital Analysis' 
             endif
-            call movecs_print_anal(ao_bas_han, ilo, ihi, 0.15d0, 
+            call movecs_print_anal(ao_bas_han, ilo, ihi, 0.01d0, 
      &           g_movecs(ispin), 
      &           blob, 
      &           .true., dbl_mb(k_eval(ispin)), oadapt, 
diff -rupN src.original/nwdft/scf_dft_cg/dft_cg_solve.F src/nwdft/scf_dft_cg/dft_cg_solve.F
--- src.original/nwdft/scf_dft_cg/dft_cg_solve.F        2013-04-15 12:41:45.612825303 +1000
+++ src/nwdft/scf_dft_cg/dft_cg_solve.F 2013-04-15 12:23:28.220403588 +1000
@@ -183,7 +183,7 @@ c
             blob = 'DFT Final Beta Molecular Orbital Analysis'
           endif
           call movecs_fix_phase(g_movecs(ispin))
-          call movecs_print_anal(basis, ilo, ihi, 0.15d0,
+          call movecs_print_anal(basis, ilo, ihi, 0.01d0,
      &         g_movecs(ispin),blob,
      &         .true., dbl_mb(k_eval+(ispin-1)*nbf),
      &         oadapt, int_mb(k_irs+(ispin-1)*nbf),




Compiling nwchem
First install ACML or OpenBlas:
http://verahill.blogspot.com.au/2013/05/423-openblas-on-debian-wheezy.html
http://verahill.blogspot.com.au/2013/05/422-set-up-acml-on-linux.html


sudo apt-get install build-essential gfortran python2.7-dev libopenmpi-dev openmpi-bin
sudo mkdir /opt/nwchem -p
sudo chown $USER:$USER /opt/nwchem
cd /opt/nwchem
wget http://www.nwchem-sw.org/download.php?f=Nwchem-6.3.revision1-src.2013-05-28.tar.gz -O Nwchem-6.3.revision1-src.2013-05-28.tar.gz
tar xvf Nwchem-6.3.revision1-src.2013-05-28.tar.gz
cd nwchem-6.3-src.2013-05-28/

Apply the Gabedit patch:
patch -p0 < 6.3.patch 
patching file src/config/makefile.h patching file src/ddscf/movecs_pr_anal.F patching file src/ddscf/rohf.F patching file src/ddscf/scf_vec_guess.F patching file src/ddscf/uhf.F patching file src/mcscf/mcscf.F patching file src/nwdft/scf_dft/dft_mxspin_ovlp.F patching file src/nwdft/scf_dft/dft_scf.F patching file src/nwdft/scf_dft_cg/dft_cg_solve.F

export NWCHEM_TOP=`pwd`
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONVERSION=2.7
export PYTHONHOME=/usr
export BLASOPT="-L/opt/acml/acml5.3.1/gfortran64_int64/lib -lacml"
#export BLASOPT="-L/opt/openblas/lib -lopenblas"

export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBRARY_PATH="$LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/acml/acml5.3.1/gfortran64_int64/lib"
#export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/openblas/lib

export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
export ARMCI_NETWORK=SOCKETS

cd $NWCHEM_TOP/src

make clean
make nwchem_config
make FC=gfortran 1> make.log 2>make.err

cd $NWCHEM_TOP/contrib
export FC=gfortran
./getmem.nwchem

Comment out the bold parts and uncomment the commented parts to compile with openblas instead of ACML e.g. if you're compiling on an intel machine instead of AMD.

Setting up your ~/.bashrc
As usual, do
echo 'export NWCHEM_EXECUTABLE=/opt/nwchem/nwchem-6.3-src.2013-05-28/bin/LINUX64/nwchem' >> ~/.bashrc
echo 'export NWCHEM_BASIS_LIBRARY=/opt/nwchem/nwchem-6.3-src.2013-05-28/src/basis/libraries/' >> ~/.bashrc
echo 'export PATH=$PATH:/opt/nwchem/nwchem-6.3-src.2013-05-28/bin/LINUX64' >> ~/.bashrc

Also, put a .nwchemrc in your home folder:
nwchem_basis_library /opt/nwchem/nwchem-6.3-src.2013-05-28/src/basis/libraries/
ffield amber
amber_1 /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/amber_s/
amber_2 /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/amber_x/
amber_3 /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/amber_q/
amber_4 /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/amber_u/
amber_5 /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/custom/
spce /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/solvents/spce.rst
charmm_s /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/charmm_s/
charmm_x /opt/nwchem/nwchem-6.3-src.2013-05-28/src/data/charmm_x/

You're done.

No comments:

Post a Comment