Omega_h

Omega_h Installation and Usage

Omega_h is a C++14 library that implements tetrahedron and triangle mesh adaptativity, with a focus on scalable HPC performance using (optionally) MPI and OpenMP or CUDA. It is intended to provided adaptive functionality to existing simulation codes.

This is a fork of the original Omega_h repository of SANDIA Labs. The fork is maintained by the SCOREC.

Find Omega_h on SCOREC machines with CUDA and MPI enabled

  1. Compiled without Gmsh: /lore/mersoj/laces-software/build/PASCAL61/omega_h/install/ PASCAL61 is the GPU architecture. Find your GPU architecture with this tutorial.
  2. Compiled with Gmsh: /lore/hasanm4/Omega_H/. And the Gmsh executable is in /lore/hasanm4/Gmsh/

Remember to add the shared libraries of gmsh and omega_h to your LD_LIBRARY_PATH environment variable if you are using the compiled version of Omega_h.

Usage of Omega_h

  1. Use as a library in PCMS or with any other codes. See pcms tutorial for an example.
  2. Use to convert mesh files of other formats to Omega_h format. See this tutorial as a simple example.

Compile Omega_h on SCOREC machines (rhel7)

  1. Load the necessary modules:
# you may also need to remove all the previously loaded modules
#module purge
module unuse /opt/scorec/spack/tmod/tinux—rhet7—x86_64/Core
module use /opt/scorec/spack/v0181_1/lmod/linux—rhe17—x86_64/Core
module use /opt/scorec/modules
module load gcc/11.2.0 mpich/4.0.2
module load fftw/3.3.10
module load cuda/11.4
module load cmake/3.20
# if you want to use Symmetrix with it
module load simmetrix-simmodsuite/2023.1-230907dev # or any other version
  1. Clone the repository:
git clone https://github.com/SCOREC/omega_h.git
cd omega_h
  1. Create a config file with the following content:
cmake -S . -B build \
 -DCMAKE_CXX_COMPILER=`which mpicxx` \
     -DCMAKE_C_COMPILER=`which mpicc` \
     -DCMAKE_INSTALL_PREFIX=/lore/<yourUsername>/Omega_H_OMP/ \
     -DGmsh_INCLUDE_DIRS=/lore/<yourUsername>/Gmsh/include/ \
     -DKokkos_DIR=/lore/<yourUsername>/Kokkos/kokkosInstall/lib64/cmake/Kokkos \
     -DCMAKE_BUILD_TYPE=Debug \
     -DOmega_h_DBG=OFF \
     # if you want to compile with symmetrix
     -DOmega_h_USE_SimModSuite=on \
     -DSIM_MPI=mpich4.0.2 

Important notes on the flags: Change the CMAKE_INSTALL_PREFIX to your preferred directory. If you want to use Gmsh, change the Gmsh_INCLUDE_DIRS to the directory where you have Gmsh compiled and installed. If you don’t, remove the line. If you want to use CUDA or OpenMP, change the Kokkos_DIR to the directory where you have Kokkos installed. CUDA/OpenMP will depend on the Kokkos installation. If you don’t want to use CUDA or OpenMP, remove the line. If you want to compile in release mode, change the CMAKE_BUILD_TYPE to Release or RelWithDebInfo.

  1. Build and install:
. <yourConfigFile>
cd build
make -j8 install