HPCW 3.0
|
ICON can be built either via CMake or the spack recipe provided in HPCW. Both options internally invoke ICON's configure
script. As such, all options that are available for this configure
script are also usable in the CMake toolchains used in the context of HPCW. The documentation for these options is available after downloading the ICON source code or you can find it online. Alternatively, call the configure script in the ICON source directory with --help
for an overview of all available options. The Quick Start guide provides an overview of the different compile groups and arguments. HPCW outputs the exact invocation of the configure script at build time.
HPCW already takes care of enabling and disabling certain sensible features of ICON (i.e. disabling loop exchange, enabling OpenMP etc), but if you want to pass additional arguments of that kind, for example --disable-delayed-config
, pass them via the CMake option icon_configure_args
. Note that HPCW assumes this variable to be a CMake list! An example is available in this toolchain file.
HPCW uses the information available from the toolchain and the environment to correctly set up most flags. The flags/options that are set up this way are:
FC
CC
FCFLAGS
CFLAGS
CPPFLAGS
ICON_FCFLAGS
LDFLAGS
(using both information from the environment/toolchain, as well as the information available to CMake after finding the dependencies)ICON_FCFLAGS
ICON_OCEAN_FCFLAGS
NVCFLAGS
, if specifiedLIBS
(completely taken care of by HPCW, the user does not need to provide more info for this)The flags without the ICON_
prefix are passed to all components of ICON, including the bundled libraries. If a more fine-grained control of the flags for different components is required, different compile groups can be specified. HPCW defines and enables an ocean compile group, which in turn enables the usage of the ICON_OCEAN_FCFLAGS
. If you want to enable other compile groups, you can define them as part of the icon_configure_args
(you may use the definition of the ocean group as an example) and then either define the corresponding flags in this argument as well or export them, to your environment, so that autoconf can pick up on them. Read the Quick Start guide available in ICON for more information on compile groups.
ICON ships with multiple configure scripts, tailored towards different HPC sites. If you want to use one of these configure scripts, you can pass the corresponding path in the ICON source directory to HPCW via the CMake variable ICON_USER_BUILD_WRAPPER
. For example, if you want to use the Levante configure script, set the variable as such: -DICON_USER_BUILD_WRAPPER=config/dkrz/levante.intel
.
In case you want to adjust the source code of ICON and then run the tests in HPCW, you have two options. The first option is to build ICON independently of HPCW. After building ICON and ensuring that the executable is in your $PATH
, you can run HPCW while setting the option USE_SYSTEM_ICON
to ON
. Setting this option informs HPCW of an already existing ICON executable, skipping the internal build of ICON. The tests are then set up and run with this external ICON.
The second option is to adjust the code of the ICON version that is downloaded by HPCW during the build. After building ICON once, either by invoking the recommended build wrapper or running the required steps individually, the source is available in ${CMAKE_BINARY_DIR}/icon
. After changing the source code, you can trigger the rebuild by invoking make
in ${CMAKE_BINARY_DIR}/icon
. DO NOT run the build wrapper again in this case. Doing so would re-download the ICON source, discarding any changes that you made previously.
For guidance on a working setup for ICON, you may refer to these environment and toolchain files.