81 timestep, completion_procedure)
83 real(kind=DOUBLE_PRECISION),
dimension(:) :: field_values
84 integer,
intent(in) :: field_size, reduction_op, root, timestep
85 character(len=*),
intent(in) :: field_name
88 if (io_configuration%my_io_rank .eq. root)
then 93 if (io_configuration%my_io_rank .ne. root)
then 96 timestep, completion_procedure)
107 real(DEFAULT_PRECISION),
dimension(:) :: values
108 character(len=*) :: field_name
115 allreduce_information%root, timestep, allreduce_information%completion_procedure)
125 character(len=*),
intent(in) :: field_name
126 integer,
intent(in) :: timestep, root
130 class(*),
pointer :: generic
133 if (.not.
associated(allreduce_information))
then 136 if (.not.
associated(allreduce_information))
then 137 allocate(allreduce_information)
138 allreduce_information%completion_procedure=>completion_procedure
139 allreduce_information%root=root
140 generic=>allreduce_information
153 character(len=*),
intent(in) :: field_name
154 integer,
intent(in) :: timestep
155 logical,
intent(in) :: dolock
158 class(*),
pointer :: generic
164 if (
associated(generic))
then 167 find_allreduce_information=>generic
170 find_allreduce_information=>null()
179 character(len=*),
intent(in) :: field_name
180 integer,
intent(in) :: timestep
181 logical,
intent(in) :: dolock
logical function, public check_allreduction_inter_io_for_completion(io_configuration)
Determines whether this all reduction inter IO functionality has completed or not.
integer function forthread_rwlock_init(rwlock_id, attr_id)
All reduction, which does a reduce and then broadcasts the data to all IO servers.
Gets a specific generic element out of the list, stack, queue or map with the corresponding key...
Returns whether a collection is empty.
subroutine, public init_reduction_inter_io(io_configuration)
Initialises the reduction action.
Overall IO configuration.
integer, volatile allreduce_rwlock
logical, volatile initialised
subroutine, public perform_inter_io_reduction(io_configuration, field_values, field_size, reduction_field_name, reduction_op, root, timestep, completion_procedure)
Actually handles the processing for this data wrt the vertical reduction.
logical function, public check_reduction_inter_io_for_completion(io_configuration)
Checks this action for completion, when all are completed then the IO server can shutdown as this is ...
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
integer function forthread_rwlock_rdlock(lock_id)
Contains common definitions for the data and datatypes used by MONC.
A hashmap structure, the same as a map but uses hashing for greatly improved performance when storing...
subroutine, public finalise_broadcast_inter_io()
Finalises the broadcast inter IO functionality.
Conversion between common inbuilt FORTRAN data types.
Converts data types to strings.
integer function forthread_rwlock_wrlock(lock_id)
subroutine, public finalise_allreduction_inter_io(io_configuration)
Finalises the all reduction inter IO functionality.
integer, parameter, public double_precision
Double precision (64 bit) kind.
Broadcast inter IO communication which sends a value from one IO server to all others. This tracks field name and timestep and only issues one call (and one results call to completion) for that combination.
This is a thread pool and the single management "main" thread will spawn out free threads in the pool...
subroutine internal_reduction_completion_procedure(io_configuration, values, field_name, timestep)
Internal completion, called after the reduce has completed (on root) and calls out to broadcast...
subroutine, public check_thread_status(ierr)
Checks the error status of any thread operation and reports an error if it failed.
subroutine, public perform_inter_io_broadcast(io_configuration, field_values, field_size, field_name, root, timestep, completion_procedure)
Performs an inter IO broadcast of data from the root to all other IO servers. Note that this is on th...
Collection data structures.
subroutine, public init_broadcast_inter_io(io_configuration)
Initialises the broadcast inter IO functionality.
integer, parameter, public string_length
Default length of strings.
Inter IO server communication specific functionality. This manages all of the communication that migh...
subroutine remove_allreduce_information(field_name, timestep, dolock)
Removes an all reduce status information based on the field name and timestep.
subroutine, public init_allreduction_inter_io(io_configuration)
Initialises the all reduction inter IO functionality.
integer function forthread_rwlock_destroy(rwlock_id)
subroutine, public finalise_reduction_inter_io(io_configuration)
Finalises the reduction action, waiting for all outstanding requests and then freeing data...
integer function forthread_rwlock_unlock(lock_id)
Reduction inter IO action which will perform reductions between IO servers. This is not as trivial as...
Puts a generic key-value pair into the map.
integer function, public get_reduction_operator(op_string)
Given the map of action attributes this procedure will identify the reduction operator that has been ...
type(hashmap_type), volatile allreduce_types
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...
type(allreduce_type) function, pointer find_allreduce_information(field_name, timestep, dolock)
Finds an all reduce status information based on the field name and timestep, or returns null if none ...
Removes a specific element from the list or map.
subroutine add_allreduce_information_if_needed(field_name, timestep, root, completion_procedure)
Adds an all reduce information to the status if it does not exist.