MONC
|
Abstraction layer around MPI, this issues and marshals the lower level communication details. More...
Data Types | |
interface | usleep |
Functions/Subroutines | |
subroutine, public | initialise_mpi_communication (provided_threading) |
Initialises MPI communication. More... | |
subroutine, public | lock_mpi () |
If we are explicitly managing MPI thread safety (SERIALIZED mode) then locks MPI. More... | |
subroutine, public | unlock_mpi () |
If we are explicitly managing MPI thread safety (SERIALIZED mode) then unlocks MPI. More... | |
subroutine, public | pause_for_mpi_interleaving () |
Pauses for a specific number of ms to allow for MPI interleaving, this is to avoid starvation. More... | |
subroutine, public | wait_for_mpi_request (request, status) |
Waits for a specific MPI request to complete, either by managing thread safety and interleaving or just a call to MPI if we are in multiple mode. More... | |
subroutine, public | waitall_for_mpi_requests (requests, count) |
Waits for all MPI requests to complete, either by managing thread safety and interleaving or just a call to MPI if we are in multiple mode. More... | |
integer function, public | get_number_io_servers (io_comm) |
Retrieves the number of IO servers that are running in total. More... | |
integer function, public | get_my_io_rank (io_comm) |
Retrieves my IO server rank out of the number of IO servers that are running. More... | |
subroutine, public | register_command_receive () |
Registers a request for receiving a command from any MONC process on the command channel. More... | |
integer function, public | data_receive (mpi_datatype, num_elements, source, dump_data, data_dump_id, description_data) |
Awaits some data on the data channel. This is of the type, size from the source provided and can either be written into a byte buffer or integer buffer depending upon the arguments provided. More... | |
subroutine, public | cancel_requests () |
Cancels all outstanding communication requests. More... | |
subroutine | cancel_request (req) |
Cancels a specific communication request. More... | |
logical function, public | test_for_command (command, source) |
Tests for a command message based upon the request already registered. More... | |
logical function, public | test_for_inter_io (inter_io_communications, number_of_inter_io, io_communicator, command, source, data_buffer) |
Tests for inter IO server communication. More... | |
subroutine, public | free_mpi_type (the_type) |
Frees an MPI type, used in clean up. More... | |
integer function, public | build_mpi_datatype (data_definition, data_size_info, data_size, field_start_locations, field_end_locations, field_dimensions) |
Builds the MPI type that corresponds to the data which will be received from a specific MONC process. Two factors determine the structure and size of this - the XML configuration which has been parsed and also specific details of array sizes sent by each process as part of its registration process. More... | |
Variables | |
integer, parameter | ms_wait_between_tests =100 |
Interface to the C usleep Linux call which allows us to sleep for a specific number of MS. More... | |
integer | command_buffer |
Buffer used to receive the command data into when it arrives on that channel. More... | |
integer | command_request_handle |
Request handle representing the asynchronous P2P command request. More... | |
integer | mpi_threading_mode |
integer, volatile | mpi_mutex |
logical | manage_mpi_thread_safety |
Abstraction layer around MPI, this issues and marshals the lower level communication details.
integer function, public mpi_communication_mod::build_mpi_datatype | ( | type(io_configuration_data_definition_type), intent(in) | data_definition, |
type(data_sizing_description_type), dimension(:), intent(in) | data_size_info, | ||
integer, intent(out) | data_size, | ||
type(map_type), intent(out) | field_start_locations, | ||
type(map_type), intent(out) | field_end_locations, | ||
type(map_type), intent(out), optional | field_dimensions | ||
) |
Builds the MPI type that corresponds to the data which will be received from a specific MONC process. Two factors determine the structure and size of this - the XML configuration which has been parsed and also specific details of array sizes sent by each process as part of its registration process.
io_configuration | IO server representation of the configuration which contains data structure layout |
array_sizes | Sizes of each data array which has been received from a MONC process when it registeres |
data_size | The data size corresponding to this type is returned (i.e. the buffer size in bytes required to hold it) |
field_start_locations | For the MONC process the start location for each field, keyed on field name |
field_end_locations | For the MONC process the end location for each field, keyed on field name |
field_dimensions | Optional map of dimensions, if provided will store the number of dimensions for each field |
Definition at line 291 of file mpicommunication.F90.
|
private |
Cancels a specific communication request.
req | Handle of the request to cancel |
Definition at line 202 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::cancel_requests |
Cancels all outstanding communication requests.
Definition at line 196 of file mpicommunication.F90.
integer function, public mpi_communication_mod::data_receive | ( | integer, intent(in) | mpi_datatype, |
integer, intent(in) | num_elements, | ||
integer, intent(in) | source, | ||
character, dimension(:), intent(inout), optional, allocatable | dump_data, | ||
integer, intent(in), optional | data_dump_id, | ||
type(data_sizing_description_type), dimension(:), intent(inout), optional | description_data | ||
) |
Awaits some data on the data channel. This is of the type, size from the source provided and can either be written into a byte buffer or integer buffer depending upon the arguments provided.
mpi_datatype | The MPI type of the data we are receiving |
size | Number of elements to receive |
source | The PID of the MONC process to receieve this data from |
dump_data | (Optional) byte data buffer, for the data dump |
description_data | (Optional) integer data buffer, for data description |
Definition at line 165 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::free_mpi_type | ( | integer, intent(in) | the_type | ) |
Frees an MPI type, used in clean up.
the_type | The MPI type to free up |
Definition at line 273 of file mpicommunication.F90.
integer function, public mpi_communication_mod::get_my_io_rank | ( | integer, intent(in) | io_comm | ) |
Retrieves my IO server rank out of the number of IO servers that are running.
io_comm | The IO server communicator |
Definition at line 139 of file mpicommunication.F90.
integer function, public mpi_communication_mod::get_number_io_servers | ( | integer, intent(in) | io_comm | ) |
Retrieves the number of IO servers that are running in total.
io_comm | The IO server communicator |
Definition at line 127 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::initialise_mpi_communication | ( | integer, intent(in) | provided_threading | ) |
Initialises MPI communication.
provided_threading | The provided threading mode |
Definition at line 45 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::lock_mpi |
If we are explicitly managing MPI thread safety (SERIALIZED mode) then locks MPI.
Definition at line 57 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::pause_for_mpi_interleaving |
Pauses for a specific number of ms to allow for MPI interleaving, this is to avoid starvation.
Definition at line 67 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::register_command_receive |
Registers a request for receiving a command from any MONC process on the command channel.
Definition at line 149 of file mpicommunication.F90.
logical function, public mpi_communication_mod::test_for_command | ( | integer, intent(out) | command, |
integer, intent(out) | source | ||
) |
Tests for a command message based upon the request already registered.
command | The command which is received is returned to the caller |
source | The PID of the source MONC process is returned to the caller |
Definition at line 218 of file mpicommunication.F90.
logical function, public mpi_communication_mod::test_for_inter_io | ( | type(io_configuration_inter_communication_description), dimension(:), intent(inout) | inter_io_communications, |
integer, intent(in) | number_of_inter_io, | ||
integer, intent(in) | io_communicator, | ||
integer, intent(out) | command, | ||
integer, intent(out) | source, | ||
character, dimension(:), intent(inout), allocatable | data_buffer | ||
) |
Tests for inter IO server communication.
inter_io_communications | Data structures representing the possible inter IO communication sources |
number_of_inter_io | Number of inter IO communication descriptions registered |
command | The command which is received is returned to the caller |
source | The source of the inter IO communication, which is set to the index of the inter descriptor |
Definition at line 243 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::unlock_mpi |
If we are explicitly managing MPI thread safety (SERIALIZED mode) then unlocks MPI.
Definition at line 62 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::wait_for_mpi_request | ( | integer, intent(inout) | request, |
integer, dimension(mpi_status_size), intent(inout), optional | status | ||
) |
Waits for a specific MPI request to complete, either by managing thread safety and interleaving or just a call to MPI if we are in multiple mode.
request | The MPI request handle |
Definition at line 74 of file mpicommunication.F90.
subroutine, public mpi_communication_mod::waitall_for_mpi_requests | ( | integer, dimension(:), intent(inout) | requests, |
integer, intent(in) | count | ||
) |
Waits for all MPI requests to complete, either by managing thread safety and interleaving or just a call to MPI if we are in multiple mode.
requests | The MPI request handles to wait for |
count | The number of request handles to wait for |
Definition at line 105 of file mpicommunication.F90.
integer mpi_communication_mod::command_buffer |
Buffer used to receive the command data into when it arrives on that channel.
Definition at line 32 of file mpicommunication.F90.
|
private |
Request handle representing the asynchronous P2P command request.
Definition at line 32 of file mpicommunication.F90.
|
private |
Definition at line 36 of file mpicommunication.F90.
|
private |
Definition at line 35 of file mpicommunication.F90.
|
private |
Definition at line 32 of file mpicommunication.F90.
|
private |
Interface to the C usleep Linux call which allows us to sleep for a specific number of MS.
Definition at line 21 of file mpicommunication.F90.