(git:421338c)
Loading...
Searching...
No Matches
message_passing Module Reference

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

Data Types

interface  mp_allocate
 
type  mp_cart_type
 
type  mp_comm_type
 
interface  mp_deallocate
 
type  mp_file_descriptor_type
 
type  mp_file_type
 
type  mp_info_type
 
type  mp_para_cart_type
 represent a multidimensional parallel environment More...
 
type  mp_para_env_p_type
 represent a pointer to a para env (to build arrays) More...
 
type  mp_para_env_type
 stores all the informations relevant to an mpi environment More...
 
type  mp_request_type
 
interface  mp_testall
 
interface  mp_testany
 
type  mp_type_descriptor_type
 
interface  mp_type_make
 
interface  mp_waitall
 
type  mp_win_type
 

Functions/Subroutines

subroutine, public mp_world_init (mp_comm)
 initializes the system default communicator
 
subroutine, public mp_world_finalize ()
 finalizes the system default communicator
 
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_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)
 
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.
 

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 1230 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 1342 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 1375 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 1961 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 1983 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 1999 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 2016 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 2088 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 2271 of file message_passing.F.

Here is the caller graph for this function:

◆ 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 3634 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]

optional) info info object

History
11.2017 created [Nico Holmberg]

Definition at line 3725 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 4071 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 4224 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 4268 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 4414 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 4460 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 18494 of file message_passing.F.

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

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

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

Variable Documentation

◆ cp2k_is_parallel

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

Definition at line 101 of file message_passing.F.

◆ mp_any_tag

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

Definition at line 102 of file message_passing.F.

◆ mp_any_source

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

Definition at line 103 of file message_passing.F.

◆ mp_status_size

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

Definition at line 112 of file message_passing.F.

◆ mp_proc_null

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

Definition at line 113 of file message_passing.F.

◆ mp_max_library_version_string

integer, parameter, public message_passing::mp_max_library_version_string = 1

Definition at line 114 of file message_passing.F.

◆ file_offset

integer, parameter, public message_passing::file_offset = int_8

Definition at line 116 of file message_passing.F.

◆ address_kind

integer, parameter, public message_passing::address_kind = int_8

Definition at line 117 of file message_passing.F.

◆ file_amode_create

integer, parameter, public message_passing::file_amode_create = 1

Definition at line 118 of file message_passing.F.

◆ file_amode_rdonly

integer, parameter, public message_passing::file_amode_rdonly = 2

Definition at line 119 of file message_passing.F.

◆ file_amode_wronly

integer, parameter, public message_passing::file_amode_wronly = 4

Definition at line 120 of file message_passing.F.

◆ file_amode_rdwr

integer, parameter, public message_passing::file_amode_rdwr = 8

Definition at line 121 of file message_passing.F.

◆ file_amode_excl

integer, parameter, public message_passing::file_amode_excl = 64

Definition at line 122 of file message_passing.F.

◆ file_amode_append

integer, parameter, public message_passing::file_amode_append = 128

Definition at line 123 of file message_passing.F.

◆ mpi_character_size

integer, parameter, public message_passing::mpi_character_size = 1

Definition at line 128 of file message_passing.F.

◆ mpi_integer_size

integer, parameter, public message_passing::mpi_integer_size = 4

Definition at line 129 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 769 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 770 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 771 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 772 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 773 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 774 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 775 of file message_passing.F.

◆ mp_comm_ident

integer, parameter, public message_passing::mp_comm_ident = 0

Definition at line 784 of file message_passing.F.

◆ mp_comm_congruent

integer, parameter, public message_passing::mp_comm_congruent = 1

Definition at line 785 of file message_passing.F.

◆ mp_comm_similar

integer, parameter, public message_passing::mp_comm_similar = 2

Definition at line 786 of file message_passing.F.

◆ mp_comm_unequal

integer, parameter, public message_passing::mp_comm_unequal = 3

Definition at line 787 of file message_passing.F.

◆ mp_comm_compare_default

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

Definition at line 788 of file message_passing.F.

◆ intlen

integer, parameter message_passing::intlen = BIT_SIZE(0)/8

Definition at line 922 of file message_passing.F.

◆ mp_collect_timings

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

Definition at line 927 of file message_passing.F.