![]() |
TRACE User Guide
TRACE Version 9.8.1
|
Building the TRACE suite from source requires source-code access to the TRACE suite repository. This guide assumes that you have a checked out version of the TRACE suite that you want to compile. The TRACE suite uses a CMake build-system to compile the source files.
To compile the TRACE suite a number of dependencies must be installed. For the most basic build the following items are required:
Depending on the configuration you want to build, you may also need a subset of the following libraries:
Versions in brackets indicates the latest software version we use for testing. If you encounter any build-issues try building with those versions. For users of the DLR Institute of Propulsion Technology most of the libraries are available via the Debian package management system. After loading the corresponding module file, all environment variables should be correct for the usage with TRACE
Some dependencies require specific build-options to be set. The complete bootstrapping process is documented in contrib/build_dependencies/bootstrap_trace.sh. You can either use this script to build the dependencies or use it as reference where the required libraries can be downloaded and which configuration options must be supplied.
An example usage of the bootstrap script looks as follows
$ cd trace_suite/contrib/build_dependencies $ ./bootstrap_trace.sh $ source trace_dependencies/environment.sh
bootstrap_trace.sh shell script is provided without any warranty, or guarantee of correctness. Use at your own risk, or in doubt: as a documentation.For two dependencies we provide patches that are required when building those. The patches can be found in contrib/build_dependencies/
01-*.patch, 02-*.patch)vtk_*.patch)Make sure to install all required libraries before trying to build the TRACE suite.
To build TRACE, first a cmake configuration must be created followed by the generation of the build files:
$ cmake -S path/to/trace/source/directory -B path/to/build/directory
Upon successful generation of the build files, TRACE can be build in the build directory according to
$ cd path/to/build/directory $ make -j
provided that the 'make' system is used as backend for cmake (which is the default setting). TRACE can be built with several build options which can be specified via the cmake -D option, e.g.
$ cmake -S path/to/trace/source/directory -B path/to/build/directory -DDOUBLE_PRECISION=ON
Alternatively, tools like ccmake can be used which conveniently show all available build options.
Execute:
$ ./trace/TRACE -h
located in the build directory to test if the build was successful. If so you should see the TRACE splash screen and information on how to use TRACE. Additionally, you should run make test to start all enabled tests. By default, this will just run all built executables and test the pytracesuite build to make sure that the generated executables work in your environment.
This section describes some special build-configurations for the TRACE suite that may require special preparation of external libraries.
To build adAdjointTRACE you will additionally require Eigen, CoDiPack and MeDiPack as described above. Once those libraries are available, you can build all adjoint configurations with the following commands:
$ distrib/ad/configure.sh [CMake Options] $ distrib/ad/build.sh [CMake Options]
After running both scripts the resulting AD executables can be found in cmake-builds/AD/. To test if the build was successful use:
$ distrib/ad/build.sh --target test
In 9.7 a new zonal interface algorithm was implemented. For the HB solver it provides new features and greatly improves performance. Therefore, HB uses the new algorithm by default. For the unsteady solver the new algorithm still requires more validation, so here the legacy algorithm is used by default.
One can change these defaults at compile time via the (advanced) ZONAL_DEFAULT_ALGORITHM CMake option. AUTO (default) selects the zonal algorithm as described above, NEW tries to always apply the new zonal algorithm and LEGACY always selects the legacy zonal. This default behaviour can be changed at runtime via CNTL file commands FORCE_LEGACY_ZONAL and FORCE_NEW_ZONAL.
TRACE can be built with in situ visualisation provided by the ParaView Catalyst library. It has been tested with Catalyst 5.8, which can be downloaded from: Paraview website
It is recommended to build Catalyst with OSMesa to allow off-screen rendering on compute nodes. Due to a build-system bug in OSMesa we strongly recommend versions greater than 19.0.5. Catalyst is build with CMake as well. We use the following build arguments to configure it:
$ cmake \ -DPARAVIEW_BUILD_EDITION=CATALYST_RENDERING \ -DCMAKE_INSTALL_PREFIX=<where to install Catalyst> \ -DPARAVIEW_USE_MPI=ON \ -DPARAVIEW_USE_PYTHON=ON \ -DCMAKE_BUILD_TYPE=Release \ -DPARAVIEW_BUILD_QT_GUI=OFF \ -DVTK_USE_X=OFF \ -DOSMESA_INCLUDE_DIR=<path to mesa install dir>/include \ -DOSMESA_LIBRARY=<path to mesa install dir>/lib/x86_64-linux-gnu/libOSMesa.so \ -DVTK_OPENGL_HAS_OSMESA=ON \ <path to catalyst sources> $ make -j install
After building Catalyst, you can use the -DCATALYST=ON CMake option to enable it in the TRACE suite.
To use the FSI solver TRACE has to be configured with -DCALCULIX=ON and the pre-compiled routine CalculiXstep() from CalculiX must be available as a library. Furthermore, the ARPACK (libarpack.*) and GFortran (libgfortran.*) libraries also must be installed.
Either a shared library as explained above or a static library can be used. For a static library the function CalculiXstep() must be compiled appropriately with the name: libcalculix.a. Additionally, the environment variable LIBRARY_PATH must contain the path to the directory of the library file. For Example:
$ export LIBRARY_PATH=/path/to/dir/where/libcalculix.a/is/located/:$LIBRARY_PATH
Optionally the location of the library can be specified to CMake with -DCALCULIX_LIBRARY=/path/to/library.
The llvm-tracker is a development aid to generate the graph of dependencies among steps of the solution process. It is implemented as part of the llvm compiler framework - specifically as an optimization pass that instruments each memory access.
A working clang compiler must be available and either configured as the default compiler ($CC/$CXX environment variables) or specified to CMake (-DCMAKE_[C/CXX]_COMPILER=clang[++]).
To configure a build-directory, you can use the following CMake command:
$ cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_TRACKER=ON -DLLVM_TRACKER_ROOT_DIR=<path/to/tracker/build/dir> <path/to/sources>
and then build the trace_suite as usual:
$ make
The Score-P measurement infrastructure is a highly scalable and easy-to-use tool suite for profiling and event tracing of HPC applications.
Setup your trace-suite build environment as usual and additionally load Score-P. While running cmake to configure your build-directory, add the following options:
$ SCOREP_WRAPPER=off cmake <path-to-sources> \
-DCMAKE_C_COMPILER=scorep-gcc \
-DCMAKE_CXX_COMPILER=scorep-g++ \
-DPYTHON_EXTENSIONS=NO \
<your options>
Score-P has threading support for either omp or pthreads, but not both simultaneously. As cgns uses pthreads make sure to disable the output. For compile time filtering (highly recommended) also specify your filter file. To avoid compilation errors, set the following environment variable during the build:
$ export SCOREP_WRAPPER_COMPILER_FLAGS="-D_GNU_SOURCE" $ export SCOREP_WRAPPER_INSTRUMENTER_FLAGS="--thread=omp"
or with compile time filtering:
$ export SCOREP_WRAPPER_INSTRUMENTER_FLAGS="--thread=omp --instrument-filter=${SCOREP_FILTERING_FILE}"
For more details on using Score-P with CMake, see the Score-P guide.