Molpro 2022.3.0 (mvapich)

Webpage

https://www.molpro.net/

Version

2022.3.0

Build Environment

  • GCC 10.3.1 (gcc-toolset-10)
  • GCC 11.2.1 (gcc-toolset-11)
  • MVAPICH 2.3.7
  • openblas 0.3.15 (of Rocky Linux 8)

Files Required

  • molpro-2022.3.0.tar.gz
  • ga-5.8.2.tar.gz
  • work.patch
  • patch-argos-binput.F
  • patch-cic-ItfFortranInt.h
  • patch-common_modules-common_cconf1
    • Patch files are copied to /apl/molpro/2022.3.0/patches.
  • token

Build Procedure

#!/bin/sh

GA_VERSION=5.8.2
GA_ARCHIVE=/home/users/${USER}/Software/GlobalArrays/${GA_VERSION}/ga-${GA_VERSION}.tar.gz

MOLPRO_VERSION=2022.3.0
MOLPRO_DIRNAME=molpro-${MOLPRO_VERSION}
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

TOKEN=${BASEDIR}/token

WORKDIR=/gwork/users/${USER}
GA_INSTALLDIR=${WORKDIR}/ga-temporary
INSTALLDIR=/apl/molpro/${MOLPRO_VERSION}-mva

#------------------------------------------
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 gcc-toolset/10
module load mvapich/2.3.7/gcc11

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"

./autogen.sh
./configure --enable-i8 \
            --with-mpi-pr \
            --prefix=${GA_INSTALLDIR}

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

module switch gcc-toolset/11

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

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

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

CPPFLAGS="-I${GA_INSTALLDIR}/include -I/usr/include/openblas" \
LDFLAGS="-L${GA_INSTALLDIR}/lib" \
    ./configure --prefix=${INSTALLDIR} \
                --with-lapack="-L/usr/lib64 -lopenblas" \
                --enable-slater

sed -i -e "s/-J\.//" build/Makefile # ?

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

make tuning

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

make install

Notes

  • Unlike hpc-x (openmpi) version, this version works fine when disk option is active.
    • HPC-X 2.13.1, HPC-X 2.11, or Intel MPI 2021.7.1 version hangs when disk option is enabled. (In case of IMPI 2021.7.1, job freezes immediately after start running. In case of HPC-X, job freezes randomly(?).)
      • In case of HPC-X, job often freezes in the libhcoll routine. However, disabling libhcoll (add "-mca coll_hcoll_enable 0" to mpirun) did not help.
    • In case of Open MPI 3.1.6, disk options works without problem. However, another error message is constantly shown. (This probably does not affect results, though.)
    • Intel MPI 2021.5.1, 2021.8.0, and 2021.9.0 are free from this issue. The problem occurs only when runtime library of Intel MPI 2021.7.1 is used.
    • If you don't use disk option (add "--ga-impl ga" option to molpro), those freezes do not happen even when those problematic versions are employed.