Installation - LLNL/scaleupROM GitHub Wiki

On LC quartz

Users on LC quartz can simply run the following script:

./script/install_quartz.bash

Otherwise, the detailed instruction is down below:

Installation directory

We assume that all the dependencies here are installed within one directory $LIB_DIR. We save it as an environment variable,

export LIB_DIR=/your/preferred/installation/directory

Prerequisites

MFEM and its dependencies

hypre

cd $LIB_DIR
wget -O hypre-2.28.0.tar.gz https://github.com/hypre-space/hypre/archive/v2.28.0.tar.gz
tar -zxvf hypre-2.28.0.tar.gz
mv hypre-2.28.0 hypre
cd ./hypre/src/
./configure --disable-fortran
make -j

GSLIB

cd $LIB_DIR
wget -O gslib-1.0.7.tar.gz https://github.com/gslib/gslib/archive/v1.0.7.tar.gz
export MG=YES
tar -zxvf gslib-1.0.7.tar.gz
mv gslib-1.0.7 gslib
cd ./gslib
make CC=mpicc -j

METIS/ParMETIS

cd $LIB_DIR
wget -O parmetis-4.0.3.tar.gz https://github.com/LLNL/libROM/raw/master/dependencies/parmetis-4.0.3.tar.gz
tar -zxvf parmetis-4.0.3.tar.gz
cd ./parmetis-4.0.3
make config prefix=$LIB_DIR/parmetis-install
make
make install
cd ./metis
make config prefix=$LIB_DIR/metis-install
make
make install

MUMPS

We use mumps repository, though it has a bug in its FindMETIS.cmake. We have the replacement file in our repository.

cd $LIB_DIR
git clone https://github.com/scivision/mumps.git
cd ./mumps
git checkout v5.6.2.1
wget -O cmake/FindMETIS.cmake https://github.com/LLNL/scaleupROM/raw/install/dependencies/FindMETIS.cmake
cmake -B build -Dparmetis=YES -Dparallel=YES -DCMAKE_TLS_VERIFY=OFF
cmake --build build
cmake --install build

MFEM

cd $LIB_DIR
git clone https://github.com/mfem/mfem.git
cd mfem
git checkout v4.6
mkdir -p ./build && cd ./build
cmake .. -DBUILD_SHARED_LIBS=YES -DMFEM_USE_MPI=YES -DMFEM_USE_GSLIB=YES -DMFEM_USE_METIS=YES -DMFEM_USE_METIS_5=YES -DMFEM_USE_MUMPS=YES -DGSLIB_DIR="$LIB_DIR/gslib/build" -DMUMPS_DIR="$LIB_DIR/mumps/build/local"
make -j 16
ln -s . include && ln -s . lib

yaml-cpp

cd $LIB_DIR
git clone https://github.com/jbeder/yaml-cpp.git
mkdir -p ./yaml-cpp/lib && cd ./yaml-cpp/lib
cmake .. -DYAML_BUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=$LIB_DIR/yaml-cpp-install
make
sudo make install

GoogleTest (optional)

We use c++11 standard, which GoogleTest stopped supporting after version 1.12.1. We recommend to use the release-1.12.1.

cd $LIB_DIR
git clone https://github.com/google/googletest
cd ./googletest
git checkout tags/release-1.12.1 -b v1.12.1
mkdir ./build && cd ./build
cmake ..
make
sudo make install

libROM

In principle, libROM also requires MFEM and all of its dependencies. However, due to the use of MUMPS in scaleupROM, libROM cannot use the same MFEM used for scaleupROM. For now, we build libROM without MFEM dependency:

cd $LIB_DIR
git clone https://github.com/LLNL/libROM.git
cd ./libROM
git checkout mpi-io
mkdir ./build && cd ./build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/simple.cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DUSE_MFEM=OFF
RUN sudo make -j 16

After all the prerequisite installation as above, the installation directory $LIB_DIR should look like:

$LIB_DIR
|- hypre
|- gslib
|- parmetis-4.0.3
|- parmetis-install
|- metis-install
|- mumps
|- mfem
|- yaml-cpp
|- yaml-cpp-install
|- googletest
|- libROM

scaleupROM installation

After the prerequisite installations above, we can install scaleupROM as follows:

mv /path/to/preferred/location
git clone https://github.com/LLNL/scaleupROM.git
mkdir -p scaleupROM/build && cd scaleupROM/build
cmake .. -DLIB_DIR=$LIB_DIR
make

If some of the prerequisites are installed somewhere else, you can specify each of them. For example, if mumps and yaml-cpp-install are located somewhere else, specify them as cmake variables:

cmake .. -DLIB_DIR=$LIB_DIR -DMUMPS_DIR=/path/to/mumps -DYAML_DIR=/path/to/yaml-cpp-installation

Following are the variables you can set as cmake variables:

  • LIB_DIR: Directory that contains all the prerequisites
  • MFEM_DIR: Path to mfem build directory
  • HYPRE_DIR: Path to hypre source directory
  • GSLIB_DIR: Path to gslib source directory
  • PARMETIS_DIR: Path to parmetis installation directory
  • METIS_DIR: Path to metis installation directory
  • MUMPS_DIR: Path to mumps source directory
  • YAML_DIR: Path to yaml-cpp installation directory
  • LIBROM_DIR: Path to libROM source directory

It is also possible to set any of the above variables as environment variables, which will be read from cmake command.