This is an implementation of the Paper "Automatic Generation of Load-Balancing-Aware Block-Structured Grids for Complex Ocean Domains" presented at the International Meshing Roundtable 2022.
The provided example uses the ADCIRC mesh of the Bight of Abaco in the Bahamas region as an input. [Grenier Jr. et al.]
(install in order as listed)
- cmake version ≥ 3.10
- follow installation guide: https://cmake.org/install/
- CUDA-capable GPU
- A supported version of Linux with a gcc compiler and toolchain
- NVIDIA CUDA Toolkit
- download CUDA
- To set path in .bashrc: get cuda installation path with
<cuda_path>=ldconfig -p | grep cuda, e.g. /usr/local/cuda-11.0/ export CUDA_ROOT=<cuda_path>/bin/ export LD_LIBRARY_PATH=<cuda_path>/lib64/
- Select nvidia graphics card with
sudo prime-select nvidia
- reboot
- check if OpenGL uses nvidia GPU:
glxinfo | grep -i opengl
- Verify driver version:
cat /proc/driver/nvidia/version
- Verify the CUDA Toolkit version:
nvcc -V
- Verify running CUDA GPU jobs (Running
deviceQuery
andbandwidthTest
)cuda-install-samples-[11.0].sh . cd NVIDIA_CUDA-[11.0]_Samples/ make ./bin/[x86_64]/[linux]/release/deviceQuery ./bin/[x86_64]/[linux]/release/bandwidthTest
-
Create a directory for building the libraries (non-root should note the dependency)
mkdir 00_libs cd 00_libs
-
Clone the repositories and/or download the archives
git clone https://github.com/google/glog.git wget https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/8.1/OpenMesh-8.1.tar.gz
-
Build+Test glog (Root users may disregard the -DCMAKE_INSTALL_PREFIX flag)
mkdir glog/build cd glog/build/ cmake .. -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="." cmake --build . cmake --build . --target test cmake --build . --target install cd ../..
-
Build OpenMesh 8.1 (Root users may disregard the -DCMAKE_INSTALL_PREFIX flag)
tar -xvf OpenMesh-8.1.tar.gz rm OpenMesh-8.1.tar.gz mkdir OpenMesh-8.1/build cd OpenMesh-8.1/build cmake .. -DCMAKE_INSTALL_PREFIX="." cmake --build . cmake --build . --target install cd ../..
-
Note real path where LIBS have been installed (maybe add it to your bashrc extension if you plan on recompiling the project more often)
realpath glog/build/ googletest/build/ OpenMesh-8.1/build/ export TEMP_LIB_location=$(echo "$(realpath glog/build/);$(realpath OpenMesh-8.1/build)")
- Clone the repository
git clone https://github.com/DanielZint/hpmeshgen.git
- Building
mkdir hpmeshgen2/build cd hpmeshgen2/build cmake .. -DCMAKE_PREFIX_PATH="$TEMP_LIB_location" cmake --build . cd ../..
- Executing with parameters described in ./hpmeshgen2/HPMeshGenParameter.txt
./hpmeshgen2/build/bin/HPMeshGen2
(install in order as listed)
- download
- normal installation, restart device afterwards
- download
- select binary with installer
- download
- select everything that has to do with C++ or MSVC
- select english language pack
Use file HPMeshGenParameter.txt to configure HPMeshGen2. The file marks comments with '!'.
workingDirectory ! is the project root folder by default but can be changed here
cacheFolder ! storage folder for cached files (cache reduces time for recomputing meshes significantly)
nBlocks ! number of blocks
meshFileName ! input mesh, usually a .14-file
sizegridSizeX ! size grid dimensions (integer)
sizegridSizeY ! the size grid stores the depth and edge length information
nRefinementSteps ! the number of nodes on a fragment edge
nPatches ! number of fragments
outputFolder ! all output files go in here
initialMeshOutput ! 0/1 initial mesh as .off file
reductionOutput ! 0/1 intermediate steps of reduction as .off file
blockMeshOutput ! 0/1 fragment mesh as .off file
sizegridOutput ! 0/1 print size grid in .vtk format
forceFragmentNumber ! 0/1 force fragment number, 0: change fragment number for better quality
convexHullDecimation ! 0/1 activate masks