MONC
|
The main IO server functionality which handles waiting for commands and data both of which are delt with. The lower level details of the communication, configuration parsing etc are all held elsewhere. The server can be thought of similar to a bus, with command and data channels. The command gives context to what is on the data channel and not all commands require data (such as deregistration of MONC process) More...
Functions/Subroutines | |
subroutine, public | io_server_run (options_database, io_communicator_arg, provided_threading, total_global_processes, continuation_run, io_configuration_file) |
Called to start the IO server and once this subroutine returns then it indicates that the IO server has finished. The runtime is spent in here awaiting commands and then dealing with them. Termination occurs when all MONC processes have deregistered, note that to trigger this then at least one MONC process must first register. More... | |
subroutine | check_for_condi_conflict (raw_contents, options_database) |
Handle potential conditional diagnostics conflict Provides a more helpful error in the case where conditional diagnostics are requested as output, but their components are not enabled. We check this by searching the io_xml_configuration. More... | |
logical function | await_command (command, source, data_buffer) |
Awaits a command or shutdown from MONC processes and other IO servers. More... | |
subroutine | termination_callback (io_configuration, values, field_name, timestep) |
This is the termination callback which is called once all MONCs have deregistered, no sends are active by inter IO communications and all threads are idle. This shuts down the inter IO listening and kickstarts finalisation and closure. More... | |
subroutine | handle_command_message (command, source, data_buffer) |
Called to handle a specific command that has been recieved. More... | |
subroutine | handle_inter_io_communication_command (arguments, data_buffer) |
Handles inter IO server communications. More... | |
subroutine | free_individual_registered_monc_aspects () |
Frees up the memory associated with individual registered MONCs. This is done at the end for all MONCs as we can't deallocate dynamically in a threaded environment without excessive ordering and locking in case some data processing is queued or in progress. More... | |
subroutine | handle_deregistration_command (arguments, data_buffer) |
Deregisteres a specific MONC source process. More... | |
subroutine | pull_back_data_message_and_handle (source, data_set) |
Retrieves the message from MONC off the data channel and throws this to a thread in the thread pool to actually process We do it this way to enforce ordering between the command (including the data set ID) and the raw data itself. More... | |
subroutine | handle_data_message (arguments, data_buffer) |
Handles the command for data download from a specific process. This will allocate the receive buffer and then call to get the data. Once it has been received then the data is run against handling rules. More... | |
subroutine | handle_monc_registration (arguments, data_buffer) |
Handles registration from some MONC process. The source process sends some data description to this IO server which basically tells the IO server the size of the array datas (which might be different on different processes in the case of uneven decomposition.) Based upon this a communication (MPI) data type is constructed and the data size in bytes determined. More... | |
integer function, dimension(2) | send_configuration_to_registree (source) |
Sends the data and field descriptions to the MONC process that just registered with the IO server. More... | |
subroutine | init_data_definition (source, monc_defn) |
Initialise the sizing of data definitions from a MONC process. The IO server determines, from configuration, the structure of each data definition but the size of the arrays depends upon the MONC process (due to uneven distribution of data etc...) This receives the sizing message and then builds the MPI datatype for each data definition that the IO server will receive from that specific MONC process. The field sizings are for all fields in every data definition, and these are applied to each data definition which will simply ignore non matching fields. More... | |
subroutine | get_monc_information_data (source) |
Retrieves MONC information data, this is sent by MONC (and received) regardless, but only actioned if the data has not already been set. More... | |
subroutine | register_present_field_names_to_federators (data_description, recv_count) |
Registers with the writer federator the set of fields (prognostic and diagnostic) that are available, this is based on the array/optional fields present from MONC and the non-optional scalars. This is quite an expensive operation, so only done once. More... | |
subroutine | handle_monc_dimension_information (data_description, monc_defn) |
Handles the provided local MONC dimension and data layout information. More... | |
Variables | |
integer | mpi_type_data_sizing_description |
The MPI type for field sizing (i.e. array size etc send when MONCs register) More... | |
integer | mpi_type_definition_description |
The MPI data type for data descriptions sent to MONCs. More... | |
integer | mpi_type_field_description |
The MPI data type for field descriptions sent to MONCs. More... | |
type(io_configuration_type), save, volatile | io_configuration |
Internal representation of the IO configuration. More... | |
logical, volatile | contine_poll_messages |
Whether to continue waiting command messages from any MONC processes. More... | |
logical, volatile | initialised_present_data |
logical, volatile | contine_poll_interio_messages |
logical, volatile | already_registered_finishing_call |
type(field_description_type), dimension(:), allocatable | registree_field_descriptions |
type(definition_description_type), dimension(:), allocatable | registree_definition_descriptions |
integer, volatile | monc_registration_lock |
The main IO server functionality which handles waiting for commands and data both of which are delt with. The lower level details of the communication, configuration parsing etc are all held elsewhere. The server can be thought of similar to a bus, with command and data channels. The command gives context to what is on the data channel and not all commands require data (such as deregistration of MONC process)
|
private |
Awaits a command or shutdown from MONC processes and other IO servers.
command | The command received is output |
source | The source process received is output |
Definition at line 166 of file ioserver.F90.
|
private |
Handle potential conditional diagnostics conflict Provides a more helpful error in the case where conditional diagnostics are requested as output, but their components are not enabled. We check this by searching the io_xml_configuration.
raw_contents,intended | to be the io_xml_configuration character array |
options_database |
Definition at line 145 of file ioserver.F90.
|
private |
Frees up the memory associated with individual registered MONCs. This is done at the end for all MONCs as we can't deallocate dynamically in a threaded environment without excessive ordering and locking in case some data processing is queued or in progress.
Definition at line 250 of file ioserver.F90.
|
private |
Retrieves MONC information data, this is sent by MONC (and received) regardless, but only actioned if the data has not already been set.
source | MONC source process |
Definition at line 468 of file ioserver.F90.
|
private |
Called to handle a specific command that has been recieved.
command | The command which has been received from some process |
source | The PID of the source (MONC) process |
Definition at line 218 of file ioserver.F90.
|
private |
Handles the command for data download from a specific process. This will allocate the receive buffer and then call to get the data. Once it has been received then the data is run against handling rules.
arguments,element | 1 is the source & element 2 is the data_set |
data_buffer | The actual data from MONC read from the data channel |
Definition at line 322 of file ioserver.F90.
|
private |
Deregisteres a specific MONC source process.
source | The MONC process PID that we are deregistering |
Definition at line 272 of file ioserver.F90.
|
private |
Handles inter IO server communications.
arguments | The thread based arguments, this is the index of the inter IO server description |
Definition at line 236 of file ioserver.F90.
|
private |
Handles the provided local MONC dimension and data layout information.
data_description | The data descriptions sent over from MONC |
monc_defn | The corresponding MONC definition data structure |
Definition at line 562 of file ioserver.F90.
|
private |
Handles registration from some MONC process. The source process sends some data description to this IO server which basically tells the IO server the size of the array datas (which might be different on different processes in the case of uneven decomposition.) Based upon this a communication (MPI) data type is constructed and the data size in bytes determined.
source | The PID of the MONC process that is registering itself |
Definition at line 364 of file ioserver.F90.
|
private |
Initialise the sizing of data definitions from a MONC process. The IO server determines, from configuration, the structure of each data definition but the size of the arrays depends upon the MONC process (due to uneven distribution of data etc...) This receives the sizing message and then builds the MPI datatype for each data definition that the IO server will receive from that specific MONC process. The field sizings are for all fields in every data definition, and these are applied to each data definition which will simply ignore non matching fields.
source | The source MONC PID |
monc_defn | The corresponding MONC definition data structure |
Definition at line 433 of file ioserver.F90.
subroutine, public io_server_mod::io_server_run | ( | type(hashmap_type), intent(inout) | options_database, |
integer, intent(in) | io_communicator_arg, | ||
integer, intent(in) | provided_threading, | ||
integer, intent(in) | total_global_processes, | ||
logical, intent(in) | continuation_run, | ||
character(len=long_string_length), intent(in) | io_configuration_file | ||
) |
Called to start the IO server and once this subroutine returns then it indicates that the IO server has finished. The runtime is spent in here awaiting commands and then dealing with them. Termination occurs when all MONC processes have deregistered, note that to trigger this then at least one MONC process must first register.
io_communicator_arg | The IO communicator containing just the IO servers |
io_xml_configuration | Textual XML configuration that is used to set up the IO server |
Definition at line 66 of file ioserver.F90.
|
private |
Retrieves the message from MONC off the data channel and throws this to a thread in the thread pool to actually process We do it this way to enforce ordering between the command (including the data set ID) and the raw data itself.
source | Source PID of the MONC process |
data_set | ID of the data set being communicated |
Definition at line 296 of file ioserver.F90.
|
private |
Registers with the writer federator the set of fields (prognostic and diagnostic) that are available, this is based on the array/optional fields present from MONC and the non-optional scalars. This is quite an expensive operation, so only done once.
data_description | Array of data descriptions from MONC |
recv_count | Number of data descriptions |
Definition at line 531 of file ioserver.F90.
|
private |
Sends the data and field descriptions to the MONC process that just registered with the IO server.
source | The MPI rank (MPI_COMM_WORLD) of the registree |
Definition at line 410 of file ioserver.F90.
|
private |
This is the termination callback which is called once all MONCs have deregistered, no sends are active by inter IO communications and all threads are idle. This shuts down the inter IO listening and kickstarts finalisation and closure.
io_configuration | The IO server configuration |
values | Values (ignored) |
field_name | Field name identifier |
timestep | Timestep identifier |
Definition at line 206 of file ioserver.F90.
|
private |
Definition at line 52 of file ioserver.F90.
|
private |
Definition at line 52 of file ioserver.F90.
|
private |
Whether to continue waiting command messages from any MONC processes.
Definition at line 50 of file ioserver.F90.
|
private |
Definition at line 50 of file ioserver.F90.
|
private |
Internal representation of the IO configuration.
Definition at line 49 of file ioserver.F90.
|
private |
Definition at line 56 of file ioserver.F90.
|
private |
The MPI type for field sizing (i.e. array size etc send when MONCs register)
Definition at line 46 of file ioserver.F90.
|
private |
The MPI data type for data descriptions sent to MONCs.
Definition at line 46 of file ioserver.F90.
|
private |
The MPI data type for field descriptions sent to MONCs.
Definition at line 46 of file ioserver.F90.
|
private |
Definition at line 54 of file ioserver.F90.
|
private |
Definition at line 53 of file ioserver.F90.