Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base for librom-mgmol interface development #219

Merged
merged 13 commits into from
Apr 9, 2024
Merged
Prev Previous commit
librom-mgmol installation script for LC quartz.
dreamer2368 committed Apr 9, 2024
commit dcb21af1e9c099e985e790ca115237a07ddf51f6
68 changes: 37 additions & 31 deletions scripts/build_quartz_libROM.sh
Original file line number Diff line number Diff line change
@@ -1,55 +1,61 @@
##! /bin/csh -f
#!/bin/bash
## An example script to build on LLNL Peloton systems.
## For now, this script assumes intel/ mkl libraries are being used.

# load some modules
## load some modules
source scripts/modules.quartz

# set some environment variables. Set them explicitly or use loaded module path (preferred)
# Here we use an explicit path for scalapack to be consistent with the path for the blas libraries and avoid
# benign cmake warnings
#setenv SCALAPACK_ROOT /usr/tce/packages/mkl/mkl-2020.0/lib
setenv SCALAPACK_ROOT ${MKLROOT}
setenv HDF5_ROOT /usr/tce/packages/hdf5/hdf5-1.14.0-mvapich2-2.3.6-intel-2022.1.0

# We need to define the cmake blas vendor option here to find the right one.
set BLAS_VENDOR = Intel10_64lp

# manually set the location of BLACS libraries for scalapack
set BLACS_LIB = ${SCALAPACK_ROOT}/lib/intel64

set MGMOL_ROOT = `pwd`

set INSTALL_DIR = ${MGMOL_ROOT}/install_quartz
## set some environment variables. Set them explicitly or use loaded module path (preferred)
## Here we use an explicit path for scalapack to be consistent with the path for the blas libraries and avoid
## benign cmake warnings
##setenv SCALAPACK_ROOT /usr/tce/packages/mkl/mkl-2020.0/lib
#setenv SCALAPACK_ROOT ${MKLROOT}
#setenv HDF5_ROOT /usr/tce/packages/hdf5/hdf5-1.14.0-mvapich2-2.3.6-intel-2022.1.0
#
## We need to define the cmake blas vendor option here to find the right one.
#set BLAS_VENDOR = Intel10_64lp
#
## manually set the location of BLACS libraries for scalapack
#set BLACS_LIB = ${SCALAPACK_ROOT}/lib/intel64

MGMOL_ROOT="$(pwd)"

INSTALL_DIR=${MGMOL_ROOT}/install_quartz
mkdir -p ${INSTALL_DIR}

set BUILD_DIR = ${MGMOL_ROOT}/build_quartz
BUILD_DIR=${MGMOL_ROOT}/build_quartz
mkdir -p ${BUILD_DIR}
cd ${BUILD_DIR}

# clone the libROM GitHub repo in BUILD_DIR
set USE_LIBROM="On"
set LIBROM_PATH = ${BUILD_DIR}/libROM
USE_LIBROM="On"
LIBROM_PATH=${BUILD_DIR}/libROM
git clone https://github.com/LLNL/libROM
cd libROM
./scripts/compile.sh -t ./cmake/toolchains/default-toss_4_x86_64_ib-librom-dev.cmake
#./scripts/compile.sh -t ./cmake/toolchains/default-toss_4_x86_64_ib-librom-dev.cmake
./scripts/compile.sh
cd ${BUILD_DIR}

# call cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_Fortran_COMPILER=mpif77 \
-DMPIEXEC_NUMPROC_FLAG="-n" \
-DBLA_VENDOR=${BLAS_VENDOR} \
-DSCALAPACK_BLACS_LIBRARY=${BLACS_LIB}/libmkl_blacs_intelmpi_lp64.so \
cmake -DCMAKE_TOOLCHAIN_FILE=${MGMOL_ROOT}/cmake_toolchains/quartz.default.cmake \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DUSE_LIBROM=${USE_LIBROM} \
-DLIBROM_PATH=${LIBROM_PATH} \
-DCMAKE_BUILD_TYPE=DEBUG \
..

# -DCMAKE_CXX_COMPILER=mpic++ \
# -DCMAKE_Fortran_COMPILER=mpif77 \
# -DMPIEXEC_NUMPROC_FLAG="-n" \
# -DBLA_VENDOR=${BLAS_VENDOR} \
# -DSCALAPACK_BLACS_LIBRARY=${BLACS_LIB}/libmkl_blacs_intelmpi_lp64.so \
# -DCMAKE_BUILD_TYPE=DEBUG \

# call make install
make -j
make install
make -j 16
### Currently libROM does not have the installation procedure,
### so copying binary file to installation directory will disrupt the relative path to libROM.so,
### causing a run-time error.
#make install

# -DBLAS_LIBRARIES=/usr/tce/packages/mkl/mkl-2022.1.0/mkl/2022.1.0/lib/intel64/lib \
# -DLAPACK_LIBRARIES=/usr/tce/packages/mkl/mkl-2022.1.0/mkl/2022.1.0/lib/intel64/lib \
21 changes: 14 additions & 7 deletions scripts/modules.quartz
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
module load intel/2022.1.0
### choose either gcc or intel
#module load intel/2022.1.0
module load gcc/11.2.1

module load cmake
module load hdf5-parallel/1.14.0
#module load hdf5-parallel
#module load boost
module load mkl
module load cmake/3.14.5
module load boost

### choose either one
module load mkl-interfaces
#module load mkl

module load python
## manually add boost path
setenv LD_LIBRARY_PATH /usr/tce/packages/boost/boost-1.80.0-mvapich2-2.3.6-gcc-10.3.1/lib:$LD_LIBRARY_PATH

### manually add boost path
#setenv LD_LIBRARY_PATH /usr/tce/packages/boost/boost-1.80.0-mvapich2-2.3.6-gcc-10.3.1/lib:$LD_LIBRARY_PATH

#setenv MKLROOT $LIBRARY_PATH
#setenv MKLROOT /usr/tce/packages/mkl/mkl-2022.1.0/mkl/2022.1.0