![]() |
(git:2bb242e)
|
Interface to the message passing library MPI. More...
Data Types | |
| type | mp_comm_type |
| type | mp_request_type |
| type | mp_win_type |
| type | mp_file_type |
| type | mp_info_type |
| type | mp_cart_type |
| type | mp_para_env_type |
| stores all the informations relevant to an mpi environment More... | |
| type | mp_para_env_p_type |
| represent a pointer to a para env (to build arrays) More... | |
| type | mp_para_cart_type |
| represent a multidimensional parallel environment More... | |
| type | mp_split_type |
| interface | mp_waitall |
| interface | mp_testall |
| interface | mp_testany |
| interface | mp_allocate |
| interface | mp_deallocate |
| interface | mp_type_make |
| type | mp_type_descriptor_type |
| type | mp_file_descriptor_type |
Functions/Subroutines | |
| subroutine, public | mp_query_thread_level () |
| Query the MPI thread-support level when MPI is managed by an embedding application. | |
| logical function, public | mp_world_owns_mpi () |
| Check if MPI was initialized by CP2K and will thus be finalized by CP2K. | |
| subroutine, public | mp_world_init (mp_comm) |
| initializes the system default communicator | |
| subroutine, public | mp_world_finalize () |
| Finalize the system default communicator and MPI when CP2K owns MPI. | |
| subroutine, public | mp_abort () |
| globally stops all tasks this is intended to be low level, most of CP2K should call cp_abort() | |
| subroutine, public | mp_para_env_create (para_env, group) |
| creates a new para environment | |
| subroutine, public | mp_para_env_release (para_env) |
| releases the para object (to be called when you don't want anymore the shared copy of this object) | |
| subroutine, public | mp_para_cart_create (cart, group) |
| creates a cart (multidimensional parallel environment) | |
| subroutine, public | mp_para_cart_release (cart) |
| releases the given cart | |
| subroutine, public | mp_dims_create (nodes, dims) |
| wrapper to MPI_Dims_create | |
| subroutine, public | mp_waitany (requests, completed) |
| waits for completion of any of the given requests | |
| subroutine, public | mp_mem_avail_per_rank_gb (comm, mem_avail_gb) |
| Memory that is currently free on the node, per MPI rank of that node, in GB. | |
| subroutine, public | mp_mem_used_per_rank_gb (comm, mem_used_gb) |
| Memory that is currently occupied by this process, in GB, maximized over all ranks of comm, such that every rank ends up with the same, most pessimistic figure. | |
| subroutine, public | mp_print_mem_per_rank (comm, unit_nr, label) |
| Prints the memory available to and used by a single MPI rank at the moment of the call. Collective on comm; only ranks with unit_nr > 0 write. | |
| subroutine, public | mp_get_library_version (version, resultlen) |
| Get Version of the MPI Library (MPI 3). | |
| subroutine, public | mp_file_delete (filepath, info) |
| Deletes a file. Auxiliary routine to emulate 'replace' action for mp_file_open. Only the master processor should call this routine. | |
| subroutine, public | mp_type_size (type_descriptor, type_size) |
| Returns the size of a data type in bytes. | |
| type(mp_file_descriptor_type) function, public | mp_file_type_hindexed_make_chv (count, lengths, displs) |
| Creates an indexed MPI type for arrays of strings using bytes for spacing (hindexed type). | |
| subroutine, public | mp_file_type_set_view_chv (fh, offset, type_descriptor) |
| Uses a previously created indexed MPI character type to tell the MPI processes how to partition (set_view) an opened file. | |
| subroutine, public | mp_file_type_free (type_descriptor) |
| Releases the type used for MPI I/O. | |
| subroutine, public | mp_file_get_amode (mpi_io, replace, amode, form, action, status, position) |
| (parallel) Utility routine to determine MPI file access mode based on variables | |
| type(mp_type_descriptor_type) function, public | mp_type_indexed_make_d (count, lengths, displs) |
| ... | |
| type(mp_type_descriptor_type) function, public | mp_type_indexed_make_r (count, lengths, displs) |
| ... | |
| type(mp_type_descriptor_type) function, public | mp_type_indexed_make_z (count, lengths, displs) |
| ... | |
| type(mp_type_descriptor_type) function, public | mp_type_indexed_make_c (count, lengths, displs) |
| ... | |
Variables | |
| logical, parameter, public | cp2k_is_parallel = .FALSE. |
| integer, parameter, public | mp_any_tag = -1 |
| integer, parameter, public | mp_any_source = -2 |
| integer, parameter, public | mp_status_size = -9 |
| integer, parameter, public | mp_proc_null = -10 |
| integer, parameter, public | mp_max_library_version_string = 1 |
| integer, parameter, public | file_offset = int_8 |
| integer, parameter, public | address_kind = int_8 |
| integer, parameter, public | file_amode_create = 1 |
| integer, parameter, public | file_amode_rdonly = 2 |
| integer, parameter, public | file_amode_wronly = 4 |
| integer, parameter, public | file_amode_rdwr = 8 |
| integer, parameter, public | file_amode_excl = 64 |
| integer, parameter, public | file_amode_append = 128 |
| integer, parameter, public | mpi_character_size = 1 |
| integer, parameter, public | mpi_integer_size = 4 |
| type(mp_comm_type), parameter, public | mp_comm_null = mp_comm_type(mp_comm_null_handle) |
| type(mp_comm_type), parameter, public | mp_comm_self = mp_comm_type(mp_comm_self_handle) |
| type(mp_comm_type), parameter, public | mp_comm_world = mp_comm_type(mp_comm_world_handle) |
| type(mp_request_type), parameter, public | mp_request_null = mp_request_type(mp_request_null_handle) |
| type(mp_win_type), parameter, public | mp_win_null = mp_win_type(mp_win_null_handle) |
| type(mp_file_type), parameter, public | mp_file_null = mp_file_type(mp_file_null_handle) |
| type(mp_info_type), parameter, public | mp_info_null = mp_info_type(mp_info_null_handle) |
| type(mp_split_type), parameter, public | mp_comm_split_type_shared = mp_split_type(mp_comm_split_type_shared_id, mp_info_null) |
| integer, parameter, public | mp_comm_ident = 0 |
| integer, parameter, public | mp_comm_congruent = 1 |
| integer, parameter, public | mp_comm_similar = 2 |
| integer, parameter, public | mp_comm_unequal = 3 |
| integer, parameter, public | mp_comm_compare_default = -1 |
| integer, parameter | intlen = BIT_SIZE(0)/8 |
| logical, save, public | mp_collect_timings = .FALSE. |
Interface to the message passing library MPI.
| subroutine, public message_passing::mp_query_thread_level |
Query the MPI thread-support level when MPI is managed by an embedding application.
Definition at line 1357 of file message_passing.F.
| logical function, public message_passing::mp_world_owns_mpi |
Check if MPI was initialized by CP2K and will thus be finalized by CP2K.
Definition at line 1366 of file message_passing.F.
| subroutine, public message_passing::mp_world_init | ( | class(mp_comm_type), intent(out) | mp_comm | ) |
initializes the system default communicator
| mp_comm | [output] : handle of the default communicator |
Definition at line 1406 of file message_passing.F.
| subroutine, public message_passing::mp_world_finalize |
Finalize the system default communicator and MPI when CP2K owns MPI.
Definition at line 1512 of file message_passing.F.
| subroutine, public message_passing::mp_abort |
globally stops all tasks this is intended to be low level, most of CP2K should call cp_abort()
Definition at line 1564 of file message_passing.F.
| subroutine, public message_passing::mp_para_env_create | ( | type(mp_para_env_type), pointer | para_env, |
| class(mp_comm_type), intent(in) | group ) |
creates a new para environment
| para_env | the new parallel environment |
| group | the id of the actual mpi_group |
Definition at line 2173 of file message_passing.F.
| subroutine, public message_passing::mp_para_env_release | ( | type(mp_para_env_type), pointer | para_env | ) |
releases the para object (to be called when you don't want anymore the shared copy of this object)
| para_env | the new group |
Definition at line 2196 of file message_passing.F.
| subroutine, public message_passing::mp_para_cart_create | ( | type(mp_para_cart_type), intent(out), pointer | cart, |
| class(mp_comm_type), intent(in) | group ) |
creates a cart (multidimensional parallel environment)
| cart | the cart environment to create |
| group | the mpi communicator |
Definition at line 2213 of file message_passing.F.
| subroutine, public message_passing::mp_para_cart_release | ( | type(mp_para_cart_type), pointer | cart | ) |
releases the given cart
| cart | the cart to release |
Definition at line 2231 of file message_passing.F.
| subroutine, public message_passing::mp_dims_create | ( | integer, intent(in) | nodes, |
| integer, dimension(:), intent(inout) | dims ) |
wrapper to MPI_Dims_create
| nodes | ... |
| dims | ... |
Definition at line 2304 of file message_passing.F.
| subroutine, public message_passing::mp_waitany | ( | type(mp_request_type), dimension(:), intent(inout) | requests, |
| integer, intent(out) | completed ) |
waits for completion of any of the given requests
| requests | ... |
| completed | ... |
Definition at line 2488 of file message_passing.F.
| subroutine, public message_passing::mp_mem_avail_per_rank_gb | ( | class(mp_comm_type), intent(in) | comm, |
| real(kind=dp), intent(out) | mem_avail_gb ) |
Memory that is currently free on the node, per MPI rank of that node, in GB.
The operating system reports node-wide memory (/proc/meminfo on Linux), so every rank of a node reads the same figure. It is divided by the number of ranks sharing that node, which are identified by splitting comm with mp_comm_split_type_shared. The result is minimized over all ranks of comm, such that every rank ends up with the same, most pessimistic figure. Returns 0.0 if the operating system does not expose the free memory.
| comm | communicator over which the result is minimized |
| mem_avail_GB | free memory per MPI rank in GB, identical on all ranks of comm |
Definition at line 2770 of file message_passing.F.
| subroutine, public message_passing::mp_mem_used_per_rank_gb | ( | class(mp_comm_type), intent(in) | comm, |
| real(kind=dp), intent(out) | mem_used_gb ) |
Memory that is currently occupied by this process, in GB, maximized over all ranks of comm, such that every rank ends up with the same, most pessimistic figure.
| comm | communicator over which the result is maximized |
| mem_used_GB | occupied memory per MPI rank in GB, identical on all ranks of comm |
Definition at line 2828 of file message_passing.F.
| subroutine, public message_passing::mp_print_mem_per_rank | ( | class(mp_comm_type), intent(in) | comm, |
| integer, intent(in) | unit_nr, | ||
| character(len=*), intent(in), optional | label ) |
Prints the memory available to and used by a single MPI rank at the moment of the call. Collective on comm; only ranks with unit_nr > 0 write.
| comm | communicator whose ranks share the reported memory |
| unit_nr | output unit, nothing is printed for unit_nr <= 0 |
| label | text identifying the point of the run at which the memory is reported |
Definition at line 2855 of file message_passing.F.
| subroutine, public message_passing::mp_get_library_version | ( | character(len=*), intent(out) | version, |
| integer, intent(out) | resultlen ) |
Get Version of the MPI Library (MPI 3).
| [out] | version | Version of the library, declared as CHARACTER(LEN=mp_max_library_version_string) |
| [out] | resultlen | Length (in printable characters) of the result returned in version (integer) |
Definition at line 4009 of file message_passing.F.
| subroutine, public message_passing::mp_file_delete | ( | character(len=*), intent(in) | filepath, |
| type(mp_info_type), intent(in), optional | info ) |
Deletes a file. Auxiliary routine to emulate 'replace' action for mp_file_open. Only the master processor should call this routine.
| [in] | filepath | path to the file |
| [in] |
optional) info info object
Definition at line 4100 of file message_passing.F.
| subroutine, public message_passing::mp_type_size | ( | type(mp_type_descriptor_type), intent(in) | type_descriptor, |
| integer, intent(out) | type_size ) |
Returns the size of a data type in bytes.
| [in] | type_descriptor | data type |
| [out] | type_size | size of the data type |
Definition at line 4446 of file message_passing.F.
| type(mp_file_descriptor_type) function, public message_passing::mp_file_type_hindexed_make_chv | ( | integer, intent(in) | count, |
| integer, dimension(1:count), intent(in), target | lengths, | ||
| integer(kind=file_offset), dimension(1:count), intent(in), target | displs ) |
Creates an indexed MPI type for arrays of strings using bytes for spacing (hindexed type).
| count | number of array blocks to read |
| lengths | lengths of each array block |
| displs | byte offsets for array blocks |
Definition at line 4599 of file message_passing.F.
| subroutine, public message_passing::mp_file_type_set_view_chv | ( | type(mp_file_type), intent(in) | fh, |
| integer(kind=file_offset), intent(in) | offset, | ||
| type(mp_file_descriptor_type) | type_descriptor ) |
Uses a previously created indexed MPI character type to tell the MPI processes how to partition (set_view) an opened file.
| fh | the file handle associated with the input file |
| offset | global offset determining where the relevant data begins |
| type_descriptor | container for the MPI type |
Definition at line 4642 of file message_passing.F.
| subroutine, public message_passing::mp_file_type_free | ( | type(mp_file_descriptor_type) | type_descriptor | ) |
Releases the type used for MPI I/O.
| type_descriptor | the container for the MPI type |
Definition at line 4788 of file message_passing.F.
| subroutine, public message_passing::mp_file_get_amode | ( | logical, intent(inout) | mpi_io, |
| logical, intent(inout) | replace, | ||
| integer, intent(out) | amode, | ||
| character(len=*), intent(in) | form, | ||
| character(len=*), intent(in) | action, | ||
| character(len=*), intent(in) | status, | ||
| character(len=*), intent(in) | position ) |
(parallel) Utility routine to determine MPI file access mode based on variables
(serial) No action
| mpi_io | flag that determines if MPI I/O will actually be used |
| replace | flag that indicates whether file needs to be deleted prior to opening it |
| amode | the MPI I/O access mode |
| form | formatted or unformatted data? |
| action | the variable that determines what to do with file |
| status | the status flag: |
| position | should the file be appended or rewound |
Definition at line 4834 of file message_passing.F.
| type(mp_type_descriptor_type) function, public message_passing::mp_type_indexed_make_d | ( | integer, intent(in) | count, |
| integer, dimension(1:count), intent(in), target | lengths, | ||
| integer, dimension(1:count), intent(in), target | displs ) |
...
| count | ... |
| lengths | ... |
| displs | ... |
Definition at line 19339 of file message_passing.F.
| type(mp_type_descriptor_type) function, public message_passing::mp_type_indexed_make_r | ( | integer, intent(in) | count, |
| integer, dimension(1:count), intent(in), target | lengths, | ||
| integer, dimension(1:count), intent(in), target | displs ) |
...
| count | ... |
| lengths | ... |
| displs | ... |
Definition at line 24206 of file message_passing.F.
| type(mp_type_descriptor_type) function, public message_passing::mp_type_indexed_make_z | ( | integer, intent(in) | count, |
| integer, dimension(1:count), intent(in), target | lengths, | ||
| integer, dimension(1:count), intent(in), target | displs ) |
...
| count | ... |
| lengths | ... |
| displs | ... |
Definition at line 29073 of file message_passing.F.
| type(mp_type_descriptor_type) function, public message_passing::mp_type_indexed_make_c | ( | integer, intent(in) | count, |
| integer, dimension(1:count), intent(in), target | lengths, | ||
| integer, dimension(1:count), intent(in), target | displs ) |
...
| count | ... |
| lengths | ... |
| displs | ... |
Definition at line 33940 of file message_passing.F.
| logical, parameter, public message_passing::cp2k_is_parallel = .FALSE. |
Definition at line 114 of file message_passing.F.
| integer, parameter, public message_passing::mp_any_tag = -1 |
Definition at line 115 of file message_passing.F.
| integer, parameter, public message_passing::mp_any_source = -2 |
Definition at line 116 of file message_passing.F.
| integer, parameter, public message_passing::mp_status_size = -9 |
Definition at line 126 of file message_passing.F.
| integer, parameter, public message_passing::mp_proc_null = -10 |
Definition at line 127 of file message_passing.F.
| integer, parameter, public message_passing::mp_max_library_version_string = 1 |
Definition at line 128 of file message_passing.F.
| integer, parameter, public message_passing::file_offset = int_8 |
Definition at line 130 of file message_passing.F.
| integer, parameter, public message_passing::address_kind = int_8 |
Definition at line 131 of file message_passing.F.
| integer, parameter, public message_passing::file_amode_create = 1 |
Definition at line 132 of file message_passing.F.
| integer, parameter, public message_passing::file_amode_rdonly = 2 |
Definition at line 133 of file message_passing.F.
| integer, parameter, public message_passing::file_amode_wronly = 4 |
Definition at line 134 of file message_passing.F.
| integer, parameter, public message_passing::file_amode_rdwr = 8 |
Definition at line 135 of file message_passing.F.
| integer, parameter, public message_passing::file_amode_excl = 64 |
Definition at line 136 of file message_passing.F.
| integer, parameter, public message_passing::file_amode_append = 128 |
Definition at line 137 of file message_passing.F.
| integer, parameter, public message_passing::mpi_character_size = 1 |
Definition at line 142 of file message_passing.F.
| integer, parameter, public message_passing::mpi_integer_size = 4 |
Definition at line 143 of file message_passing.F.
| type(mp_comm_type), parameter, public message_passing::mp_comm_null = mp_comm_type(mp_comm_null_handle) |
Definition at line 822 of file message_passing.F.
| type(mp_comm_type), parameter, public message_passing::mp_comm_self = mp_comm_type(mp_comm_self_handle) |
Definition at line 823 of file message_passing.F.
| type(mp_comm_type), parameter, public message_passing::mp_comm_world = mp_comm_type(mp_comm_world_handle) |
Definition at line 824 of file message_passing.F.
| type(mp_request_type), parameter, public message_passing::mp_request_null = mp_request_type(mp_request_null_handle) |
Definition at line 825 of file message_passing.F.
| type(mp_win_type), parameter, public message_passing::mp_win_null = mp_win_type(mp_win_null_handle) |
Definition at line 826 of file message_passing.F.
| type(mp_file_type), parameter, public message_passing::mp_file_null = mp_file_type(mp_file_null_handle) |
Definition at line 827 of file message_passing.F.
| type(mp_info_type), parameter, public message_passing::mp_info_null = mp_info_type(mp_info_null_handle) |
Definition at line 828 of file message_passing.F.
| type(mp_split_type), parameter, public message_passing::mp_comm_split_type_shared = mp_split_type(mp_comm_split_type_shared_id, mp_info_null) |
Definition at line 838 of file message_passing.F.
| integer, parameter, public message_passing::mp_comm_ident = 0 |
Definition at line 848 of file message_passing.F.
| integer, parameter, public message_passing::mp_comm_congruent = 1 |
Definition at line 849 of file message_passing.F.
| integer, parameter, public message_passing::mp_comm_similar = 2 |
Definition at line 850 of file message_passing.F.
| integer, parameter, public message_passing::mp_comm_unequal = 3 |
Definition at line 851 of file message_passing.F.
| integer, parameter, public message_passing::mp_comm_compare_default = -1 |
Definition at line 852 of file message_passing.F.
| integer, parameter message_passing::intlen = BIT_SIZE(0)/8 |
Definition at line 986 of file message_passing.F.
| logical, save, public message_passing::mp_collect_timings = .FALSE. |
Definition at line 991 of file message_passing.F.