Appearance
adam_fnl_maps_object
ADAM, maps class definition, FNL backend.
Source: src/lib/fnl/adam_fnl_maps_object.F90
Dependencies
Contents
- maps_fnl_object
- copy_cpu_gpu
- destroy
- free_split_rows
- make_split_rows
- merge_sort_by_key
- make_prolongation_rows
- initialize
- pack_copy_ijk
Derived Types
maps_fnl_object
Maps class, FNL backend.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
local_map_ghost_cell_gpu | integer(kind=I8P) | pointer | Local map for ghost cells updating, cells order. |
local_map_ghost_heavy_gpu | integer(kind=I8P) | pointer | The rows of local_map_ghost_cell_gpu that are not copies, in its order (none: null). |
local_map_ghost_copy_gpu | integer(kind=I4P) | pointer | The copy rows, [b_send, ijk_send, b_recv, ijk_recv] (pack_copy_ijk), receiving block fastest (none: null). |
local_map_ghost_cell_prol_gpu | integer(kind=I4P) | pointer | The flag-4 (coarse->fine) rows of local_map_ghost_heavy_gpu (#157 B2; none: null). |
seam_rho_gpu | real(kind=R8P) | pointer | Clamped 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_gpu | integer(kind=I8P) | pointer | Communication map, fec information, cell order. |
comm_map_send_ghost_cell_gpu | integer(kind=I8P) | pointer | Communication map, fec information, cell order. |
comm_map_send_density_rows_gpu | integer(kind=I4P) | pointer | The density rows of the flag-4 cells of comm_map_send_ghost_cell_gpu (#157 B3; none: null). |
seam_rho_send_gpu | real(kind=R8P) | pointer | Clamped density per row of comm_map_send_ghost_cell_gpu (at those rows). |
send_buffer_ghost_gpu | real(kind=R8P) | pointer | Send buffer of ghost cells. |
recv_buffer_ghost_gpu | real(kind=R8P) | pointer | Receive buffer of ghost cells. |
local_map_bc_crown_gpu | integer(kind=I8P) | pointer | Local map for face BC ghost cells, "crown" order. |
seam_local_map_ghost_cell_gpu | integer(kind=I4P) | pointer | Per-cell seam ghost map (sorted by peer_realm). |
seam_local_send_buf_gpu | real(kind=R8P) | pointer | Per-peer pack buffer, device-resident. |
seam_local_recv_buf_gpu | real(kind=R8P) | pointer | Per-peer unpack buffer, device-resident. |
seam_mpi_send_cell_gpu | integer(kind=I4P) | pointer | Cross-rank send rows [rank, b, i, j, k]. |
seam_mpi_recv_cell_gpu | integer(kind=I4P) | pointer | Cross-rank receive rows [rank, b, i, j, k]. |
seam_mpi_send_rho_gpu | real(kind=R8P) | pointer | Clamped density per send row (its kind-4 rows): the seam fill guard's part once per ghost (#157 B4). |
seam_ghost_fill | integer(kind=I4P) | Active seam ghost-fill regime (host mirror). | |
seam_density_var | integer(kind=I4P) | Seam fill density guard (host mirror of maps_object%seam_density_var, #101). | |
seam_restriction | integer(kind=I4P) | Fine->coarse seam restriction (host mirror of maps_object%seam_restriction, #68 C2). | |
refine_ratio | integer(kind=I4P) | Per-axis 2:1 refinement factor (host mirror, issue #46): 1 on axes the tree never refines. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
copy_cpu_gpu | pass(self) | Copy data from (maps global singleton) CPU to (maps_fnl_object) GPU. |
destroy | pass(self) | Free device data owned by the helper. |
initialize | pass(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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(maps_fnl_object) | inout | The maps. | |
maps | type(maps_object) | in | Realm-local CPU maps; was the maps singleton. | |
verbose | logical | in | optional | Flag to activate verbose mode. |
Call graph
destroy
Free device data owned by the maps FNL helper.
fortran
subroutine destroy(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(maps_fnl_object) | inout | The 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(maps_fnl_object) | inout | The 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(maps_fnl_object) | inout | The FNL helper. | |
map | integer(kind=I8P) | in | Local 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
key | integer(kind=I8P) | in | Keys. | |
ord | integer(kind=I4P) | inout | Permutation (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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
map | integer(kind=I8P) | in | Ghost-cell map (host). | |
cflag | integer(kind=I4P) | in | Column of the kind flag. | |
prol_gpu | integer(kind=I4P) | inout | pointer | The flag-4 rows (device). |
rho_gpu | real(kind=R8P) | inout | pointer | Scratch, one value per row (device). |
cvar | integer(kind=I4P) | in | optional | Column of the variable. |
var | integer(kind=I4P) | in | optional | Variable. |
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(maps_fnl_object) | inout | The maps, FNL backend. | |
maps | type(maps_object) | in | Realm-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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
i | integer(kind=I8P) | in | Cell indexes. | |
j | integer(kind=I8P) | in | Cell indexes. | |
k | integer(kind=I8P) | in | Cell indexes. |
Call graph