In the drafted CMake build for CICE5, these variables are configurable by the user:
set(CICE_NXGLOB "360" CACHE STRING "Size of grid in X-direction")
set(CICE_NYGLOB "300" CACHE STRING "Size of grid in Y-direction")
# defaults from https://github.com/ACCESS-NRI/access-spack-packages/blob/d8b48b18a1400cf2a6850af0bf038af55804d92f/packages/cice5/spack-build.sh#L89-L91
# BLCKX = 360/24 = 15 , BLCKY = 300/1 = 300
set(CICE_BLCKX "15" CACHE STRING "Size of computational blocks in X-direction")
set(CICE_BLCKY "300" CACHE STRING "Size of computational blocks in Y-direction")
set(CICE_MXBLCKS "1" CACHE STRING "Maximum number of blocks per task")
these replace options which are hardcoded into the cice5 spack package when using a makefile build:
def add_target(self, ntask, driver, grid, blocks):
self.__targets[ntask]["driver"] = driver
self.__targets[ntask]["grid"] = grid
self.__targets[ntask]["blocks"] = blocks
...
# The integer represents environment variable NTASK
self.__targets = {24: {}, 480: {}, 722: {}, 1682: {}}
# TODO: Each of these targets could map to a variant:
self.add_target(24, "auscom", "360x300", "24x1")
self.add_target(480, "auscom", "1440x1080", "48x40")
# Comment from bld/config.nci.auscom.3600x2700:
# Recommendations:
# use processor_shape = slenderX1 or slenderX2 in ice_in
# one per processor with distribution_type='cartesian' or
# squarish blocks with distribution_type='rake'
# If BLCKX (BLCKY) does not divide NXGLOB (NYGLOB) evenly, padding
# will be used on the right (top) of the grid.
self.add_target(722, "auscom", "3600x2700", "90x90")
self.add_target(1682, "auscom", "3600x2700", "200x180")
In the new options, we no longer set NTASK/target (this is only set in runtime configuration)
nxglob and nyglob match the size of the grid in both options
blocks in makefile build is the number of blocks in each direction to form the total grid,
in cmake, instead, blckx and blcky set the size of the blocks
mxblocks is manually configured in cmake, instead of the automated calculation in the makefile build. See docs for how to set this
To maintain the values used for makefiles when building with cmake, this spec can be used:
- [email protected] ^cice5 nxglob=360 nyglob=300 blckx=15 blcky=300 mxblcks=1
- access-om2 ^cice5 nxglob=1440 nyglob=1080 blckx=30 blcky=27 mxblcks=4
- access-om2 ^cice5 nxglob=3600 nyglob=2700 blckx=18 blcky=15 mxblcks=22
which produces 3 installs, one each for 1degree, 0.25 degreed and 0.1 degree configurations.
There's a few related for build-cd, the first is essential. The second less so and probably only happens after spack-1.0:
ACCESS-NRI/build-cd#329
ACCESS-NRI/build-cd#330
In the drafted CMake build for CICE5, these variables are configurable by the user:
these replace options which are hardcoded into the cice5 spack package when using a makefile build:
In the new options, we no longer set NTASK/target (this is only set in runtime configuration)
nxglob and nyglob match the size of the grid in both options
blocks in makefile build is the number of blocks in each direction to form the total grid,
in cmake, instead, blckx and blcky set the size of the blocks
mxblocks is manually configured in cmake, instead of the automated calculation in the makefile build. See docs for how to set this
To maintain the values used for makefiles when building with cmake, this spec can be used:
which produces 3 installs, one each for 1degree, 0.25 degreed and 0.1 degree configurations.
There's a few related for build-cd, the first is essential. The second less so and probably only happens after spack-1.0:
ACCESS-NRI/build-cd#329
ACCESS-NRI/build-cd#330