Skip to content

Building with SCOREC

Dan Ibanez edited this page Feb 20, 2017 · 2 revisions

This page explains the various options for compiling Albany with SCOREC tools for adaptivity.

Install ParMETIS

The SCOREC tools strongly recommend the ParMETIS TPL, which they use through Zoltan. @ibaned actually has a clone of the ParMETIS 4.0.3 repository with a much-improved CMake build system and the index types set to 64-bit by default:

https://github.com/ibaned/parmetis

If you use that copy of ParMETIS, here is a sample do-configure script:

#!/bin/bash
cmake $HOME/src/parmetis \
-DCMAKE_INSTALL_PREFIX=$HOME/install/gcc/parmetis \
-DCMAKE_C_COMPILER=$HOME/install/gcc/mpich/bin/mpicc \
-DCMAKE_CXX_COMPILER=$HOME/install/gcc/mpich/bin/mpicxx \
-DCMAKE_C_FLAGS="-O2" \
-DCMAKE_CXX_FLAGS="-O2" \
-DBUILD_SHARED_LIBS=ON \
2>&1 | tee config_log

Install SCOREC in Trilinos

An easy way to install the SCOREC tools is as part of Trilinos. You can clone the SCOREC repository into the Trilinos repository:

cd Trilinos
git clone [email protected]:SCOREC/core.git SCOREC

After which it should be as simple adding

-DTrilinos_ENABLE_SCOREC:BOOL=ON

to your Trilinos do-configure script, as well as pointing it to the right ParMETIS TPL location like this:

-DTPL_ENABLE_ParMETIS:STRING=ON \
-DParMETIS_INCLUDE_DIRS:PATH=$HOME/install/gcc/parmetis/include \
-DParMETIS_LIBRARY_DIRS:PATH=$HOME/install/gcc/parmetis/lib \

Enable SCOREC in Albany

If SCOREC was built as part of Trilinos, then just add

-DENABLE_SCOREC:BOOL=ON

to your Albany do-configure script.

Install SCOREC outside Trilinos

You can also build SCOREC outside the Trilinos tree. In that case, a possible do-configure script for the SCOREC repository looks like this:

#!/bin/bash
cmake $HOME/src/core \
-DCMAKE_CXX_COMPILER:FILEPATH=$HOME/install/gcc/mpich/bin/mpicxx \
-DCMAKE_C_COMPILER:FILEPATH=$HOME/install/gcc/mpich/bin/mpicc \
-DCMAKE_INSTALL_PREFIX:PATH=$HOME/install/gcc/core \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DENABLE_ZOLTAN:BOOL=ON \
-DZOLTAN_PREFIX:PATH=$HOME/install/gcc/Trilinos \
-DPARMETIS_PREFIX:PATH=$HOME/install/gcc/parmetis \
-DENABLE_STK:BOOL=ON \
-DENABLE_STK_MESH:BOOL=ON \
-DTrilinos_PREFIX:PATH=$HOME/install/gcc/Trilinos \
2>&1 | tee config_log

Install Omega_h (optional)

The Omega_h mesh adaptation library can be found here:

https://github.com/ibaned/omega_h

A sample do-configure script for Omega_h is as follows:

#!/bin/bash
cmake $HOME/src/omega_h \
-DCMAKE_INSTALL_PREFIX:PATH=$HOME/install/gcc/omega_h \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_CXX_COMPILER:FILEPATH=$HOME/install/gcc/mpich/bin/mpicxx \
-DOmega_h_USE_MPI:BOOL=ON \
2>&1 | tee config_log

Omega_h should be compiled before SCOREC and Albany, and SCOREC will have to be compiled outside Trilinos, with the following lines added to the SCOREC do-configure:

-DENABLE_OMEGA_H:BOOL=ON \
-DOmega_h_PREFIX:PATH=$HOME/install/gcc/omega_h-kokkos \

Likewise, Albany will need to know where Omega_h is, which you can specify with this line in the Albany do-configure:

-DALBANY_OMEGA_H_DIR:PATH=$HOME/install/gcc/omega_h \
Clone this wiki locally