Skip to content

adam_mpih_nvf_object

ADAM, MPI handler class definition, NVF backend.

Extend common mpih class adding NVF features.

Source: src/lib/nvf/adam_mpih_nvf_object.F90

Dependencies

Contents

Variables

NameTypeAttributesDescription
CUDA_SILENT_ERRinteger(kind=I4P)parameterCUDA silent error code.
INI_SECTION_NAMEcharacter(len=4)parameterINI (config) file section name containing configs.

Derived Types

mpih_nvf_object

MPI handler class, NVF backend.

Inheritance

Extends: mpih_object

Components

NameTypeAttributesDescription
myrankinteger(kind=I4P)MPI rank process.
myrankstrcharacter(len=:)allocatableMPI rank process stringified.
procs_numberinteger(kind=I4P)Number of MPI processes.
memory_availreal(kind=R8P)CPU memory available (GB) for each process.
errorinteger(kind=I4P)Error traping flag.
timingreal(kind=R8P)Tic toc timing.
tictocinteger(kind=I4P)Next is tic or toc?
req_send_recvinteger(kind=I4P)allocatableMPI request receive flags.
mydevinteger(kind=I4P)My GPU rank.
local_comminteger(kind=I4P)Local communicator.
iercudainteger(kind=I4P)Error trapping flag for CUDAFortran.
cblkinteger(kind=I4P)Default CUDA block dimensions.
gridtype(dim3)CUDA grid and block.
tBlocktype(dim3)CUDA grid and block.

Type-Bound Procedures

NameAttributesDescription
abortpass(self)Handy MPI abort wrapper.
barrierpass(self)Handy MPI barrier wrapper.
error_stoppass(self)Stop run with error output.
finalizepass(self)Handy MPI finalize wrapper.
print_messagepass(self)Print a message on stdout with rank prefix.
tictoc_timingpass(self)Return the last tic toc timing.
ticpass(self)Start a tic toc timing.
tocpass(self)Stop a tic toc timing.
initializepass(self)Initialize MPI handler data.
check_cuda_errorpass(self)Check if CUDA error occurs and abort in case.
descriptionpass(self)Return pretty-printed object description.
load_from_filepass(self)Load config from file.
print_device_propertiespass(self)Pretty print device properties.
set_cuda_dimensionspass(self)Compute CUDA grid dimensions for GPU parallel computations.

Subroutines

initialize

Initialize MPI handler data.

fortran
subroutine initialize(self, do_mpi_init, do_device_init, myrankstr_char_length, verbose)

Arguments

NameTypeIntentAttributesDescription
selfclass(mpih_nvf_object)inoutMPI handler.
do_mpi_initlogicalinoptionalFlag to activate MPI init call.
do_device_initlogicalinoptionalFlag to activate device init call.
myrankstr_char_lengthinteger(kind=I4P)inoptionalMPI ID string length.
verboselogicalinoptionalTrigger verbose output.

Call graph

check_cuda_error

Check if CUDA error occurs and abort in case.

fortran
subroutine check_cuda_error(self, error_code, msg)

Arguments

NameTypeIntentAttributesDescription
selfclass(mpih_nvf_object)inoutMPI handler.
error_codeinteger(kind=I4P)inoptionalAbort error code.
msgcharacter(len=*)inoptionalError message.

Call graph

load_from_file

Load config from file.

fortran
subroutine load_from_file(self, file_parameters, go_on_fail)

Arguments

NameTypeIntentAttributesDescription
selfclass(mpih_nvf_object)inoutMPI handler.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
go_on_faillogicalinoptionalGo on if load fails.

Call graph

Pretty print device properties.

fortran
subroutine print_device_properties(self, device_properties)

Arguments

NameTypeIntentAttributesDescription
selfclass(mpih_nvf_object)inMPI handler.
device_propertiestype(cudadeviceprop)inDevice properties.

Call graph

set_cuda_dimensions

Compute CUDA grid dimensions for GPU parallel computations.

fortran
subroutine set_cuda_dimensions(self, cgrd, cblk)

Arguments

NameTypeIntentAttributesDescription
selfclass(mpih_nvf_object)inoutMPI handler.
cgrdinteger(kind=I4P)inCUDA grid dimensions.
cblkinteger(kind=I4P)inoptionalCUDA block dimensions.

Call graph

Functions

description

Return a pretty-formatted object description.

Attributes: pure

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(mpih_nvf_object)inMPI handler.

Call graph