ICON Community Interface 0.4.0
Loading...
Searching...
No Matches
halo_sync_test Namespace Reference

Test plugin for the ICON Community Interface (ComIn) More...

Functions

 simple_python_constructor ()
 
 fill_test_var ()
 
 check_halo_sync ()
 

Variables

 rank = comin.parallel_get_host_mpi_rank()
 
 glob = comin.descrdata_get_global()
 
list domains = [comin.descrdata_get_domain(jg) for jg in range(1, glob.n_dom + 1)]
 
list owner_masks
 
list promz_c_masks
 
dict dim2comin_zaxis = {2: comin.COMIN_ZAXIS_2D, 3: comin.COMIN_ZAXIS_3D}
 
list comin_dtypes
 
list var_descriptors
 

Detailed Description

Test plugin for the ICON Community Interface (ComIn)

This simple test plugin shows how to use the basic features of ComIn analogous to simple_c_plugin and simple_fortran_plugin.

Authors
11/2023 :: ICON Community Interface comin.nosp@m.@ico.nosp@m.n-mod.nosp@m.el.o.nosp@m.rg

SPDX-License-Identifier: BSD-3-Clause

Please see the file LICENSE in the root of the source tree for this code. Where software is supplied by third parties, it is indicated in the headers of the routines.

Function Documentation

◆ check_halo_sync()

halo_sync_test.check_halo_sync ( )

Definition at line 106 of file halo_sync_test.py.

◆ fill_test_var()

halo_sync_test.fill_test_var ( )

Definition at line 89 of file halo_sync_test.py.

◆ simple_python_constructor()

halo_sync_test.simple_python_constructor ( )

Definition at line 64 of file halo_sync_test.py.

Here is the call graph for this function:

Variable Documentation

◆ comin_dtypes

list halo_sync_test.comin_dtypes
Initial value:
1= [
2 comin.COMIN_VAR_DATATYPE_DOUBLE,
3 comin.COMIN_VAR_DATATYPE_FLOAT,
4 comin.COMIN_VAR_DATATYPE_INT,
5]

Definition at line 41 of file halo_sync_test.py.

◆ dim2comin_zaxis

dict halo_sync_test.dim2comin_zaxis = {2: comin.COMIN_ZAXIS_2D, 3: comin.COMIN_ZAXIS_3D}

Definition at line 39 of file halo_sync_test.py.

◆ domains

list halo_sync_test.domains = [comin.descrdata_get_domain(jg) for jg in range(1, glob.n_dom + 1)]

Definition at line 24 of file halo_sync_test.py.

◆ glob

halo_sync_test.glob = comin.descrdata_get_global()

Definition at line 23 of file halo_sync_test.py.

◆ owner_masks

list halo_sync_test.owner_masks
Initial value:
1= [
2 np.asarray(domains[jg - 1].cells.decomp_domain) == 0
3 for jg in range(1, glob.n_dom + 1)
4]

Definition at line 27 of file halo_sync_test.py.

◆ promz_c_masks

list halo_sync_test.promz_c_masks
Initial value:
1= [
2 np.full((glob.nproma, domains[jg - 1].cells.nblks), False)
3 for jg in range(1, glob.n_dom + 1)
4]

Definition at line 32 of file halo_sync_test.py.

◆ rank

halo_sync_test.rank = comin.parallel_get_host_mpi_rank()

Definition at line 21 of file halo_sync_test.py.

◆ var_descriptors

list halo_sync_test.var_descriptors
Initial value:
1= [
2 (
3 (f"test_var_{dim}D_{dtype}_{sync_mode}", jg),
4 {"zaxis_id": dim2comin_zaxis[dim], "datatype": dtype},
5 sync_mode,
6 )
7 for dim, dtype, jg, sync_mode in product(
8 [2, 3], comin_dtypes, range(1, glob.n_dom + 1), ["after_write", "before_read"]
9 )
10]

Definition at line 47 of file halo_sync_test.py.