MONC
Modules | Functions/Subroutines | Variables
ioserver.F90 File Reference

Go to the source code of this file.

Modules

module  io_server_mod
 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)
 

Functions/Subroutines

subroutine, public io_server_mod::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 io_server_mod::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 io_server_mod::await_command (command, source, data_buffer)
 Awaits a command or shutdown from MONC processes and other IO servers. More...
 
subroutine io_server_mod::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 io_server_mod::handle_command_message (command, source, data_buffer)
 Called to handle a specific command that has been recieved. More...
 
subroutine io_server_mod::handle_inter_io_communication_command (arguments, data_buffer)
 Handles inter IO server communications. More...
 
subroutine io_server_mod::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 io_server_mod::handle_deregistration_command (arguments, data_buffer)
 Deregisteres a specific MONC source process. More...
 
subroutine io_server_mod::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 io_server_mod::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 io_server_mod::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) io_server_mod::send_configuration_to_registree (source)
 Sends the data and field descriptions to the MONC process that just registered with the IO server. More...
 
subroutine io_server_mod::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 io_server_mod::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 io_server_mod::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 io_server_mod::handle_monc_dimension_information (data_description, monc_defn)
 Handles the provided local MONC dimension and data layout information. More...
 

Variables

integer io_server_mod::mpi_type_data_sizing_description
 The MPI type for field sizing (i.e. array size etc send when MONCs register) More...
 
integer io_server_mod::mpi_type_definition_description
 The MPI data type for data descriptions sent to MONCs. More...
 
integer io_server_mod::mpi_type_field_description
 The MPI data type for field descriptions sent to MONCs. More...
 
type(io_configuration_type), save, volatile io_server_mod::io_configuration
 Internal representation of the IO configuration. More...
 
logical, volatile io_server_mod::contine_poll_messages
 Whether to continue waiting command messages from any MONC processes. More...
 
logical, volatile io_server_mod::initialised_present_data
 
logical, volatile io_server_mod::contine_poll_interio_messages
 
logical, volatile io_server_mod::already_registered_finishing_call
 
type(field_description_type), dimension(:), allocatable io_server_mod::registree_field_descriptions
 
type(definition_description_type), dimension(:), allocatable io_server_mod::registree_definition_descriptions
 
integer, volatile io_server_mod::monc_registration_lock