Molpro 2021.3.1

Webpage

https://www.molpro.net/

Version

2021.3.1 (latest commit: 2021/11/23 17:31:27 +0100)

Build Environment

  • GCC 9.3.1 (devtoolset-9)
  • Intel Parallel Studio 2018 update4 (mkl and mpi)
  • Global Arrays Toolkit 5.8

Files Required

  • Molpro_release.tar.gz (downloaded Molpro_release directory was tar-gzipped.)
  • ga-5.8.tar.gz
  • work.patch
    • to change default work directory setting
  • patch-argos-binput.F
  • patch-cic-ItfFortranInt.h
  • patch-common_modules-common_cconf1
    • change parameters for huge CI calculations
  • patch-mpp-ga_impl_select
    • change default scratch file setting for single node runs from "disk" to "ga"
  • patch-common_modules-common_cftypes
  • patch-util-iom
  • patch-util-iow
    • work-around for character type "findloc" Fortran 2008 function
    • (On CentOS 7 + devtoolset-9 environment, shared link of molpro executable failed.)
  • secure_snprintf.patch
    • to avoid ga build error
  • token

Build Procedure

#!/bin/sh

GA_VERSION=5.8
GA_ARCHIVE=/home/users/${USER}/Software/GlobalArrays/${GA_VERSION}/ga-${GA_VERSION}.zip

MOLPRO_VERSION=2021.3.1
MOLPRO_DIRNAME=Molpro_release
PARALLEL=12
BASEDIR=/home/users/${USER}/Software/Molpro/${MOLPRO_VERSION}
MOLPRO_TARBALL=${BASEDIR}/${MOLPRO_DIRNAME}.tar.gz

PATCH_SNPRINTF=$BASEDIR/secure_snprintf.patch
PATCH0=${BASEDIR}/work.patch
PATCH1=${BASEDIR}/patch-argos-binput.F
PATCH2=${BASEDIR}/patch-cic-ItfFortranInt.h
PATCH3=${BASEDIR}/patch-common_modules-common_cconf1
PATCHX=${BASEDIR}/patch-mpp-ga_impl_select

PATCH10=${BASEDIR}/patch-common_modules-common_cftypes
PATCH11=${BASEDIR}/patch-util-iom
PATCH12=${BASEDIR}/patch-util-iow

TOKEN=${BASEDIR}/token

WORKDIR=/work/users/${USER}
GA_INSTALLDIR=${WORKDIR}/ga-temporary
INSTALLDIR=/local/apl/lx/molpro${MOLPRO_VERSION}

#------------------------------------------
umask 0022
ulimit -s unlimited

export LANG=
export LC_ALL=C
export OMP_NUM_THREADS=1

cd $WORKDIR
if [ -d ga-${GA_VERSION} ]; then
  mv ga-${GA_VERSION} ga_tmp
  rm -rf ga_tmp &
fi
if [ -d ga-temporary ]; then
  mv ga-temporary ga_tmp_tmp
  rm -rf ga_tmp_tmp &
fi
if [ -d ${MOLPRO_DIRNAME} ]; then
  mv ${MOLPRO_DIRNAME} molpro_tmp
  rm -rf molpro_tmp &
fi

module purge
module load scl/devtoolset-9
module load mkl/2018.0.4
module load mpi/intelmpi/2018.4.274

unzip -q ${GA_ARCHIVE}
#tar zxf ${GA_ARCHIVE}
cd ga-${GA_VERSION}

export CFLAGS="-mpc80"
export FFLAGS="-mpc80"
export FCFLAGS="-mpc80"
export CXXFLAGS="-mpc80"

export F77=mpif90
export F90=mpif90
export FC=mpif90
export CC=mpicc
export CXX=mpicxx
export MPIF77=mpif90
export MPICC=mpicc
export MPICXX=mpicxx
export GA_FOPT="-O3"
export GA_COPT="-O3"
export GA_CXXOPT="-O3"

# --with-ofi failed...
./autogen.sh
cp -f $PATCH_SNPRINTF autotools/m4-1.4.17/
cd $WORKDIR/ga-${GA_VERSION}
./autogen.sh
./configure --enable-i8 \
            --with-mpi3 \
            --prefix=${GA_INSTALLDIR}

make -j ${PARALLEL}
make check
make install
cp config.log ${GA_INSTALLDIR}

cd ../
tar zxf ${MOLPRO_TARBALL}
cd ${MOLPRO_DIRNAME}

patch -p0 < ${PATCH0}
patch -p0 < ${PATCH1}
patch -p0 < ${PATCH2}
patch -p0 < ${PATCH3}
patch -p0 < ${PATCHX}

patch -p0 < ${PATCH10}
patch -p0 < ${PATCH11}
patch -p0 < ${PATCH12}

export PATH="${GA_INSTALLDIR}/bin:$PATH" # where ga-config exists

CPPFLAGS="-I${GA_INSTALLDIR}/include" \
LDFLAGS="-L${GA_INSTALLDIR}/lib" \
    ./configure --prefix=${INSTALLDIR}

sed -i -e "s/^VERBOSE.*$/VERBOSE=/" CONFIG

make -j ${PARALLEL}
cp $TOKEN lib/.token

make tuning

MOLPRO_OPTIONS="" make quicktest
MOLPRO_OPTIONS=-n2 make test

Notes

  • (patch files are available at /local/apl/lx/molpro2021.3.1/patches)
  • one of ga tests failed as in the previous version.
  • all the molpro tests have passed successfully.
    • slater is disabled, since its test can't be passed.
  • Molpro 2021.2 or later employs "disk option" for scratch files of single node runs. However, local disk is not available in RCCS system; /wor/users is on network (lustre) filesystem. We thus change the default setting to the conventional memory one.
    • default "disk option" can be utilised by adding "--ga-impl disk" option.
  • some parameters (such as permissions) were modified after the installation (not mentioned in the procedure above)
  • On CentOS 7 + devtoolset-9 env, link of molpro.exe failed due to findloc for character type function (not very sure about this error, though).
    • we avoided this error by manually adding equivalent function to findloc of character type.
    • (instead of adding findloc equivalent, static linking of molpro.exe might be another solution (not tried))