Skip to content

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 ​

NameTypeAttributesDescription
entriesinteger(kind=I4P)Local stencil cells.
first_gpuinteger(kind=I4P)pointerFirst local cell of each probe [probes_number+1].
b_gpuinteger(kind=I4P)pointerBlock of each local cell [entries].
i_gpuinteger(kind=I4P)pointeri of each local cell [entries].
j_gpuinteger(kind=I4P)pointerj of each local cell [entries].
k_gpuinteger(kind=I4P)pointerk of each local cell [entries].
weight_gpureal(kind=R8P)pointerWeight of each local cell [entries].
value_gpureal(kind=R8P)pointerLocal sums, v fastest [nv*probes_number].
valuereal(kind=R8P)allocatableHost copy of the local sums [nv*probes_number].

Type-Bound Procedures ​

NameAttributesDescription
destroypass(self)Free device data owned by this object.
initializepass(self)Copy the host stencils to the device.
samplepass(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

NameTypeIntentAttributesDescription
selfclass(prism_fnl_probes_object)inoutProbes, 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

NameTypeIntentAttributesDescription
selfclass(prism_fnl_probes_object)inoutProbes, device.
probestype(prism_probes_object)inProbes, host, stencils built.
nvinteger(kind=I4P)inNumber 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

NameTypeIntentAttributesDescription
selfclass(prism_fnl_probes_object)inoutProbes, device.
probestype(prism_probes_object)inoutProbes, host.
ngcinteger(kind=I4P)inNumber of ghost cells.
q_gpureal(kind=R8P)inFields [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

NameTypeIntentAttributesDescription
nvinteger(kind=I4P)inSizes.
probes_numberinteger(kind=I4P)inSizes.
ngcinteger(kind=I4P)inSizes.
first_gpuinteger(kind=I4P)inFirst local cell of each probe.
b_gpuinteger(kind=I4P)inLocal cells.
i_gpuinteger(kind=I4P)inLocal cells.
j_gpuinteger(kind=I4P)inLocal cells.
k_gpuinteger(kind=I4P)inLocal cells.
weight_gpureal(kind=R8P)inLocal cell weights.
q_gpureal(kind=R8P)inFields.
value_gpureal(kind=R8P)inoutLocal sums, v fastest.

Call graph