From b97592a8c7035ab3c4ca71f8a0909f47b7d53c07 Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Wed, 14 Apr 2021 11:36:44 -0400 Subject: [PATCH] * Copied "build04" nwchem build script from ODU container repo. This is taken from commit #a278c9cb246fc267f93018e607856c1141942d32 from ODU container repo. No changes were made at all. --- ...wbuild04-ARCMI-MPI-internal-blas-lapack.sh | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100755 wahab/builds/nwchem/nwbuild04-ARCMI-MPI-internal-blas-lapack.sh diff --git a/wahab/builds/nwchem/nwbuild04-ARCMI-MPI-internal-blas-lapack.sh b/wahab/builds/nwchem/nwbuild04-ARCMI-MPI-internal-blas-lapack.sh new file mode 100755 index 0000000..f373d0c --- /dev/null +++ b/wahab/builds/nwchem/nwbuild04-ARCMI-MPI-internal-blas-lapack.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# +# 20210401 - First version, forked off nwbuild03-ARMCI-MPI.sh +# 20210407 - Updated to use basic compiler insteead of MPI wrapper + + source /etc/container_runtime/buildtime + +# WORK_DIR=$(mktemp -d /tmp/install.XXXX) +# cd $WORK_DIR + + load_mpich + + # nwchem build system requires basic compilers instead of mpiXXX compiler wrapper + load_conda + export CC=x86_64-conda_cos6-linux-gnu-gcc + export CXX=x86_64-conda_cos6-linux-gnu-g++ + export FC=x86_64-conda_cos6-linux-gnu-gfortran + + export NWCHEM_TOP=/opt/nwchem.build04c + export NWCHEM_MODULES="all python" + export NWCHEM_TARGET=LINUX64 + + 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 + # Override the compiler's names to point to the CONDA-provided toolchains + export CC=gcc + export CXX=g++ + export FC=gfortran + echo PATH=$PATH + + test -d $NWCHEM_TOP/src || lazy_unarchive $NWCHEM_TOP /cm/shared/containers/srcs/nwchem/v7.0.0-release.tar.gz 1 + test -d $NWCHEM_TOP/src/tools/ga-5.7.1 || lazy_unarchive $NWCHEM_TOP/src/tools /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=y + # FORCE: + export USE_INTERNALBLAS=y + + export ARMCI_NETWORK=ARMCI + + 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 + + export PYTHONHOME=/opt/conda + export PYTHONVERSION=2.7 + + unset CFLAGS + unset CXXFLAGS + unset CPPFLAGS + unset FCFLAGS + unset FFLAGS + + export LDFLAGS="-L /opt/conda/lib" # -L /opt/armci-mpi/lib" + #export CFLAGS="-I /opt/armci-mpi/include" + #export CXXFLAGS="-I /opt/armci-mpi/include" + # https://wiki.mpich.org/armci-mpi/index.php/NWChem + #export EXTERNAL_ARMCI_PATH=/opt/nwchem.ARMCI/external-armci # /armci-mpi + # without -lpthread it failed to detect armci + # Hack the link option so that libpthread is included after armci + export EXTERNAL_ARMCI_PATH="/opt/armci-mpi\\ -larmci\\ -lpthread" + # Not needed anymore: + #export PATH=/opt/conda/bin:$PATH + + cd /opt/conda/bin + ln -s python-config python2.7-config + + 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