-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base for librom-mgmol interface development (#219)
* changed the Signal.h header file name. * additional routine to find scalapack library, if nothing is found. * ci workflow with test and format * changed branch name * ctest verbose * added --oversubscribe to cmake MPIEXEC_PREFLAGS variable. * parallel hdf5 package fix. also librom is included. * ci workflow only checks the first 20 tests. * minor fix * rom-fpmd driver and librom dependency in cmake. librom must be compiled before mgmol cmake. * cmake fix and toolchain file for LC quartz. * bug fix on FindSCALAPACK.cmake * librom-mgmol installation script for LC quartz.
- Loading branch information
1 parent
f7e1f22
commit 5ec2dbe
Showing
15 changed files
with
274 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
pull_request: | ||
types: [opened, labeled, synchronize] | ||
branches: | ||
- release | ||
- 'ROMFPMD' | ||
# push: | ||
# branches: | ||
# - release | ||
|
@@ -25,23 +25,48 @@ jobs: | |
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- name: Set Swap Space | ||
uses: pierotofy/set-swap-space@master | ||
with: | ||
swap-size-gb: 10 | ||
- name: Check out pylibROM | ||
# - name: Set Swap Space | ||
# uses: pierotofy/set-swap-space@master | ||
# with: | ||
# swap-size-gb: 10 | ||
- name: Check out mgmol | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: 'true' | ||
- name: Git Submodules status | ||
run: | | ||
git submodule status | ||
- name: cmake | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -DCMAKE_CXX_COMPILER=mpic++ -DCMAKE_Fortran_COMPILER=mpif90 | ||
cmake .. -DCMAKE_CXX_COMPILER=mpic++ -DCMAKE_Fortran_COMPILER=mpif90 -DMPIEXEC_PREFLAGS="--oversubscribe" | ||
- name: make | ||
run: | | ||
cd build && make -j 4 | ||
- name: test | ||
run: | | ||
cd build && ctest --no-compress-output -V -T Test -I 1,20,1 | ||
# code-style: | ||
# runs-on: ubuntu-latest | ||
# needs: [docker-image] | ||
# container: | ||
# image: ghcr.io/llnl/mgmol/mgmol_env:latest | ||
# options: --user 1001 --privileged | ||
# volumes: | ||
# - /mnt:/mnt | ||
# steps: | ||
# - name: Cancel previous runs | ||
# uses: styfle/[email protected] | ||
# with: | ||
# access_token: ${{ github.token }} | ||
# - name: Check out mgmol | ||
# uses: actions/checkout@v1 | ||
# with: | ||
# submodules: 'true' | ||
# - name: cmake | ||
# run: | | ||
# mkdir build | ||
# cd build | ||
# cmake .. -DCMAKE_CXX_COMPILER=mpic++ -DCMAKE_Fortran_COMPILER=mpif90 -DMGMOL_WITH_CLANG_FORMAT=ON | ||
# - name: make | ||
# run: | | ||
# cd build && make format | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if(NOT LIBROM_PATH) | ||
message(FATAL_ERROR "LIBROM_PATH not specified.") | ||
endif(NOT LIBROM_PATH) | ||
|
||
find_library(LIBROM_LIB libROM.so HINTS "${LIBROM_PATH}/build/lib") | ||
find_path(LIBROM_INCLUDES librom.h HINTS "${LIBROM_PATH}/lib") | ||
|
||
mark_as_advanced(LIBROM_LIB LIBROM_INCLUDES) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libROM REQUIRED_VARS LIBROM_LIB LIBROM_INCLUDES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set(CMAKE_C_COMPILER mpicc) | ||
set(CMAKE_CXX_COMPILER mpicxx) | ||
set(CMAKE_Fortran_COMPILER mpif90) | ||
|
||
set(SCALAPACK_ROOT $ENV{MKLROOT}) | ||
set(SCALAPACK_BLACS_LIBRARY $ENV{MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.so) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +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 | ||
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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.