MONC
global-callback.F90
Go to the documentation of this file.
1 
8  implicit none
9 
10 #ifndef TEST_MODE
11  private
12 #endif
13 
15 contains
16 
19  subroutine init_global_callback_inter_io(io_configuration)
20  type(io_configuration_type), intent(inout) :: io_configuration
21 
22  call init_allreduction_inter_io(io_configuration)
23  end subroutine init_global_callback_inter_io
24 
27  subroutine finalise_global_callback_inter_io(io_configuration)
28  type(io_configuration_type), intent(inout) :: io_configuration
29 
30  call finalise_allreduction_inter_io(io_configuration)
32 
38  subroutine perform_global_callback(io_configuration, field_name, timestep, completion_procedure)
39  type(io_configuration_type), intent(inout) :: io_configuration
40  integer, intent(in) :: timestep
41  character(len=*), intent(in) :: field_name
42  procedure(handle_completion) :: completion_procedure
43 
44  real(kind=DEFAULT_PRECISION), dimension(:), allocatable :: v
45  integer :: i
46 
47  allocate(v(1))
48  v=0.0
49  do i=1, io_configuration%number_of_moncs
50  call perform_inter_io_allreduction(io_configuration, v, 1, field_name, 2, 0, timestep, completion_procedure)
51  end do
52  deallocate(v)
53  end subroutine perform_global_callback
All reduction, which does a reduce and then broadcasts the data to all IO servers.
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17
subroutine, public init_global_callback_inter_io(io_configuration)
Initialises the global callback.
Contains common definitions for the data and datatypes used by MONC.
Definition: datadefn.F90:2
subroutine, public finalise_allreduction_inter_io(io_configuration)
Finalises the all reduction inter IO functionality.
subroutine, public perform_global_callback(io_configuration, field_name, timestep, completion_procedure)
Performs a global callback.
Global callback inter IO, which registers the callback with identifiers and then the procedure is act...
Inter IO server communication specific functionality. This manages all of the communication that migh...
subroutine, public init_allreduction_inter_io(io_configuration)
Initialises the all reduction inter IO functionality.
subroutine, public finalise_global_callback_inter_io(io_configuration)
Finalises the global callback.
subroutine, public perform_inter_io_allreduction(io_configuration, field_values, field_size, field_name, reduction_op, root, timestep, completion_procedure)
Performs the all reduction inter IO reduction.
Parses the XML configuration file to produce the io configuration description which contains the data...