ComIn 0.5.1
ICON Community Interface
Loading...
Searching...
No Matches
halo_sync_test Namespace Reference

Detailed Description

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()

check_halo_sync ( )

Definition at line 106 of file halo_sync_test.py.

◆ fill_test_var()

fill_test_var ( )

Definition at line 89 of file halo_sync_test.py.

◆ simple_python_constructor()

simple_python_constructor ( )

Definition at line 64 of file halo_sync_test.py.

Constant Documentation

◆ comin_dtypes

list 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 dim2comin_zaxis = {2: comin.COMIN_ZAXIS_2D, 3: comin.COMIN_ZAXIS_3D}

Definition at line 39 of file halo_sync_test.py.

◆ domains

list 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

Definition at line 23 of file halo_sync_test.py.

◆ owner_masks

list 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 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

rank = comin.parallel_get_host_mpi_rank()

Definition at line 21 of file halo_sync_test.py.

◆ var_descriptors

list 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.