Appearance
adam_prism_fnl_probes_object
ADAM, PRISM field probes, FNL backend.
Device twin of the probe stencils of prism_probes_object: the probes are sampled on the device and only the nv*probes_number local sums are copied to the host, which then reduces and writes them as on the CPU.
Source: src/app/prism/fnl/adam_prism_fnl_probes_object.F90
Dependencies
Contents
Derived Types
prism_fnl_probes_object
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
entries | integer(kind=I4P) | Local stencil cells. | |
first_gpu | integer(kind=I4P) | pointer | First local cell of each probe [probes_number+1]. |
b_gpu | integer(kind=I4P) | pointer | Block of each local cell [entries]. |
i_gpu | integer(kind=I4P) | pointer | i of each local cell [entries]. |
j_gpu | integer(kind=I4P) | pointer | j of each local cell [entries]. |
k_gpu | integer(kind=I4P) | pointer | k of each local cell [entries]. |
weight_gpu | real(kind=R8P) | pointer | Weight of each local cell [entries]. |
value_gpu | real(kind=R8P) | pointer | Local sums, v fastest [nv*probes_number]. |
value | real(kind=R8P) | allocatable | Host copy of the local sums [nv*probes_number]. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
destroy | pass(self) | Free device data owned by this object. |
initialize | pass(self) | Copy the host stencils to the device. |
sample | pass(self) | Sample the device fields into the host probes (local sums). |
Subroutines
destroy
Free device data owned by this object.
fortran
subroutine destroy(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_probes_object) | inout | Probes, device. |
Call graph
initialize
Copy the host stencils to the device; a rank without stencil cells keeps no device data.
fortran
subroutine initialize(self, probes, nv)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_probes_object) | inout | Probes, device. | |
probes | type(prism_probes_object) | in | Probes, host, stencils built. | |
nv | integer(kind=I4P) | in | Number of sampled variables. |
Call graph
sample
Sample the device fields into the host probes (local sums, reduced by prism_probes_object%save_history).
fortran
subroutine sample(self, probes, ngc, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_probes_object) | inout | Probes, device. | |
probes | type(prism_probes_object) | inout | Probes, host. | |
ngc | integer(kind=I4P) | in | Number of ghost cells. | |
q_gpu | real(kind=R8P) | in | Fields [nb,ni,nj,nk,nv]. |
Call graph
sample_dev_kernel
Local weighted sums of the stencil cells, one thread per (variable, probe).
fortran
subroutine sample_dev_kernel(nv, probes_number, ngc, first_gpu, b_gpu, i_gpu, j_gpu, k_gpu, weight_gpu, q_gpu, value_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
nv | integer(kind=I4P) | in | Sizes. | |
probes_number | integer(kind=I4P) | in | Sizes. | |
ngc | integer(kind=I4P) | in | Sizes. | |
first_gpu | integer(kind=I4P) | in | First local cell of each probe. | |
b_gpu | integer(kind=I4P) | in | Local cells. | |
i_gpu | integer(kind=I4P) | in | Local cells. | |
j_gpu | integer(kind=I4P) | in | Local cells. | |
k_gpu | integer(kind=I4P) | in | Local cells. | |
weight_gpu | real(kind=R8P) | in | Local cell weights. | |
q_gpu | real(kind=R8P) | in | Fields. | |
value_gpu | real(kind=R8P) | inout | Local sums, v fastest. |
Call graph