HPCW 3.0
Loading...
Searching...
No Matches
Building NICAM-DC

NICAM-DC relies on the presence of a supporting file that contains compiler-specific flags for both the Fortran and the C compiler. HPCW will create this file automatically during build time, inserting the corresponding flags. NICAM-DC has certain requirements regarding the treatment of unformatted files in Fortran, namely that the record length value is given in units of bytes, and that the format for numeric data is big endian. This can be controlled via compiler flags. HPCW is able to infer the correct flags for some compilers (i.e. -assume byterecl -convert big_endian for Intel compilers), but if you want to set these flags yourself, you can do so via the CMake variable Fortran_ADDITIONAL_FLAGS_FOR_NICAMDC.

If you wish to set the optimization flags yourself, you can do so either via the CMake variables CMAKE_{Fortran,C}_FLAGS_RELEASE for the Fortran and the C compiler respectively, or you can pass custom FFLAGS and CFLAGS via nicamdc_build_args. Be aware though that setting the FFLAGS as described in the second option will override the contents of the Fortran_ADDITIONAL_FLAGS_FOR_NICAMDC, so you need to pass the required flags regarding the treatment of the unformatted files alongside the flag to enable the preprocessor in the FFLAGS as well.

Note that there is no traditional install step, so the HPCW_INSTALL_DIR will not be used when building NICAM-DC.

Using Existing NICAM-DC Builds

If you wish to use an existing build of NICAM-DC with the tests provided in HPCW, i.e. if you built NICAM-DC via our spack recipe, there are a few things to consider. HPCW builds select test cases from the test directory, which in turn require the presence of the complete repository. HPCW checks for the presence of the driver nhm_driver in your $PATH and will assume that the root of the NICAM-DC directory is two levels up from that executable. Furthermore, building the test cases also relies on the previously mentioned supporting file that was required for building the application. The test cases in HPCW assume that this file is present in the sysdep directory, with the file name being Makedef. (note the full stop).

The spack recipe takes care of these prerequisites automatically, so you only need to be aware of these details if you built NICAM-DC from source yourself.

Testing NICAM-DC

HPCW provides three different test cases. They are all variations of a Jablonowski baroclinic wave test, differing in their resolution. The available test cases are:

  • nicamdc-small (gl05rl00z94pe10; ~220 km)
  • nicamdc-medium (gl08rl03z94pe640; ~28 km)
  • nicamdc-big (gl09rl04z94pe2560; ~14 km)

Due to limitations within NICAM-DC, a given set of input files is always tailored specifically to a certain number of processing elements. In this case, processing elements refer to MPI tasks. This is emphasized by the suffix of each configuration ("pe640" means that this test case can only be executed with 640 processing elements). Therefore the user needs to ensure that each test case is granted the exact number of processing elements that it requires, meaning:

  • 10 PEs for nicamdc-small
  • 640 PEs for nicamdc-medium
  • 2560 PEs for nicamdc-big

Per default, each test case executes 10 time steps. This can be changed by passing a different number to the CMake variable nicamdc_change_timestep at build time, for example -Dnicamdc_change_timestep=15.