MONC
|
Reduction inter IO action which will perform reductions between IO servers. This is not as trivial as calling the MPI function as it is nondeterministic when messages will arrive and hence when one reduction on a process and a reduction on another should be called. More...
Data Types | |
type | reduction_progress_type |
Functions/Subroutines | |
subroutine, public | init_reduction_inter_io (io_configuration) |
Initialises the reduction action. More... | |
subroutine | handle_recv_data_from_io_server (io_configuration, data_buffer, inter_io_index) |
Handles the receiving of data from some other IO server. This is issued call back style within a thread to handle that data. More... | |
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 called once all MONC processes have deregistered. More... | |
subroutine, public | finalise_reduction_inter_io (io_configuration) |
Finalises the reduction action, waiting for all outstanding requests and then freeing data. More... | |
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. More... | |
subroutine | clean_progress (myrank) |
logical function | check_and_clean_progress (myrank) |
Checks all the reduction progresses and will remove any that have completed. This is designed to be called from an IO server other than 0 (the master IO server) and it checks if the outstanding async send handle has completed. Checking on the master IO server or checking any progress that is not currently sending is fine and will not impact the correctness (but obviously the progress wont be freed) More... | |
subroutine | integrate_io_server_collective_values (reduction_op, reduction_progress, single_server_values, number_elements, collective_values_empty) |
Integrates the collective values from another IO server into the currently stored values. More... | |
subroutine | handle_local_moncs_completed_collective (io_configuration, reduction_progress) |
Handles the case where the local MONC processes have completed their collective operation for a specific reduction and, for this IO server, it either needs to send its value to the master IO server or, if it is the master, check for completion. More... | |
subroutine | handle_process_recv_from_other_io_server (io_configuration, inter_io_comm, myrank, data_buffer, number_io_servers) |
Handles the data received from another IO server, locates the correct reduction progress, appends the information and then checks for & deals with the situation where that reduction is completed. More... | |
subroutine | handle_collective_completed (io_configuration, reduction_progress) |
Handles the situation where collective communication for a specific reduction has completed across all IO servers. More... | |
type(reduction_progress_type) function, pointer | find_or_add_reduction_progress (timestep, reduction_operator, root, field_name, completion_procedure) |
Finds or adds a specific reduction progress based upon the timestep and reduction operator. If none can be found then a new progress is added in. With new progresses this procedure will initialise them. More... | |
type(reduction_progress_type) function, pointer | find_reduction_progress (timestep, reduction_operator, field_name, issue_read_lock) |
Locates a specific reduction progress based upon the timestep, operator and field name. More... | |
subroutine | remove_reduction_progress (reduction_progress) |
Removes a specific reduction progress. More... | |
character(len=string_length) function | generate_reduction_key (field_name, timestep, reduction_operator) |
Generates the lookup key that is used for the map storage of reduction progresses. More... | |
type(reduction_progress_type) function, pointer | retrieve_reduction_progress (mapentry) |
Helper function to retrieve the reduction progress from a mapentry. More... | |
integer function, public | get_reduction_operator (op_string) |
Given the map of action attributes this procedure will identify the reduction operator that has been selected by the configuration. More... | |
Variables | |
integer, parameter | mean =1 |
integer, parameter | min =2 |
integer, parameter | max =3 |
integer, parameter | sum =4 |
integer, parameter | my_inter_io_tag =1 |
integer, parameter | perform_clean_every =200 |
character(len= *), parameter | my_inter_io_name ="reductioninterio" |
integer, volatile | reduction_progress_rwlock |
integer, volatile | inter_io_description_mutex |
integer, volatile | clean_progress_mutex |
integer, volatile | reduction_count_mutex |
integer, volatile | previous_clean_reduction_count |
integer, volatile | reduction_count |
type(hashmap_type), volatile | reduction_progresses |
logical, volatile | initialised =.false. |
Reduction inter IO action which will perform reductions between IO servers. This is not as trivial as calling the MPI function as it is nondeterministic when messages will arrive and hence when one reduction on a process and a reduction on another should be called.
|
private |
Checks all the reduction progresses and will remove any that have completed. This is designed to be called from an IO server other than 0 (the master IO server) and it checks if the outstanding async send handle has completed. Checking on the master IO server or checking any progress that is not currently sending is fine and will not impact the correctness (but obviously the progress wont be freed)
Definition at line 174 of file reduction-inter-io.F90.
logical function, public reduction_inter_io_mod::check_reduction_inter_io_for_completion | ( | type(io_configuration_type), intent(inout) | io_configuration | ) |
Checks this action for completion, when all are completed then the IO server can shutdown as this is called once all MONC processes have deregistered.
io_configuration | Configuration state of the IO server |
Definition at line 82 of file reduction-inter-io.F90.
|
private |
Definition at line 154 of file reduction-inter-io.F90.
subroutine, public reduction_inter_io_mod::finalise_reduction_inter_io | ( | type(io_configuration_type), intent(inout) | io_configuration | ) |
Finalises the reduction action, waiting for all outstanding requests and then freeing data.
io_configuration | Configuration state of the IO server |
Definition at line 90 of file reduction-inter-io.F90.
|
private |
Finds or adds a specific reduction progress based upon the timestep and reduction operator. If none can be found then a new progress is added in. With new progresses this procedure will initialise them.
timestep | The timestep to match |
reduction_operator | The reduction operator to match |
field_name | The name of the field that the reduction type represents |
num_vectors | The number of reduction vectors (items to reduce) to be stored |
Definition at line 360 of file reduction-inter-io.F90.
|
private |
Locates a specific reduction progress based upon the timestep, operator and field name.
timestep | The timestep to search for |
reduction_operator | The reduction operator to search for |
field_name | The field name which must match |
reduction_progress_location | Optional location which is set to be the index of the matching progress item |
Definition at line 406 of file reduction-inter-io.F90.
|
private |
Generates the lookup key that is used for the map storage of reduction progresses.
field_name | The field name |
timestep | The timestep |
reduction_operator | The reduction operator |
Definition at line 455 of file reduction-inter-io.F90.
integer function, public reduction_inter_io_mod::get_reduction_operator | ( | character(len=*), intent(in) | op_string | ) |
Given the map of action attributes this procedure will identify the reduction operator that has been selected by the configuration.
action_attributes | Action attributes from the IO server configuration |
Definition at line 487 of file reduction-inter-io.F90.
|
private |
Handles the situation where collective communication for a specific reduction has completed across all IO servers.
reduction_progress | The reduction progress data type |
number_io_servers | The total number of IO servers |
Definition at line 338 of file reduction-inter-io.F90.
|
private |
Handles the case where the local MONC processes have completed their collective operation for a specific reduction and, for this IO server, it either needs to send its value to the master IO server or, if it is the master, check for completion.
io_configuration | Configuration state of the IO server |
reduction_progress | The specific reduction progress data item that represents this reduction |
z_size | Size in Z |
reduction_progress_location | Location in the reduction progresses list that this single progress item resides at |
Definition at line 272 of file reduction-inter-io.F90.
|
private |
Handles the data received from another IO server, locates the correct reduction progress, appends the information and then checks for & deals with the situation where that reduction is completed.
number_io_servers | The total number of IO servers |
z_size | Number of levels in the vertical |
Definition at line 304 of file reduction-inter-io.F90.
|
private |
Handles the receiving of data from some other IO server. This is issued call back style within a thread to handle that data.
io_configuration | Configuration state of the IO server |
inter_io_index | Index of the inter IO communication description |
Definition at line 69 of file reduction-inter-io.F90.
subroutine, public reduction_inter_io_mod::init_reduction_inter_io | ( | type(io_configuration_type), intent(inout) | io_configuration | ) |
Initialises the reduction action.
io_configuration | The IO server configuration |
Definition at line 50 of file reduction-inter-io.F90.
|
private |
Integrates the collective values from another IO server into the currently stored values.
reduction_op | The reduction operator to perform |
reduction_progress | The progress data type which is updated |
single_server_values | The values from the IO server which need to be integrated |
dim_one_size | Size in first dimension |
target_index | The index where we are putting the values into the current value array of reduction progress |
collective_values_empty | Whether the collective values is empty |
Definition at line 237 of file reduction-inter-io.F90.
subroutine, public reduction_inter_io_mod::perform_inter_io_reduction | ( | type(io_configuration_type), intent(inout) | io_configuration, |
real(kind=double_precision), dimension(:) | field_values, | ||
integer, intent(in) | field_size, | ||
character(len=*), intent(in) | reduction_field_name, | ||
integer, intent(in) | reduction_op, | ||
integer, intent(in) | root, | ||
integer, intent(in) | timestep, | ||
procedure(handle_completion) | completion_procedure | ||
) |
Actually handles the processing for this data wrt the vertical reduction.
io_configuration | Configuration of the IO server |
field_values | The values to communicate |
field_size | Number of elements to communicate |
reduction_field_name | Field name that the reduction will be performed over |
reduction_op | The reduction operator to use |
root | The root IO server process |
timestep | The timestep this is issued at |
completion_procedure | Callback completion procedure |
Definition at line 125 of file reduction-inter-io.F90.
|
private |
Removes a specific reduction progress.
reduction_progress | The reduction progress to remove from the list |
Definition at line 436 of file reduction-inter-io.F90.
|
private |
Helper function to retrieve the reduction progress from a mapentry.
mapentry | The map entry to retrieve from |
Definition at line 465 of file reduction-inter-io.F90.
|
private |
Definition at line 39 of file reduction-inter-io.F90.
|
private |
Definition at line 42 of file reduction-inter-io.F90.
|
private |
Definition at line 39 of file reduction-inter-io.F90.
|
private |
Definition at line 27 of file reduction-inter-io.F90.
|
private |
Definition at line 27 of file reduction-inter-io.F90.
|
private |
Definition at line 27 of file reduction-inter-io.F90.
|
private |
Definition at line 29 of file reduction-inter-io.F90.
|
private |
Definition at line 28 of file reduction-inter-io.F90.
|
private |
Definition at line 28 of file reduction-inter-io.F90.
|
private |
Definition at line 39 of file reduction-inter-io.F90.
|
private |
Definition at line 39 of file reduction-inter-io.F90.
|
private |
Definition at line 39 of file reduction-inter-io.F90.
|
private |
Definition at line 39 of file reduction-inter-io.F90.
|
private |
Definition at line 41 of file reduction-inter-io.F90.
|
private |
Definition at line 27 of file reduction-inter-io.F90.