Manual installation of DES3D
Docker image coming soon!
Requirements
- A C++ compiler that supports C++11 standard. GNU g++ 5.0 or newer will suffice
- Boost::Program_options library. Version 1.42 or newer. Boost is a large set of libraries.
To install only
program_optionslibrary, follow these stpes:-
First download the source code from [https://www.boost.org].
-
In the untarred source directory, run:
./bootstrap.shIn the same directory, build the library by running:
./b2 --with-program_options -q
-
- Python 3.2+
- Numpy for post-processing
- Optional:
- MMG: mesh adaptation library for adaptive remeshing. Bundled as a git submodule — no separate installation required (see below).
Exodus: For importing a mesh in the ExodusII format. Available as a part of SEACAS project [https://github.com/gsjaardema/seacas/]
Submodules (mmg, nanoflann, knn-bvh)
mmg, nanoflann, and knn-bvh are bundled as git submodules and
built automatically by make — no separate installation or path
configuration is required. After cloning, initialize them once:
git submodule update --init --recursive
make will also auto-initialize stale submodules, but running the
command above explicitly after cloning is recommended.
Configuration
Required dependencies
boost::program_options
Modify BOOST_ROOT_DIR in Makefile if you manually built or installed
boost library. If you followed the instructions above to build
Boost::Program_options library, set BOOST_ROOT_DIR to the untarred
boost directory.
Build options
| Parameter Name | Possible Values | Description |
|---|---|---|
ndims | 2, 3 | Choose 2 for two-dimensional models (dynearthsol2d) or 3 for three-dimensional models (dynearthsol3d). |
opt | 0, 1, 2, 3 | Integer value for optimization level. |
openacc | 0, 1 | Disable (0) or enable (1) OpenACC build. |
openmp | 0, 1 | Disable (0) or enable (1) OpenMP build. |
nprof | 0, 1 | Disable (0) or enable (1) profiling with nprof. |
gprof | 0, 1 | Disable (0) or enable (1) profiling with gprof. |
usemmg | 0, 1 | Disable (0) or enable (1) mesh optimization during remeshing with mmg. |
useexo | 0, 1 | Disable (0) or enable (1) import of an .exo mesh, usually created with the meshing software, CUBIT. Note: Only a 3D mesh can be imported currently. |
use_gpu_knn | 0, 1 | Enable GPU-accelerated k-nearest-neighbour search via BVH (requires openacc = 1). Reduces remeshing time by ~61 % on GPU. Requires the knn-bvh submodule. |
SOA | 0, 1 | Enable Structure-of-Arrays memory layout for Array2D. Improves remeshing speed by >2× on CPU and is beneficial on GPU (H100). Default off. |
Optional external libraries
ExodusII
If you want to import an ExodusII mesh (.exo),
- install SEACAS enabling exodus support
- set
useexo = 1andndims = 3. Only 3D exodus mesh can be imported. - set
EXO_INCLUDEandEXO_LIB_DIRinMakefilebased on the SEACAS installation path.
MMG
MMG is bundled as a git submodule and built automatically — no manual installation or path configuration is needed. To enable it:
- set
usemmg = 1(bothndims=2andndims=3are supported).
For further information, see Adaptive mesh refinement with MMG.
Building
$ make
Build options can be set on the command line without editing Makefile: e.g.,
- To build optimized executable (default optimization level, 1):
make - To build a debugging executable:
make opt=0 - To build the executable without
OpenMP:make openmp=0- This build is necessary to debug the code under
valgrind.
- This build is necessary to debug the code under
macOS (Apple Silicon)
Building on macOS requires LLVM OpenMP (Apple's built-in Clang does not
ship with libomp). Install it with Homebrew:
brew install llvm
Then point the build at LLVM's OpenMP:
make LLVM_DIR=$(brew --prefix llvm)
At startup, DES3D automatically sets OMP_WAIT_POLICY=active on macOS
to avoid a performance regression caused by libomp's default
zero-blocktime on Apple Silicon. You can override this by setting the
variable in your environment before running the executable.