Skip to content

adam_fnl_maps_object ​

ADAM, maps class definition, FNL backend.

Source: src/lib/fnl/adam_fnl_maps_object.F90

Dependencies

Contents ​

Derived Types ​

maps_fnl_object ​

Maps class, FNL backend.

Components

NameTypeAttributesDescription
local_map_ghost_cell_gpuinteger(kind=I8P)pointerLocal map for ghost cells updating, cells order.
local_map_ghost_heavy_gpuinteger(kind=I8P)pointerThe rows of local_map_ghost_cell_gpu that are not copies, in its order (none: null).
local_map_ghost_copy_gpuinteger(kind=I4P)pointerThe copy rows, [b_send, ijk_send, b_recv, ijk_recv] (pack_copy_ijk), receiving block fastest (none: null).
local_map_ghost_cell_prol_gpuinteger(kind=I4P)pointerThe flag-4 (coarse->fine) rows of local_map_ghost_heavy_gpu (#157 B2; none: null).
seam_rho_gpureal(kind=R8P)pointerClamped density per row of local_map_ghost_heavy_gpu (its flag-4 rows): the seam fill guard's part once per ghost (#157 B2).
comm_map_recv_ghost_cell_gpuinteger(kind=I8P)pointerCommunication map, fec information, cell order.
comm_map_send_ghost_cell_gpuinteger(kind=I8P)pointerCommunication map, fec information, cell order.
comm_map_send_density_rows_gpuinteger(kind=I4P)pointerThe density rows of the flag-4 cells of comm_map_send_ghost_cell_gpu (#157 B3; none: null).
seam_rho_send_gpureal(kind=R8P)pointerClamped density per row of comm_map_send_ghost_cell_gpu (at those rows).
send_buffer_ghost_gpureal(kind=R8P)pointerSend buffer of ghost cells.
recv_buffer_ghost_gpureal(kind=R8P)pointerReceive buffer of ghost cells.
local_map_bc_crown_gpuinteger(kind=I8P)pointerLocal map for face BC ghost cells, "crown" order.
seam_local_map_ghost_cell_gpuinteger(kind=I4P)pointerPer-cell seam ghost map (sorted by peer_realm).
seam_local_send_buf_gpureal(kind=R8P)pointerPer-peer pack buffer, device-resident.
seam_local_recv_buf_gpureal(kind=R8P)pointerPer-peer unpack buffer, device-resident.
seam_mpi_send_cell_gpuinteger(kind=I4P)pointerCross-rank send rows [rank, b, i, j, k].
seam_mpi_recv_cell_gpuinteger(kind=I4P)pointerCross-rank receive rows [rank, b, i, j, k].
seam_mpi_send_rho_gpureal(kind=R8P)pointerClamped density per send row (its kind-4 rows): the seam fill guard's part once per ghost (#157 B4).
seam_ghost_fillinteger(kind=I4P)Active seam ghost-fill regime (host mirror).
seam_density_varinteger(kind=I4P)Seam fill density guard (host mirror of maps_object%seam_density_var, #101).
seam_restrictioninteger(kind=I4P)Fine->coarse seam restriction (host mirror of maps_object%seam_restriction, #68 C2).
refine_ratiointeger(kind=I4P)Per-axis 2:1 refinement factor (host mirror, issue #46): 1 on axes the tree never refines.

Type-Bound Procedures

NameAttributesDescription
copy_cpu_gpupass(self)Copy data from (maps global singleton) CPU to (maps_fnl_object) GPU.
destroypass(self)Free device data owned by the helper.
initializepass(self)Initialize MPI handler data.

Subroutines ​

copy_cpu_gpu ​

Copy data from the (realm-local) CPU maps to (maps_fnl_object) GPU.

fortran
subroutine copy_cpu_gpu(self, maps, verbose)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_fnl_object)inoutThe maps.
mapstype(maps_object)inRealm-local CPU maps; was the maps singleton.
verboselogicalinoptionalFlag to activate verbose mode.

Call graph

destroy ​

Free device data owned by the maps FNL helper.

fortran
subroutine destroy(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_fnl_object)inoutThe FNL helper.

Call graph

free_split_rows ​

Free the heavy and copy rows of the local fill (#157 C4).

fortran
subroutine free_split_rows(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_fnl_object)inoutThe FNL helper.

Call graph

make_split_rows ​

The device rows of the local fill's two launches from the local ghost-cell map (#157 C4): the restriction and prolongation rows (flag 8, 4) in the map's order, with their flag-4 list and the guard's scratch; the copy rows (flag 1) packed as [b_send, ijk_send, b_recv, ijk_recv] (pack_copy_ijk), sorted by receiver (i, j, k), then block, so that the receiving block runs fastest. A kind with no row leaves its device array null.

fortran
subroutine make_split_rows(self, map)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_fnl_object)inoutThe FNL helper.
mapinteger(kind=I8P)inLocal ghost-cell map (host).

Call graph

merge_sort_by_key ​

Stable merge sort of ord by key(ord).

Attributes: pure

fortran
subroutine merge_sort_by_key(key, ord)

Arguments

NameTypeIntentAttributesDescription
keyinteger(kind=I8P)inKeys.
ordinteger(kind=I4P)inoutPermutation (in: identity).

Call graph

make_prolongation_rows ​

The device list of the flag-4 (coarse->fine) rows of a ghost-cell map and a scratch value per row, for the seam fill guard computed once per fine ghost (#157 B2, B3); with cvar and var (a map with a row per variable), the flag-4 rows of variable var only. A map with no such row leaves both null. The caller frees any previous allocation.

fortran
subroutine make_prolongation_rows(map, cflag, prol_gpu, rho_gpu, cvar, var)

Arguments

NameTypeIntentAttributesDescription
mapinteger(kind=I8P)inGhost-cell map (host).
cflaginteger(kind=I4P)inColumn of the kind flag.
prol_gpuinteger(kind=I4P)inoutpointerThe flag-4 rows (device).
rho_gpureal(kind=R8P)inoutpointerScratch, one value per row (device).
cvarinteger(kind=I4P)inoptionalColumn of the variable.
varinteger(kind=I4P)inoptionalVariable.

Call graph

initialize ​

Initialize maps from the (realm-local) CPU maps. Requires mpih_fnl (adam_fnl_mpih_global) initialized and maps populated before calling.

fortran
subroutine initialize(self, maps)

Arguments

NameTypeIntentAttributesDescription
selfclass(maps_fnl_object)inoutThe maps, FNL backend.
mapstype(maps_object)inRealm-local CPU maps; was the maps singleton.

Call graph

Functions ​

pack_copy_ijk ​

A cell (i, j, k) packed in one int32: COPY_IJK_BITS bits per index, each biased by COPY_IJK_BIAS (the ghost indexes are negative); the device kernel unpacks it with ibits.

Attributes: pure

Returns: integer(kind=I4P)

fortran
function pack_copy_ijk(i, j, k) result(packed)

Arguments

NameTypeIntentAttributesDescription
iinteger(kind=I8P)inCell indexes.
jinteger(kind=I8P)inCell indexes.
kinteger(kind=I8P)inCell indexes.

Call graph