MONC
|
This diagnostics federator will take in data fields sent from a MONC, perform operators on these as required by the diagnostics definition to produce diagnostic instantaneous fields which are then sent along to anything interested in them. More...
Data Types | |
type | all_diagnostics_at_timestep_type |
type | diagnostics_activity_type |
type | diagnostics_at_timestep_type |
type | diagnostics_type |
Functions/Subroutines | |
type(hashmap_type) function, public | initialise_diagnostic_federator (io_configuration) |
Initialises the diagnostics action and sets up the diagnostics master definitions. More... | |
logical function, public | check_diagnostic_federator_for_completion (io_configuration) |
Checks whether the diagnostics federator has completed or not, this is really checking all the underlying operations and communications to ensure that the data has been sent all the way through. More... | |
subroutine, public | finalise_diagnostic_federator (io_configuration) |
Finalises the diagnostics federator, waiting for all outstanding requests and then freeing data. More... | |
type(hashmap_type) function, public | determine_diagnostics_fields_available (monc_field_names) |
Determines the diagnostics fields that are available based upon the input MONC fields on registration that will be sent from MONC to the IO server. More... | |
subroutine, public | pass_fields_to_diagnostics_federator (io_configuration, source, data_id, data_dump) |
Entry point into the diagnostics federator this runs the diagnostics, executing the defined rules based upon the input data. More... | |
subroutine | check_all_activities_against_completed_fields (io_configuration, timestep_entry, diagnostics_by_timestep) |
Checks all pending activities against the completed fields and runs them if the required fields are now available. More... | |
logical function | handle_operator_completion (io_configuration, timestep_entry, specific_activity) |
Handles the completion of the operator. More... | |
subroutine | handle_completion (io_configuration, values, field_name, timestep) |
Handles inter io reduction completion, it adds the resulting value to the appropriate completion lists and then checks the pending activities and runs them if we can execute any of these based upon this value. More... | |
subroutine | handle_completion_for_specific_monc_timestep_entry (io_configuration, result_to_add, field_name, timestep_entry, diagnostics_by_timestep) |
This handles inter IO completion for a specific timestep entry. This is required as at a timestep there can be multiple entires based on each MONC which communicates with the IO server so we handle an individual one here. More... | |
subroutine | handle_diagnostic_calculation_completed (io_configuration, diagnostic_index, timestep_entry, diagnostics_by_timestep) |
Handles completion of a diagnostic calculation and will then pass this onto interested parties. More... | |
logical function | are_fields_available_for_activity (timestep_entry, activity) |
Determines whether the fields required for an activity are available so that activity can be run. More... | |
subroutine | perform_inter_io_communication (io_configuration, timestep_entry, all_entries_at_timestep, activity, value_to_send, communication_field_name) |
Performs the actual inter IO communication by calling out to the appropriate inter IO module. More... | |
subroutine | issue_communication_calls (io_configuration, timestep_entry, diagnostics_by_timestep, source, data_id, data_dump) |
Issues any inter io communucation calls that are appropriate based upon the data recieved from MONC. More... | |
subroutine | check_diagnostics_entries_against_data (io_configuration, source, data_id, data_dump, timestep_diagnostics_entry) |
Checks the outstanding fields of a time step entry against the data recieved from MONC and moves any acquired data from the outstanding set to the completed, along with its value. More... | |
subroutine | clean_diagnostic_states (current_timestep) |
Cleans the diagnostic states if required (based on the timestep period) More... | |
subroutine | deallocate_diagnostics_at_timestep (key) |
Deallocates all the diagnostics at a specific timestep, this removes all the individual MONC timestep entries and deallocates internal all diagnostic data, but keeps the all diagnostic entry in the list (which is removed by the caller) More... | |
type(data_values_type) function, pointer | get_value_from_monc_data (io_configuration, source, data_id, data_dump, field_name) |
Retrieves a value from the communicated MONC data. If this was an integer then converts to a real. More... | |
integer function | get_datatype_of_field (fields, field_name) |
Retrieves the data type of a field or 0 if the field was not found. More... | |
type(diagnostics_at_timestep_type) function, pointer | find_or_register_timestep_entry (io_configuration, timestep, source, time) |
Locates or registers a new (if it does not exist) time step entry based upon the timestep and source MONC process. This is a timestep/source specific state which represents progress through the overall diagnostic configuration. More... | |
type(diagnostics_at_timestep_type) function, pointer | create_timestep_entry (io_configuration, timestep, time, source) |
Creates a timestep entry and processes all members, determining activities their required fields etc... More... | |
subroutine | add_required_fields_if_needed (required_fields) |
Adds the required fields of an activity to the overall required fields which are cloned for each new timestep entry. More... | |
type(diagnostics_activity_type) function, pointer | retrieve_next_activity (iterator) |
Retrieves the next activity in a collection being iterated over by an iterator. More... | |
type(diagnostics_at_timestep_type) function, pointer | get_timestep_entry (timestep, source, do_lock) |
Retrieves the timestep at a specific timestep and source MONC. More... | |
type(all_diagnostics_at_timestep_type) function, pointer | find_or_add_diagnostics_by_timestep (timestep) |
Finds or adds diagnostics by timestep. This is used to maintain a list of all diagnostic entries for a specific timestep for every MONC source process. More... | |
type(all_diagnostics_at_timestep_type) function, pointer | get_diagnostics_by_timestep (timestep, do_lock) |
Retrieves the diagnostics list (each MONC source) at a specific timestep. More... | |
type(diagnostics_at_timestep_type) function, pointer | retrieve_next_specific_monc_timestep_entry (iterator) |
Retrieves the next MONC timestep entry from the all diagnostics based upon a collections iterator. More... | |
type(all_diagnostics_at_timestep_type) function, pointer | get_diagnostic_by_key (key) |
Retrieves all diagnostics at a timestep by its key. More... | |
type(all_diagnostics_at_timestep_type) function, pointer | retrieve_diagnostics (mapentry) |
Retrieves the all diagnostics at a specific timestep from its map entry. More... | |
type(diagnostics_activity_type) function, pointer | get_comm_activity_from_fieldname (diagnostics_by_timestep, field_name) |
Retrieves a communication activity from its field name. More... | |
type(io_configuration_misc_item_type) function, pointer | get_misc_action_at_index (action_members, index) |
Retrieves a misc action from the parsed user XML configuration at a specific index. More... | |
subroutine | define_diagnostics (io_configuration, diagnostic_generation_frequency) |
Based upon the IO configuration this will define the diagnostics structure. It is done once at initialisation and then this same information is used for execution at each data arrival point. More... | |
type(diagnostics_activity_type) function, pointer | get_diagnostic_activity_by_result_name (result_name, diagnostic_entry_index) |
Retrives a diagnostic activity based upon its result name or null if none is found. More... | |
subroutine | process_auto_dimensions (io_configuration, diagnostic_configuration, entry_index) |
Processes all auto dimensions by looking them up and resolving them based upon the operators. More... | |
integer function | get_diagnostic_generation_frequency (io_configuration, required_fields) |
Retrieves the max diagnostic generation frequency for a set of fields. More... | |
integer function | get_field_frequency (io_configuration, field_name) |
Retrieves the generation frequency for a specific field. More... | |
character(len=string_length) function | generate_activity_diagnostic_key (diagnostic, activity) |
Generates a unique key for an activity within a diagnostic, which is unique amongst all diagnostics and their activities. More... | |
Variables | |
integer, parameter | operator_type =1 |
integer, parameter | reduction_type =2 |
integer, parameter | broadcast_type =3 |
integer, parameter | allreduction_type =4 |
integer, parameter | perform_clean_every =100 |
A wrapper type containing all the diagnostics for MONC source processes at a specific timestep. More... | |
type(hashmap_type), volatile | diagnostics_per_monc_at_timestep |
type(hashmap_type), volatile | all_diagnostics_at_timestep |
type(hashset_type), volatile | all_outstanding_fields |
type(hashset_type), volatile | available_fields |
type(diagnostics_type), dimension(:), allocatable, volatile | diagnostic_definitions |
integer, volatile | timestep_entries_rwlock |
integer, volatile | all_diagnostics_per_timestep_rwlock |
integer, volatile | clean_progress_mutex |
integer, volatile | previous_clean_point |
integer, volatile | previous_viewed_timestep |
integer, volatile | current_point |
This diagnostics federator will take in data fields sent from a MONC, perform operators on these as required by the diagnostics definition to produce diagnostic instantaneous fields which are then sent along to anything interested in them.
|
private |
Adds the required fields of an activity to the overall required fields which are cloned for each new timestep entry.
required_fields | The required fields of an activity |
Definition at line 879 of file diagnostic_federator.F90.
|
private |
Determines whether the fields required for an activity are available so that activity can be run.
timestep_entry | The timestep entry that we are checking the completed fields for |
activity | The activity that we are checking |
Definition at line 474 of file diagnostic_federator.F90.
|
private |
Checks all pending activities against the completed fields and runs them if the required fields are now available.
io_configuration | The IO server configuration |
timestep_entry | The timestep entry that we are checking against |
Definition at line 231 of file diagnostic_federator.F90.
logical function, public diagnostic_federator_mod::check_diagnostic_federator_for_completion | ( | type(io_configuration_type), intent(inout) | io_configuration | ) |
Checks whether the diagnostics federator has completed or not, this is really checking all the underlying operations and communications to ensure that the data has been sent all the way through.
io_configuration | Configuration state of the IO server |
Definition at line 110 of file diagnostic_federator.F90.
|
private |
Checks the outstanding fields of a time step entry against the data recieved from MONC and moves any acquired data from the outstanding set to the completed, along with its value.
io_configuration | Configuration of the IO server |
source | The source PID of the MONC process |
data_id | The ID of the data definition that is represented by the dump |
data_dump | The data we have received from MONC |
timestep_diagnostics_entry | The timestep entry |
Definition at line 596 of file diagnostic_federator.F90.
|
private |
Cleans the diagnostic states if required (based on the timestep period)
current_timestep | The current timestep which is checked against the previous run timestep |
Definition at line 638 of file diagnostic_federator.F90.
|
private |
Creates a timestep entry and processes all members, determining activities their required fields etc...
timestep | The timestep that we are locating for |
Definition at line 837 of file diagnostic_federator.F90.
|
private |
Deallocates all the diagnostics at a specific timestep, this removes all the individual MONC timestep entries and deallocates internal all diagnostic data, but keeps the all diagnostic entry in the list (which is removed by the caller)
key | The look up key which corresponds to the all diagnostics entry |
Definition at line 705 of file diagnostic_federator.F90.
|
private |
Based upon the IO configuration this will define the diagnostics structure. It is done once at initialisation and then this same information is used for execution at each data arrival point.
io_configuration | The IO server configuration |
diagnostic_generation_frequency | Map of diagnostic name to the frequency (in timesteps) of generation |
Definition at line 1103 of file diagnostic_federator.F90.
type(hashmap_type) function, public diagnostic_federator_mod::determine_diagnostics_fields_available | ( | type(hashset_type), intent(inout) | monc_field_names | ) |
Determines the diagnostics fields that are available based upon the input MONC fields on registration that will be sent from MONC to the IO server.
monc_field_names | Set of field names that are made available from MONC to the IO server |
Definition at line 141 of file diagnostic_federator.F90.
subroutine, public diagnostic_federator_mod::finalise_diagnostic_federator | ( | type(io_configuration_type), intent(inout) | io_configuration | ) |
Finalises the diagnostics federator, waiting for all outstanding requests and then freeing data.
io_configuration | Configuration state of the IO server |
Definition at line 124 of file diagnostic_federator.F90.
|
private |
Finds or adds diagnostics by timestep. This is used to maintain a list of all diagnostic entries for a specific timestep for every MONC source process.
timestep | The corresponding timestep |
Definition at line 942 of file diagnostic_federator.F90.
|
private |
Locates or registers a new (if it does not exist) time step entry based upon the timestep and source MONC process. This is a timestep/source specific state which represents progress through the overall diagnostic configuration.
timestep | The timestep that we are locating for |
source | The source MONC process ID |
Definition at line 807 of file diagnostic_federator.F90.
|
private |
Generates a unique key for an activity within a diagnostic, which is unique amongst all diagnostics and their activities.
diagnostic | The diagnostic part of the key |
activity | The activity part of the key |
Definition at line 1274 of file diagnostic_federator.F90.
|
private |
Retrieves a communication activity from its field name.
timestep_entry | The timestep entry to base the look up upon |
field_name | The field name to look up |
Definition at line 1057 of file diagnostic_federator.F90.
|
private |
Retrieves the data type of a field or 0 if the field was not found.
fields | Array of fields to search |
field_name | The name of the field to locate |
Definition at line 787 of file diagnostic_federator.F90.
|
private |
Retrives a diagnostic activity based upon its result name or null if none is found.
result_name | The name of the result we are looking up |
diagnostic_entry_index | The diagnostic index that we are concerned with |
Definition at line 1179 of file diagnostic_federator.F90.
|
private |
Retrieves all diagnostics at a timestep by its key.
key | The key to look up |
Definition at line 1014 of file diagnostic_federator.F90.
|
private |
Retrieves the max diagnostic generation frequency for a set of fields.
io_configuration | The IO server configuration |
required_fields | List of required fields that we are looking up |
Definition at line 1235 of file diagnostic_federator.F90.
|
private |
Retrieves the diagnostics list (each MONC source) at a specific timestep.
timestep | The timestep to look up |
do_lock | Whether to issue read locks |
Definition at line 970 of file diagnostic_federator.F90.
|
private |
Retrieves the generation frequency for a specific field.
io_configuration | IO server configuration |
field_name | The name of the field we are looking up |
Definition at line 1254 of file diagnostic_federator.F90.
|
private |
Retrieves a misc action from the parsed user XML configuration at a specific index.
action_members | The members to extract from |
index | The index to look up |
Definition at line 1081 of file diagnostic_federator.F90.
|
private |
Retrieves the timestep at a specific timestep and source MONC.
timestep | The timestep to look up |
source | The source MONC process id |
do_lock | Whether to issue a read lock over the timeseries collection |
Definition at line 918 of file diagnostic_federator.F90.
|
private |
Retrieves a value from the communicated MONC data. If this was an integer then converts to a real.
io_configuration | Configuration of the IO server |
source | The source PID of the MONC process |
data_id | The ID of the data definition that is represented by the dump |
data_dump | The data we have received from MONC |
field_name | The field to retrieve |
Definition at line 755 of file diagnostic_federator.F90.
|
private |
Handles inter io reduction completion, it adds the resulting value to the appropriate completion lists and then checks the pending activities and runs them if we can execute any of these based upon this value.
io_configuration | Configuration of the IO server |
values | Array of values resulting from the communication |
field_name | Corresponding field name |
timestep | Corresponding timestep |
Definition at line 329 of file diagnostic_federator.F90.
|
private |
This handles inter IO completion for a specific timestep entry. This is required as at a timestep there can be multiple entires based on each MONC which communicates with the IO server so we handle an individual one here.
io_configuration | Configuration of the IO server |
values | Array of values resulting from the communication |
field_name | Corresponding field name |
timestep | Corresponding timestep |
timestep_entry | The specific timestep entry which relates to an individual MONC communicating with the IO server |
Definition at line 367 of file diagnostic_federator.F90.
|
private |
Handles completion of a diagnostic calculation and will then pass this onto interested parties.
diagnostic_index | The diagnostics which has completed |
timestep_entry | The timestep entry which has just completed this diagnostic |
Definition at line 414 of file diagnostic_federator.F90.
|
private |
Handles the completion of the operator.
timestep_entry | The specific timestep entry |
specific_activity | The specific activity that just completed |
Definition at line 291 of file diagnostic_federator.F90.
type(hashmap_type) function, public diagnostic_federator_mod::initialise_diagnostic_federator | ( | type(io_configuration_type), intent(inout) | io_configuration | ) |
Initialises the diagnostics action and sets up the diagnostics master definitions.
io_configuration | The IO server configuration |
Definition at line 89 of file diagnostic_federator.F90.
|
private |
Issues any inter io communucation calls that are appropriate based upon the data recieved from MONC.
io_configuration | Configuration of the IO server |
timestep_entry | The timestep entry |
source | The source PID of the MONC process |
data_id | The ID of the data definition that is represented by the dump |
data_dump | The data we have received from MONC |
Definition at line 542 of file diagnostic_federator.F90.
subroutine, public diagnostic_federator_mod::pass_fields_to_diagnostics_federator | ( | type(io_configuration_type), intent(inout) | io_configuration, |
integer, intent(in) | source, | ||
integer, intent(in) | data_id, | ||
character, dimension(:), intent(in), allocatable | data_dump | ||
) |
Entry point into the diagnostics federator this runs the diagnostics, executing the defined rules based upon the input data.
io_configuration | Configuration of the IO server |
source | The source PID of the MONC process |
data_id | The ID of the data definition that is represented by the dump |
data_dump | The data we have received from MONC |
Definition at line 191 of file diagnostic_federator.F90.
|
private |
Performs the actual inter IO communication by calling out to the appropriate inter IO module.
io_configuration | Configuration of the IO server |
timestep_entry | The timestep entry |
activity | The activity this is executing |
value_to_send | The value to communicate |
communication_field_name | Name of the field that we are communicating |
Definition at line 502 of file diagnostic_federator.F90.
|
private |
Processes all auto dimensions by looking them up and resolving them based upon the operators.
io_configuration | Configuration of the IO server |
diagnostic_configuration | Configuration of the diagnostic field |
entry_index | The specific diagnostic entry that we care about |
Definition at line 1200 of file diagnostic_federator.F90.
|
private |
Retrieves the all diagnostics at a specific timestep from its map entry.
mapentry | The map entry to extract the all diagnostics from |
Definition at line 1035 of file diagnostic_federator.F90.
|
private |
Retrieves the next activity in a collection being iterated over by an iterator.
iterator | The iterator we are using to iterate over the collection |
Definition at line 895 of file diagnostic_federator.F90.
|
private |
Retrieves the next MONC timestep entry from the all diagnostics based upon a collections iterator.
iterator | The iterator we are using to iterate ove the collection |
Definition at line 993 of file diagnostic_federator.F90.
|
private |
Definition at line 76 of file diagnostic_federator.F90.
|
private |
Definition at line 79 of file diagnostic_federator.F90.
|
private |
Definition at line 77 of file diagnostic_federator.F90.
|
private |
Definition at line 39 of file diagnostic_federator.F90.
|
private |
Definition at line 77 of file diagnostic_federator.F90.
|
private |
Definition at line 39 of file diagnostic_federator.F90.
|
private |
Definition at line 79 of file diagnostic_federator.F90.
|
private |
Definition at line 79 of file diagnostic_federator.F90.
|
private |
Definition at line 78 of file diagnostic_federator.F90.
|
private |
Definition at line 76 of file diagnostic_federator.F90.
|
private |
Definition at line 39 of file diagnostic_federator.F90.
|
private |
A wrapper type containing all the diagnostics for MONC source processes at a specific timestep.
Definition at line 39 of file diagnostic_federator.F90.
|
private |
Definition at line 79 of file diagnostic_federator.F90.
|
private |
Definition at line 79 of file diagnostic_federator.F90.
|
private |
Definition at line 39 of file diagnostic_federator.F90.
|
private |
Definition at line 79 of file diagnostic_federator.F90.