For a check of applicability of performance tools I have chosen gromacs for scorep instrumentation. A successful attempt has been describeb in a prace paper “Profiling and Tracing Tools for Performance Analysis of Large Scale Applications”
Things in practice are not this easy…
Without instrumentation a call to cmake like:
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_MPI=on -DCMAKE_INSTALL_PREFIX=destination_folder> -DCMAKE_CXX_COMPILER=mpic++ -DCMAKE_C_COMPILER=mpicc
works for gromacs-2024 with gcc-11.4.0 and openmpi-4.1.6. It becomes problematic when switching to the scorep wrappers in combination with the aforementioned version triple (scorep itself is 8.3). The call to cmake then is changed to
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_MPI=on -DCMAKE_INSTALL_PREFIX=destination_folder> -DCMAKE_CXX_COMPILER=scorep-mpic++ -DCMAKE_C_COMPILER=scorep-mpicc
This causes the compilation to fail for muparser:
muParserBase.cpp:1880:77: error: expected '#pragma omp' clause before ')' token
1880 | #pragma omp parallel for schedule(static, std::max(nBulkSize/nMaxThreads, 1)) private(nThreadID)
muParserBase.cpp:1880:77: error: expected ')' before 'nowait'
1880 | #pragma omp parallel for schedule(static, std::max(nBulkSize/nMaxThreads, 1)) private(nThreadID)
In order to cross check the cause I have tried different combinations of gromacs, scorep and compilers. The result is the same.
By adding
-DGMX_OPENMP=OFF
to the cmake call gromacs does compile for the price of having openmp being disabled completely. When run gromacs causes in this case scorep to gather data.
Since the use of an external muparser build is possible I have used the code provided as part of the gromacs source download to be compiled seperatly. Then adding the following to the cmake call:
-DCMAKE_PREFIX_PATH=<path_to_muparser_dir> -DGMX_USE_MUPARSER=EXTERNAL
Compilation then stops with a no such file or directory for muparser.h.
It looks like for some reason cmake neither by -DCMAKE_...
nor by -DGMX_...
is able to recognize what it is desired to do.
Any ideas how to convince cmake to act properly?