MOM_domains module reference
Describes the decomposed MOM domain and has routines for communications across PEs
Functions/Subroutines
MOM_domains_init initializes a MOM_domain_type variable, based on the information read in from a param_file_type, and optionally returns data describing various properties of the domain type. |
|
Given a global array size and a number of (logical) processors, provide a layout of the processors in the two directions where the total number of processors is the product of the two layouts and number of points in the partitioned arrays are as close as possible to an aspect ratio of 1. |
|
Given a desired number of active npes, generate a layout and mask_table |
|
Given a number of domain divisions, compute the max number of land blocks that can be eliminated, and return the resulting mask table if requested. |
|
Write out the auto-generated mask information to a file in the run directory. |
|
Computes the io layout based on the domain layout and a target number of IO PEs. |
Functions/Subroutine Documentation
- subroutine MOM_domains_init(MOM_dom, param_file, symmetric, static_memory, NIHALO, NJHALO, NIGLOBAL, NJGLOBAL, NIPROC, NJPROC, min_halo, domain_name, include_name, param_suffix, US, MOM_dom_unmasked)
MOM_domains_init initializes a MOM_domain_type variable, based on the information read in from a param_file_type, and optionally returns data describing various properties of the domain type.
- Parameters
MOM_dom
A pointer to the MOM_domain_type being defined here.
param_file [in]
A structure to parse for run-time parameters
symmetric [in]
If present, this specifies whether this domain is symmetric, regardless of whether the macro SYMMETRIC_MEMORY_ is defined.
static_memory [in]
If present and true, this domain type is set up for static memory and error checking of various input values is performed against those in the input file.
NIHALO [in]
Default halo sizes, required with static memory.
NJHALO [in]
Default halo sizes, required with static memory.
NIGLOBAL [in]
Total domain sizes, required with static memory.
NJGLOBAL [in]
Total domain sizes, required with static memory.
NIPROC [in]
Processor counts, required with static memory.
NJPROC [in]
Processor counts, required with static memory.
min_halo [inout]
If present, this sets the minimum halo size for this domain in the i- and j- directions, and returns the actual halo size used.
domain_name [in]
A name for this domain, "MOM" if missing.
include_name [in]
A name for model's include file, "MOM_memory.h" if missing.
param_suffix [in]
A suffix to apply to layout-specific parameters.
US
A dimensional unit scaling type
MOM_dom_unmasked
Unmasked MOM domain instance. Set to null if masking is not enabled.
Callees call graph
Text view
mom_domains::mom_domains_init → mom_coms_infra::interface::broadcast
mom_domains::mom_domains_init → mom_cpu_clock_infra::cpu_clock_begin
mom_domains::mom_domains_init → mom_cpu_clock_infra::cpu_clock_end
mom_domains::mom_domains_init → mom_cpu_clock_infra::cpu_clock_id
mom_domains::mom_domains_init → mom_domain_infra::create_mom_domain
mom_domains::mom_domains_init → mom_domains::gen_auto_mask_table
mom_domains::mom_domains_init → mom_domains::mom_define_layout
mom_domains::mom_domains_init → mom_error_handler::mom_error
mom_domains::mom_domains_init → mom_file_parser::interface::get_param
mom_domains::mom_domains_init → mom_file_parser::interface::log_param
mom_domains::mom_domains_init → mom_file_parser::interface::log_version
mom_domains::mom_domains_init → mom_io_infra::interface::file_exists
mom_domains::mom_domains_init → mom_string_functions::slasher
- subroutine MOM_define_layout(n_global, ndivs, layout)
Given a global array size and a number of (logical) processors, provide a layout of the processors in the two directions where the total number of processors is the product of the two layouts and number of points in the partitioned arrays are as close as possible to an aspect ratio of 1.
- Parameters
n_global [in]
The total number of gridpoints in 2 directions
ndivs [in]
The total number of (logical) PEs
layout [out]
The generated layout of PEs
Callers call graph
- subroutine gen_auto_mask_table(n_global, reentrant, tripolar_N, npes, param_file, inputdir, filename, target_io_pes, layout, io_layout, US)
Given a desired number of active npes, generate a layout and mask_table
- Parameters
n_global [in]
The total number of gridpoints in 2 directions
reentrant [in]
True if the x- and y- directions are periodic.
tripolar_N [in]
A flag indicating whether there is n. tripolar connectivity
npes [in]
The desired number of active PEs.
param_file [in]
A structure to parse for run-time parameters
inputdir [in]
INPUTDIR parameter
filename [in]
Mask table file path (to be auto-generated.)
target_io_pes [inout]
Target number of IO PEs when auto_mask_table is True.
layout [out]
The generated layout of PEs (incl. masked blocks)
io_layout [out]
The generated IO layout based on target_io_pes.
US
A dimensional unit scaling type
Callees call graph
Text view
mom_domains::gen_auto_mask_table → mom_domains::auto_determine_io_layout
mom_domains::gen_auto_mask_table → mom_domains::determine_land_blocks
mom_domains::gen_auto_mask_table → mom_domains::mom_define_layout
mom_domains::gen_auto_mask_table → mom_domains::write_auto_mask_file
mom_domains::gen_auto_mask_table → mom_error_handler::mom_error
mom_domains::gen_auto_mask_table → mom_error_infra::is_root_pe
mom_domains::gen_auto_mask_table → mom_file_parser::interface::get_param
mom_domains::gen_auto_mask_table → mom_io_infra::interface::file_exists
mom_domains::gen_auto_mask_table → mom_io_infra::interface::read_field
- subroutine determine_land_blocks(mask, nx, ny, idiv, jdiv, ibuf, jbuf, num_masked_blocks, mask_table)
Given a number of domain divisions, compute the max number of land blocks that can be eliminated, and return the resulting mask table if requested.
- Parameters
mask [in]
cell masks based on depth and MINIMUM_DEPTH
nx [in]
Total number of gridpoints in x-dir (global)
ny [in]
Total number of gridpoints in y-dir (global)
idiv [in]
number of divisions along x-dir
jdiv [in]
number of divisions along y-dir
ibuf [in]
number of buffer cells in x-dir. (not necessarily the same as NIHALO)
jbuf [in]
number of buffer cells in y-dir. (not necessarily the same as NJHALO)
num_masked_blocks [out]
the final number of masked blocks
mask_table [out]
the resulting array of mask_table
ibegin
The starting index of each division along x axis
iend
The ending index of each division along x axis
jbegin
The starting index of each division along y axis
jend
The ending index of each division along y axis
Callees call graph
- subroutine write_auto_mask_file(mask_table, layout, npes, filename)
Write out the auto-generated mask information to a file in the run directory.
- Parameters
mask_table [in]
mask table array to be written out.
layout [in]
PE layout
npes [in]
Number of divisions (incl. eliminated ones)
filename [in]
file name for the mask_table to be written
file_ascii
The unit number of the auto-generated mask_file file.
Callees call graph
- function auto_determine_io_layout(idiv, jdiv, nio) result(best_io_layout)
Computes the io layout based on the domain layout and a target number of IO PEs.