HPCW 3.0
|
dwarf-p-cloudsc is intended to test the CLOUDSC cloud microphysics scheme of the IFS.
The dwarf comes with many implementations:
dwarf-cloudsc-fortran
.Variants 1,2, 4 are available as OpenACC implementations in the repository (dwarf-cloudsc-gpu-scc[-hoist/k-caching]). Variant 2 is available as OpenMP-target implementation in the repository (dwarf-p-cloudsc-gpu-omp-scc-hoist). Variants 1-3 are also available as build-time transformed variants using the Loki source-to-source translation toolchain (dwarf-cloudsc-loki-scc[-hoist, -stack]). This resembles the build mode used for GPU-offloading physics in IFS.
In HPCW, we include test cases for the fastest variant per GPU programming model:
For information on the names of the associated test cases, see here.
If you want to build the GPU variants of CLOUDSC, set the CMake variable ENABLE_cloudsc_gpu=ON
. This is required for the GPU versions and enables building/testing for every version. If you do not want to build each GPU variant, you may specify which GPU variants you want to exclude by setting the corresponding CMake variable to OFF
, e.g. ENABLE_cloudsc_hip=OFF
. For an example, refer to this toolchain. It also contains information on how to set the compiler flags for the different programming models. If you want to execute multi-GPU runs with CLOUDSC, MPI support needs to be enabled as well, as each GPU needs to be assigned to one MPI rank.
CLOUDSC can be built in either single precision or double precision mode (default). The single precision mode is enabled via the CMake variable ENABLE_cloudsc_single_precision
.
During our tests, we noticed that compiling the OpenMP variant of CLOUDSC with NVHPC also required OpenACC to be active, otherwise the compiler would throw errors. If you encounter a similar problem, make sure to either activate the OpenACC version as well, or pass the CMake variable -DENABLE_ACC=ON
to cloudsc_cmake_args
when building the OpenMP version.
As with the other applications, you can also use externally-built CLOUDSC GPU versions and run the HPCW test cases with them. However, if you want to run multiple test cases simultaneously, you might run into crashes due to HDF5 file locks. This can be prevented by setting the environment variable HDF5_USE_FILE_LOCKING=FALSE
.
Both the CMake build and the spack package provided by HPCW contain patches that make this environment variable obsolete by adjusting the HDF5 file accesses, so you only need to worry about this if you use a CLOUDSC version built via other means.
CLOUDSC requires three parameters. All of them are set by HPCW, but you can influence some of them. The first parameter is the number of threads. The test cases rely on the environment variable OMP_NUM_THREADS
to determine this value at the time of test execution. The second parameter is the problem size. This value is fixed per test case. The last parameter is the block size, which mostly affects cache utilization. HPCW sets sensible defaults for each test case. For the test cases cloudsc-fortran-{small, medium, big}
you can choose your own block size and specify it via the CMake variable cloudsc_block_size
.