Custom HPC software & tools from Wirawan. Primarily tailored toward ODU HPC sytems.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.5 KiB

#!/bin/bash
#
# 20210414 - First version, forked off nwbuild04-ARMCI-MPI-internal-blas-lapack.sh
module load ucx/1.9 openmpi/3.1.4
#export NWCHEM_TOP=/opt/nwchem.build04c
# FOR TESTINGS --> shortcut to the above path due to path cannot exceed 64 chars :(
export NWCHEM_TOP=/scratch/wpurwant/BUILD/nwchem7/gcc7.3-openmpi3.1.4/nwchem.OPENIB # FOR TESTINGS
export NWCHEM_TOP=/scratch/wpurwant/.L/nwchem.OPENIB
export NWCHEM_MODULES="all" # skip "python"
export NWCHEM_TARGET=LINUX64
if false; then
COMPILER_DIR=$NWCHEM_TOP/compilers
mkdir -p $COMPILER_DIR
if ! test -e $COMPILER_DIR/gcc; then ln -sf $(which $CC) $COMPILER_DIR/gcc; fi
if ! test -e $COMPILER_DIR/g++; then ln -sf $(which $CXX) $COMPILER_DIR/g++; fi
if ! test -e $COMPILER_DIR/gfortran; then ln -sf $(which $FC) $COMPILER_DIR/gfortran; fi
# Make this THE path to find gcc, g++, and gfortran:
PATH=$COMPILER_DIR:$PATH
fi
# Override the compiler's names to point to the CONDA-provided toolchains
export CC=gcc
export CXX=g++
export FC=gfortran
echo PATH=$PATH
mkdir -p $NWCHEM_TOP
test -d $NWCHEM_TOP/src || tar -C $NWCHEM_TOP -xf /cm/shared/containers/srcs/nwchem/v7.0.0-release.tar.gz --strip-components=1
test -d $NWCHEM_TOP/src/tools/ga-5.7.1 || tar -C $NWCHEM_TOP/src/tools -xf /cm/shared/containers/srcs/nwchem/ga-5.7.1.tar.gz
# scale down: do not use external LAPACK or BLAS
export USE_MPI=y
export USE_NOIO=y
export USE_SCALAPACK=n
export USE_PYTHON64=n
# FORCE:
export USE_INTERNALBLAS=y
export ARMCI_NETWORK=OPENIB
export SCALAPACK_SIZE=8
export BLAS_SIZE=8
#export SCALAPACK="-lmkl_scalapack_ilp64 -lmkl_gf_ilp64 -lmkl_gnu_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -lgomp -lpthread -lm -ldl"
#export SCALAPACK_LIB="$SCALAPACK"
#export BLASOPT="-lmkl_gf_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl"
#export LAPACK_LIB=$BLASOPT
if false; then
export PYTHONHOME=/opt/conda
export PYTHONVERSION=2.7
(
cd /opt/conda/bin
ln -s python-config python2.7-config
)
fi
unset CFLAGS
unset CXXFLAGS
unset CPPFLAGS
unset FCFLAGS
unset FFLAGS
cd $NWCHEM_TOP/src
make nwchem_config
# Not needed anymore:
#sed -i config/makefile.h \
# -e 's:-i8:-fdefault-integer-8:'
echo "Compiler locations:"
echo "CC = $CC => $(which $CC)"
echo "FC = $FC => $(which $FC)"
echo "PATH = $PATH"
make