OpenMolcas v24.10
ウェブページ
https://gitlab.com/Molcas/OpenMolcas
バージョン
v24.10
ビルド環境
- GCC 9.2.1
- Intel MKL 2023.2.0
- HPC-X 2.13 (Open MPI 4.1.5)
ビルドに必要なファイル
- OpenMolcas.tar.gz (git clone したディレクトリを tar.gz 化)
- ga-5.8.2.tar.gz
- drvefp.patch
--- drvefp.F90 2024-11-01 13:35:56.000000000 +0900
+++ drvefp.diff 2024-11-06 16:22:58.000000000 +0900
@@ -19,7 +19,7 @@
use EFP_Module, only: Coor_Type, EFP_Coors, EFP_Instance, FRAG_Type, nEFP_FRAGMENTS
use EFP, only: EFP_Add_Fragment, EFP_Add_Potential, EFP_Create, EFP_Get_Frag_Atom_Count, EFP_Prepare, &
EFP_Set_Electron_Density_Field_FN, EFP_Set_Frag_Coordinates
-use Definitions, only: wp, iwp
+use Definitions, only: wp, iwp, u6
implicit none
logical(kind=iwp), intent(in) :: First
- molcas_electron_density_field_fn.patch
--- molcas_electron_density_field_fn.F90 2024-11-01 13:35:56.000000000 +0900
+++ molcas_electron_density_field_fn.diff 2024-11-06 16:27:09.000000000 +0900
@@ -63,6 +63,8 @@
Molcas_ELECTRON_DENSITY_FIELD_FN = EFP_RESULT_SUCCESS
+end function Molcas_ELECTRON_DENSITY_FIELD_FN
+
#elif ! defined (EMPTY_FILES)
! Some compilers do not like empty files
ビルド手順
GlobalArrays
#!/bin/sh
set -eGA_VERSION=5.8.2
GA_DIR=/home/users/${USER}/Software/ga/${GA_VERSION}
GA_SOURCE=${GA_DIR}/v${GA_VERSION}.tar.gzWORKDIR=/gwork/users/${USER}
INSTALLDIR=/apl/openmolcas/v24.10/ga-5.8.2#---------------------------------------------------------------------
if [ ! -f "${GA_SOURCE}" ]; then
echo "Error: Source file ${GA_SOURCE} not found"
exit 1
fiumask 0022
ulimit -s unlimited
export LANG=
export LC_ALL=C
export OMP_NUM_THREADS=1cd $WORKDIR
if [ -d ga-${GA_VERSION} ]; then
echo "Removing existing build directory..."
mv ga-${GA_VERSION} ga_tmp
rm -rf ga_tmp &
fi# Load required modules
echo "Loading required modules..."
module purgemodule -s load gcc-toolset/9
module -s load mkl/2023.2.0
module -s load openmpi/4.1.5-hpcx/gcc9# Quick check for MPI compiler
if ! command -v mpicc >/dev/null 2>&1; then
echo "Error: MPI compilers not found after loading modules"
exit 1
fi# Extract source
echo "Extracting source code..."
tar zxf ${GA_SOURCE}
cd ga-${GA_VERSION}# Set compilation environment
export F77=mpif90 F90=mpif90 FC=mpif90
export CC=mpicc CXX=mpicxx
export MPIF77=mpif90 MPICC=mpicc MPICXX=mpicxx
export GA_FOPT="-O3" GA_COPT="-O3" GA_CXXOPT="-O3"# Build and install
echo "Running autogen..."
sh autogen.shecho "Configuring..."
./configure --with-blas8=-mkl \
--with-scalapack8=-mkl \
--with-openib \
--enable-i8 \
--prefix=${INSTALLDIR}echo "Building with ${PARALLEL} parallel jobs..."
make -j ${PARALLEL}echo "Installing..."
make installecho "Running tests..."
make check# Save build configuration
echo "Saving configuration log..."
cp config.log ${INSTALLDIR}echo "Installation completed successfully"
OpenMolcas
#!/bin/sh
VERSION=v24.10
SOURCEDIR=/home/users/${USER}/Software/openmolcas/${VERSION}
TARBALL=${SOURCEDIR}/OpenMolcas.tar.gz
INSTALL_DIR=/apl/openmolcas/${VERSION}
GAROOT=${INSTALL_DIR}/ga-5.8.2
PARALLEL=1
WORKDIR=/gwork/users/${USER}
VERIFYTMP=/gwork/users/${USER}/openmolcas-tmp-${VERSION}-gcc9-openib# Check if required files exist
if [ ! -f "${TARBALL}" ]; then
echo "Error: Tarball not found at ${TARBALL}"
exit 1
fiPATCH=${SOURCEDIR}/cmakelists.patch
export GAROOT#--------------------------------------------------------
umask 0022
ulimit -s unlimited
export LANG=
export LC_ALL=C
export MOLCAS_TIMELIM=1800module purge
module -s load gcc-toolset/9
module -s load mkl/2023.2.0
module -s load openmpi/4.1.5-hpcx/gcc9cd $WORKDIR || exit 1
if [ -d OpenMolcas ]; then
mv OpenMolcas OpenMolcas_tmp
rm -rf OpenMolcas_tmp &
fitar zxf ${TARBALL} || { echo "Failed to extract tarball"; exit 1; }
cd OpenMolcas || exit 1Git submodule updates with error checking
for module in "External/libmsym" "External/efp" "External/libwfa"; do
echo "Updating submodule: $module"
git submodule update --init $module || { echo "Failed to update submodule: $module"; exit 1; }
donesed -i -e "/environ/s/= 1/= '1'/" \
-e "/environ/s/= opt\['parallel'\]/= str(opt['parallel'])/" \
sbin/verifycd src/integral_util/
patch < ${SOURCEDIR}/drvefp.patch
patch < ${SOURCEDIR}/molcas_electron_density_field_fn.patch
cd -mkdir -p build && cd build || exit 1
export FC=mpif90
export CC=mpicc
export CXX=mpicxx
PYTHONEXE=/usr/bin/python3.6
PYTHONINC=/usr/include/python3.6
PYTHONLIB=/usr/lib64/python3.6Check if Python executable exists
if [ ! -f "${PYTHONEXE}" ]; then
echo "Error: Python executable not found at ${PYTHONEXE}"
exit 1
ficmake .. -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DMPI_Fortran_COMPILER=${FC} \
-DMPI_C_COMPILER=${CC} \
-DMPI_CXX_COMPILER=${CXX} \
-DPython_EXECUTABLE=${PYTHONEXE} \
-DPython_INCLUDE_DIR=${PYTHONINC} \
-DPython_LIBRARY=${PYTHONLIB} \
-DMPI=ON \
-DGA=ON \
-DOPENMP=ON \
-DLINALG=MKL \
-DHDF5=ON \
-DTOOLS=ON \
-DFDE=ON \
-DEFPLIB=ON \
-DMSYM=ON \
-DNEVPT2=OFF \
-DDMRG=OFF \
-DWFA=ON || { echo "CMake configuration failed"; exit 1; }make -j${PARALLEL} || { echo "Make failed"; exit 1; }
mkdir -p ${VERIFYTMP}
export OMP_NUM_THREADS=2
time ./pymolcas verify --parallel 4 --tmp ${VERIFYTMP}make install || { echo "Installation failed"; exit 1; }
echo "Installation completed successfully"
テスト
並列版(4 MPI, 2 OpenMP を指定)は以下のテストでエラー
- additional:221: rank 2のプロセスで浮動小数点例外(Floating point exception)が発生
- additional:826: INTERNAL ERROR
- grayzone:898: 結果がリファレンスと大きく異なっている
メモ
- テスト結果のコピーは /apl/openmolcas/v24.10/test_results にあります。