Partial Recompile NWChem

Partial Recompile NWChem

When you modify the code in $NWCHEM_TOP/src directory, you need to compile NWChem to make nwchem executable over the old one. NWChem consists of mamy million lines of code. This make NWChem is one of the biggest computational chemistry software. Full NWChem compilation normally takes 20 - 30 minutes, you can easily recompile NWChem within a few seconds/minutes, depending on how much you have modified the code. To do this, just use make and make link commands to install that particular modified fortran code and link a new executable.


Instruction Step-by-step

  • First, create the script that includes all necessary environment variables setting as if you are going to full compile NWChem.
  • Then nevigate to sub-directory where you have modified the code and then add the following commands to the recompile script
  • The updated nwchem execuable file can be found at bin directory.


Example

The following is command used to recompile NWChem with the Fortran code in $NWCHEM_TOP/src/nwdft/scf_dft directory is modified.

export USE_64TO32=y

cd $NWCHEM_TOP/src/nwdft/scf_dft
make

cd $NWCHEM_TOP/src
make link

ls -la $NWCHEM_TOP/bin/LINUX64/nwchem


P.S. export USE_64TO32=Y is needed for compilng program based on 32bit Libraries.


Rangsiman Ketkaew