(git:34ef472)
message_passing Module Reference

Interface to the message passing library MPI. More...

Functions/Subroutines

subroutine, public mp_world_init (mp_comm)
 initializes the system default communicator More...
 
subroutine, public mp_world_finalize ()
 finalizes the system default communicator More...
 
subroutine, public mp_abort ()
 globally stops all tasks this is intended to be low level, most of CP2K should call cp_abort() More...
 
subroutine, public mp_para_env_create (para_env, group)
 creates a new para environment More...
 
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) More...
 
subroutine, public mp_para_cart_create (cart, group)
 creates a cart (multidimensional parallel environment) More...
 
subroutine, public mp_para_cart_release (cart)
 releases the given cart More...
 
subroutine, public mp_dims_create (nodes, dims)
 wrapper to MPI_Dims_create More...
 
subroutine, public mp_waitany (requests, completed)
 waits for completion of any of the given requests More...
 
integer function, public mp_get_node_global_rank ()
 Get the local rank on the node according to the global communicator. More...
 
subroutine, public mp_get_library_version (version, resultlen)
 Get Version of the MPI Library (MPI 3) More...
 
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. More...
 
subroutine, public mp_type_size (type_descriptor, type_size)
 Returns the size of a data type in bytes. More...
 
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) More...
 
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. More...
 
subroutine, public mp_file_type_free (type_descriptor)
 Releases the type used for MPI I/O. More...
 
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 More...
 
type(mp_type_descriptor_type) function, public mp_type_indexed_make_d (count, lengths, displs)
 ... More...
 
type(mp_type_descriptor_type) function, public mp_type_indexed_make_r (count, lengths, displs)
 ... More...
 
type(mp_type_descriptor_type) function, public mp_type_indexed_make_z (count, lengths, displs)
 ... More...
 
type(mp_type_descriptor_type) function, public mp_type_indexed_make_c (count, lengths, displs)
 ... More...
 

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)
 
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
 
logical, save, public mp_collect_timings = .FALSE.
 

Detailed Description

Interface to the message passing library MPI.

History
JGH (02-Jan-2001): New error handling Performance tools JGH (14-Jan-2001): New routines mp_comm_compare, mp_cart_coords, mp_rank_compare, mp_alltoall JGH (06-Feb-2001): New routines mp_comm_free JGH (22-Mar-2001): New routines mp_comm_dup fawzi (04-NOV-2004): storable performance info (for f77 interface) Wrapper routine for mpi_gatherv added (22.12.2005,MK) JGH (13-Feb-2006): Flexible precision JGH (15-Feb-2006): single precision mp_alltoall
Author
JGH

Function/Subroutine Documentation

◆ mp_world_init()

subroutine, public message_passing::mp_world_init ( class(mp_comm_type), intent(out)  mp_comm)

initializes the system default communicator

Parameters
mp_comm[output] : handle of the default communicator
History
2.2004 created [Joost VandeVondele ]
Note
should only be called once

Definition at line 1273 of file message_passing.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mp_world_finalize()

subroutine, public message_passing::mp_world_finalize

finalizes the system default communicator

History
2.2004 created [Joost VandeVondele]

Definition at line 1385 of file message_passing.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mp_abort()

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 1418 of file message_passing.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mp_para_env_create()

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

Parameters
para_envthe new parallel environment
groupthe id of the actual mpi_group
History
08.2002 created [fawzi]
Author
Fawzi Mohamed

Definition at line 2004 of file message_passing.F.

◆ mp_para_env_release()

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)

Parameters
para_envthe new group
History
08.2002 created [fawzi]
Author
Fawzi Mohamed
Note
to avoid circular dependencies cp_log_handling has a private copy of this method (see cp_log_handling:my_mp_para_env_release)!

Definition at line 2026 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_para_cart_create()

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)

Parameters
cartthe cart environment to create
groupthe mpi communicator
Author
fawzi

Definition at line 2042 of file message_passing.F.

◆ mp_para_cart_release()

subroutine, public message_passing::mp_para_cart_release ( type(mp_para_cart_type), pointer  cart)

releases the given cart

Parameters
cartthe cart to release
Author
fawzi

Definition at line 2059 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_dims_create()

subroutine, public message_passing::mp_dims_create ( integer, intent(in)  nodes,
integer, dimension(:), intent(inout)  dims 
)

wrapper to MPI_Dims_create

Parameters
nodes...
dims...

Definition at line 2131 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_waitany()

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

Parameters
requests...
completed...
History
09.2008 created
Author
Iain Bethune (c) The Numerical Algorithms Group (NAG) Ltd, 2008 on behalf of the HECToR project

Definition at line 2355 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_get_node_global_rank()

integer function, public message_passing::mp_get_node_global_rank

Get the local rank on the node according to the global communicator.

Returns
Node Rank id
Author
Alfio Lazzaro

Definition at line 2725 of file message_passing.F.

◆ mp_get_library_version()

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)

Parameters
[out]versionVersion of the library, declared as CHARACTER(LEN=mp_max_library_version_string)
[out]resultlenLength (in printable characters) of the result returned in version (integer)

Definition at line 3855 of file message_passing.F.

◆ mp_file_delete()

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.

Parameters
[in]filepathpath to the file
[in]

Definition at line 3946 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_type_size()

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.

Parameters
[in]type_descriptordata type
[out]type_sizesize of the data type
MPI mapping
mpi_type_size

Definition at line 4292 of file message_passing.F.

◆ mp_file_type_hindexed_make_chv()

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)

Parameters
countnumber of array blocks to read
lengthslengths of each array block
displsbyte offsets for array blocks
Returns
container holding the created type
Author
Nico Holmberg [05.2017]

Definition at line 4441 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_file_type_set_view_chv()

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.

Parameters
fhthe file handle associated with the input file
offsetglobal offset determining where the relevant data begins
type_descriptorcontainer for the MPI type
Author
Nico Holmberg [05.2017]

Definition at line 4485 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_file_type_free()

subroutine, public message_passing::mp_file_type_free ( type(mp_file_descriptor_type)  type_descriptor)

Releases the type used for MPI I/O.

Parameters
type_descriptorthe container for the MPI type
Author
Nico Holmberg [05.2017]

Definition at line 4631 of file message_passing.F.

Here is the caller graph for this function:

◆ mp_file_get_amode()

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

Parameters
mpi_ioflag that determines if MPI I/O will actually be used
replaceflag that indicates whether file needs to be deleted prior to opening it
amodethe MPI I/O access mode
formformatted or unformatted data?
actionthe variable that determines what to do with file
statusthe status flag:
positionshould the file be appended or rewound
Author
Nico Holmberg [11.2017]

Definition at line 4677 of file message_passing.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mp_type_indexed_make_d()

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 
)

...

Parameters
count...
lengths...
displs...
Returns
...

Definition at line 18703 of file message_passing.F.

Here is the call graph for this function:

◆ mp_type_indexed_make_r()

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 
)

...

Parameters
count...
lengths...
displs...
Returns
...

Definition at line 23410 of file message_passing.F.

Here is the call graph for this function:

◆ mp_type_indexed_make_z()

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 
)

...

Parameters
count...
lengths...
displs...
Returns
...

Definition at line 28117 of file message_passing.F.

Here is the call graph for this function:

◆ mp_type_indexed_make_c()

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 
)

...

Parameters
count...
lengths...
displs...
Returns
...

Definition at line 32824 of file message_passing.F.

Variable Documentation

◆ cp2k_is_parallel

logical, parameter, public message_passing::cp2k_is_parallel = .FALSE.

Definition at line 143 of file message_passing.F.

◆ mp_any_tag

integer, parameter, public message_passing::mp_any_tag = -1

Definition at line 144 of file message_passing.F.

◆ mp_any_source

integer, parameter, public message_passing::mp_any_source = -2

Definition at line 145 of file message_passing.F.

◆ mp_status_size

integer, parameter, public message_passing::mp_status_size = -9

Definition at line 154 of file message_passing.F.

◆ mp_proc_null

integer, parameter, public message_passing::mp_proc_null = -10

Definition at line 155 of file message_passing.F.

◆ mp_max_library_version_string

integer, parameter, public message_passing::mp_max_library_version_string = 1

Definition at line 156 of file message_passing.F.

◆ file_offset

integer, parameter, public message_passing::file_offset = int_8

Definition at line 158 of file message_passing.F.

◆ address_kind

integer, parameter, public message_passing::address_kind = int_8

Definition at line 159 of file message_passing.F.

◆ file_amode_create

integer, parameter, public message_passing::file_amode_create = 1

Definition at line 160 of file message_passing.F.

◆ file_amode_rdonly

integer, parameter, public message_passing::file_amode_rdonly = 2

Definition at line 161 of file message_passing.F.

◆ file_amode_wronly

integer, parameter, public message_passing::file_amode_wronly = 4

Definition at line 162 of file message_passing.F.

◆ file_amode_rdwr

integer, parameter, public message_passing::file_amode_rdwr = 8

Definition at line 163 of file message_passing.F.

◆ file_amode_excl

integer, parameter, public message_passing::file_amode_excl = 64

Definition at line 164 of file message_passing.F.

◆ file_amode_append

integer, parameter, public message_passing::file_amode_append = 128

Definition at line 165 of file message_passing.F.

◆ mpi_character_size

integer, parameter, public message_passing::mpi_character_size = 1

Definition at line 170 of file message_passing.F.

◆ mpi_integer_size

integer, parameter, public message_passing::mpi_integer_size = 4

Definition at line 171 of file message_passing.F.

◆ mp_comm_null

type(mp_comm_type), parameter, public message_passing::mp_comm_null = mp_comm_type(mp_comm_null_handle)

Definition at line 811 of file message_passing.F.

◆ mp_comm_self

type(mp_comm_type), parameter, public message_passing::mp_comm_self = mp_comm_type(mp_comm_self_handle)

Definition at line 812 of file message_passing.F.

◆ mp_comm_world

type(mp_comm_type), parameter, public message_passing::mp_comm_world = mp_comm_type(mp_comm_world_handle)

Definition at line 813 of file message_passing.F.

◆ mp_request_null

type(mp_request_type), parameter, public message_passing::mp_request_null = mp_request_type(mp_request_null_handle)

Definition at line 814 of file message_passing.F.

◆ mp_win_null

type(mp_win_type), parameter, public message_passing::mp_win_null = mp_win_type(mp_win_null_handle)

Definition at line 815 of file message_passing.F.

◆ mp_file_null

type(mp_file_type), parameter, public message_passing::mp_file_null = mp_file_type(mp_file_null_handle)

Definition at line 816 of file message_passing.F.

◆ mp_info_null

type(mp_info_type), parameter, public message_passing::mp_info_null = mp_info_type(mp_info_null_handle)

Definition at line 817 of file message_passing.F.

◆ mp_comm_ident

integer, parameter, public message_passing::mp_comm_ident = 0

Definition at line 826 of file message_passing.F.

◆ mp_comm_congruent

integer, parameter, public message_passing::mp_comm_congruent = 1

Definition at line 827 of file message_passing.F.

◆ mp_comm_similar

integer, parameter, public message_passing::mp_comm_similar = 2

Definition at line 828 of file message_passing.F.

◆ mp_comm_unequal

integer, parameter, public message_passing::mp_comm_unequal = 3

Definition at line 829 of file message_passing.F.

◆ mp_comm_compare_default

integer, parameter, public message_passing::mp_comm_compare_default = -1

Definition at line 830 of file message_passing.F.

◆ mp_collect_timings

logical, save, public message_passing::mp_collect_timings = .FALSE.

Definition at line 970 of file message_passing.F.