Skip to content

Instantly share code, notes, and snippets.

@sage-git
Created August 13, 2022 16:43
Show Gist options
  • Save sage-git/87cf4928e85da1287225d9d9e83c8c87 to your computer and use it in GitHub Desktop.
Save sage-git/87cf4928e85da1287225d9d9e83c8c87 to your computer and use it in GitHub Desktop.
NWChem build on WSL
#!/bin/bash
# preparation
# apt update
# apt upgrade
# apt install make python2.7 libopenblas-dev libelpa-dev libscalapack-openmpi-dev
# git clone https://github.com/nwchemgit/nwchem.git
# mv nwchem
# git checkout v7.0.2-relase
# put this file in "nwchem" directory and run
export NWCHEM_TOP=`pwd`
export USE_MPI=y
export MPI_DIR=/usr
#export FC=/usr/bin/mpif90
#export CC=/usr/bin/mpicc
export MPIEXEC=/usr/bin/mpirun
export NWCHEM_TARGET=LINUX64
export USE_PYTHONCONFIG=y
export PYTHONVERSION=2.7
export PYTHONHOME=/usr
export BLASOPT="-L/usr/lib/x86_64-linux-gnu -lopenblas"
export LAPACK_LIB=$BLASOPT
export LDFLAGS="-fno-lto" # can be removed?
export BLAS_SIZE=4
export USE_64TO32=y
export NWCHEM_MODULES="all python"
export USE_SCALAPACK=y
export SCALAPACK_SIZE=4
export SCALAPACK="-L/usr/lib/x86_64-linux-gnu"
export ELPA="-I/usr/lib/x86_64-linux-gnu -lelpa"
cd ${NWCHEM_TOP}/src
# make realclean -j12
make nwchem_config
make 64_to_32 -j12
make -j12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment