![]() |
(git:33f85d8)
|
Data Types | |
type | fb_com_atom_pairs_obj |
defines a fb_com_atom_pairs object More... | |
type | fb_com_tasks_obj |
defines a fb_com_tasks object More... | |
Functions/Subroutines | |
subroutine, public | fb_com_tasks_release (com_tasks) |
Releases an fb_com_tasks object. | |
subroutine, public | fb_com_atom_pairs_release (atom_pairs) |
Releases an fb_com_atom_pairs object. | |
subroutine, public | fb_com_tasks_nullify (com_tasks) |
Nullifies a fb_com_tasks object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content. | |
subroutine, public | fb_com_atom_pairs_nullify (atom_pairs) |
Nullifies a fb_com_atom_pairs object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content. | |
logical function, public | fb_com_atom_pairs_has_data (atom_pairs) |
Checks if a fb_com_atom_pairs object is associated with an actual data content or not. | |
subroutine, public | fb_com_tasks_create (com_tasks) |
Creates and initialises an empty fb_com_tasks object. | |
subroutine, public | fb_com_atom_pairs_create (atom_pairs) |
Creates and initialises an empty fb_com_atom_pairs object. | |
subroutine, public | fb_com_atom_pairs_init (atom_pairs) |
Initialises an fb_com_atom_pairs object, and makes it empty. | |
subroutine, public | fb_com_tasks_get (com_tasks, task_dim, ntasks, nencode, tasks) |
Gets attributes from a fb_com_tasks object, one should only access the data content in a fb_com_tasks object outside this module via this procedure. | |
subroutine, public | fb_com_atom_pairs_get (atom_pairs, npairs, natoms_encode, pairs) |
Gets attributes from a fb_com_atom_pairs object, one should only access the data content in a fb_com_atom_pairs object outside this module via this procedure. | |
subroutine, public | fb_com_tasks_set (com_tasks, task_dim, ntasks, nencode, tasks) |
Sets attributes in a fb_com_tasks object, one should only access the data content in a fb_com_tasks object outside this module via this procedure. | |
subroutine, public | fb_com_tasks_transpose_dest_src (tasks_dest_is_me, direction, tasks_src_is_me, para_env) |
Start from a local set of tasks that has desc/src process equal to the local MPI rank, communicate with other processes so that a new local set of tasks is constructed with src/desc process equal to the local MPI rank. | |
subroutine, public | fb_com_tasks_build_atom_pairs (com_tasks, atom_pairs, natoms_encode, send_or_recv) |
Generate send or receive atom_pair lists from a com_tasks object. atom_pair list is used as a condensed index for the local/remote matrix blocks to be sent/received. | |
subroutine, public | fb_com_tasks_encode_pair (ind, iatom, jatom, natoms) |
Encodes (iatom, jatom) pair index of a block into a single integer. | |
subroutine, public | fb_com_tasks_decode_pair (ind, iatom, jatom, natoms) |
Dncodes a single integer into (iatom, jatom) pair index of a block into a single. | |
subroutine, public | fb_com_atom_pairs_decode (ind, pe, iatom, jatom, natoms) |
Decodes a single integer into the (rank, iatom, jatom) index of a communication task to send/receive a block to/from a process. | |
subroutine, public | fb_com_atom_pairs_calc_buffer_sizes (atom_pairs, nprocs, row_blk_sizes, col_blk_sizes, sendrecv_sizes, sendrecv_disps, sendrecv_pair_counts, sendrecv_pair_disps) |
Calculate the MPI send or recv buffer sizes according to the communication pairs (atom_pairs) and DBCSR matrix data. Each atom_pair corresponds to one DBCSR matrix block that needs to be sent or recerived. | |
subroutine, public | fb_com_atom_pairs_gather_blks (dbcsr_mat, atom_pairs_send, atom_pairs_recv, para_env, matrix_storage) |
Given send and recv fb_com_atom_pair object, gather all the relevant DBCSR matrix blocks together, and add them to a fb_matrix_data object for storage. | |
subroutine, public | fb_com_atom_pairs_distribute_blks (matrix_storage, atom_pairs_send, atom_pairs_recv, para_env, dbcsr_mat) |
Given send and recv fb_com_atom_pair object, distribute the matrix blocks stored in a fb_matrix_data object to a computable DBCSR matrix. It is assumed in this subroutine that the sizes of each block stored in fb_matrix_data object is consistent with the pre-defined block sizes in the DBCSR matrix. | |
Variables | |
integer, parameter, public | task_n_records = 4 |
integer, parameter, public | task_dest = 1 |
integer, parameter, public | task_src = 2 |
integer, parameter, public | task_pair = 3 |
integer, parameter, public | task_cost = 4 |
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_release | ( | type(fb_com_tasks_obj), intent(inout) | com_tasks | ) |
Releases an fb_com_tasks object.
com_tasks | the fb_com_tasks object, its content must not be UNDEFINED, and the subroutine does nothing if the content points to NULL |
Definition at line 151 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_release | ( | type(fb_com_atom_pairs_obj), intent(inout) | atom_pairs | ) |
Releases an fb_com_atom_pairs object.
atom_pairs | the fb_com_atom_pairs object, its content must not be UNDEFINED, and the subroutine does nothing if the content points to NULL |
Definition at line 171 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_nullify | ( | type(fb_com_tasks_obj), intent(inout) | com_tasks | ) |
Nullifies a fb_com_tasks object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content.
com_tasks | the com_tasks object |
Definition at line 192 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_nullify | ( | type(fb_com_atom_pairs_obj), intent(inout) | atom_pairs | ) |
Nullifies a fb_com_atom_pairs object, note that it does not release the original object. This procedure is used to nullify the pointer contained in the object which is used to associate to the actual object content.
atom_pairs | the fb_com_atom_pairs object |
Definition at line 206 of file qs_fb_com_tasks_types.F.
logical function, public qs_fb_com_tasks_types::fb_com_atom_pairs_has_data | ( | type(fb_com_atom_pairs_obj), intent(in) | atom_pairs | ) |
Checks if a fb_com_atom_pairs object is associated with an actual data content or not.
atom_pairs | the fb_com_atom_pairs object |
Definition at line 259 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_create | ( | type(fb_com_tasks_obj), intent(inout) | com_tasks | ) |
Creates and initialises an empty fb_com_tasks object.
com_tasks | the fb_com_tasks object, its content must be NULL and cannot be UNDEFINED |
Definition at line 272 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_create | ( | type(fb_com_atom_pairs_obj), intent(inout) | atom_pairs | ) |
Creates and initialises an empty fb_com_atom_pairs object.
atom_pairs | the fb_com_atom_pairs object, its content must be NULL and cannot be UNDEFINED |
Definition at line 289 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_init | ( | type(fb_com_atom_pairs_obj), intent(inout) | atom_pairs | ) |
Initialises an fb_com_atom_pairs object, and makes it empty.
atom_pairs | the fb_com_atom_pairs object, its content must not be NULL or UNDEFINED |
Definition at line 323 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_get | ( | type(fb_com_tasks_obj), intent(in) | com_tasks, |
integer, intent(out), optional | task_dim, | ||
integer, intent(out), optional | ntasks, | ||
integer, intent(out), optional | nencode, | ||
integer(kind=int_8), dimension(:, :), optional, pointer | tasks | ||
) |
Gets attributes from a fb_com_tasks object, one should only access the data content in a fb_com_tasks object outside this module via this procedure.
com_tasks | the fb_com_tasks object, its content must not be NULL or UNDEFINED |
task_dim | [OPTIONAL]: if present, outputs com_tasksobjtask_dim |
ntasks | [OPTIONAL]: if present, outputs com_tasksobjntasks |
nencode | [OPTIONAL]: if present, outputs com_tasksobjnencode |
tasks | [OPTIONAL]: if present, outputs pointer com_tasksobjtasks |
Definition at line 346 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_get | ( | type(fb_com_atom_pairs_obj), intent(in) | atom_pairs, |
integer, intent(out), optional | npairs, | ||
integer, intent(out), optional | natoms_encode, | ||
integer(kind=int_8), dimension(:), optional, pointer | pairs | ||
) |
Gets attributes from a fb_com_atom_pairs object, one should only access the data content in a fb_com_atom_pairs object outside this module via this procedure.
atom_pairs | the fb_com_atom_pairs object, its content must not be NULL or UNDEFINED |
npairs | [OPTIONAL]: if present, outputs atom_pairsobjnpairs |
natoms_encode | [OPTIONAL]: if present, outputs atom_pairsobjnatoms_encode |
pairs | [OPTIONAL]: if present, outputs pointer atom_pairsobjpairs |
Definition at line 374 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_set | ( | type(fb_com_tasks_obj), intent(inout) | com_tasks, |
integer, intent(in), optional | task_dim, | ||
integer, intent(in), optional | ntasks, | ||
integer, intent(in), optional | nencode, | ||
integer(kind=int_8), dimension(:, :), optional, pointer | tasks | ||
) |
Sets attributes in a fb_com_tasks object, one should only access the data content in a fb_com_tasks object outside this module via this procedure.
com_tasks | the fb_com_tasks object, its content must not be NULL or UNDEFINED |
task_dim | [OPTIONAL]: if present, sets com_tasksobjtask_dim |
ntasks | [OPTIONAL]: if present, sets com_tasksobjntasks |
nencode | [OPTIONAL]: if present, sets com_tasksobjnencode |
tasks | [OPTIONAL]: if present, associates pointer com_tasksobjtasks |
Definition at line 401 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_transpose_dest_src | ( | type(fb_com_tasks_obj), intent(inout) | tasks_dest_is_me, |
character, intent(in) | direction, | ||
type(fb_com_tasks_obj), intent(inout) | tasks_src_is_me, | ||
type(mp_para_env_type), pointer | para_env | ||
) |
Start from a local set of tasks that has desc/src process equal to the local MPI rank, communicate with other processes so that a new local set of tasks is constructed with src/desc process equal to the local MPI rank.
tasks_dest_is_me | the local com_task object with all tasks having the desc process id equal to my_id |
direction | direction of operation: ">" means from tasks_dest_is_me construct tasks_src_is_me "<" means from tasks_src_is_me construct tasks_dest_is_me |
tasks_src_is_me | the local com_task object with all tasks having the src process id equal to my_id |
para_env | CP2K parallel environment object that stores MPI related information of the current run |
Definition at line 470 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_build_atom_pairs | ( | type(fb_com_tasks_obj), intent(in) | com_tasks, |
type(fb_com_atom_pairs_obj), intent(inout) | atom_pairs, | ||
integer, intent(in) | natoms_encode, | ||
character(len=*), intent(in) | send_or_recv | ||
) |
Generate send or receive atom_pair lists from a com_tasks object. atom_pair list is used as a condensed index for the local/remote matrix blocks to be sent/received.
com_tasks | the com_tasks object |
atom_pairs | fb_com_atom_pairs_obj containing list of encoded atomic pair indices and the dest/src proc id for the matrix block to be sent/received. |
natoms_encode | the total number of atoms the atomic pair indices corresponds to, and it is used for encode the atom_pairs values |
send_or_recv | whether the atom_pair to be generated is for the local matrix blocks to be sent or the remote matrix blocks to be received for this MPI process |
Definition at line 637 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_encode_pair | ( | integer(kind=int_8), intent(out) | ind, |
integer, intent(in) | iatom, | ||
integer, intent(in) | jatom, | ||
integer, intent(in) | natoms | ||
) |
Encodes (iatom, jatom) pair index of a block into a single integer.
ind | encoded integer |
iatom | the first index of the (iatom, jatom) block index |
jatom | the second index of the (iatom, jatom) block index |
natoms | the total number of atoms iatom and jatom indexes |
Definition at line 732 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_tasks_decode_pair | ( | integer(kind=int_8), intent(in) | ind, |
integer, intent(out) | iatom, | ||
integer, intent(out) | jatom, | ||
integer, intent(in) | natoms | ||
) |
Dncodes a single integer into (iatom, jatom) pair index of a block into a single.
ind | encoded integer |
iatom | the first index of the (iatom, jatom) block index |
jatom | the second index of the (iatom, jatom) block index |
natoms | the total number of atoms iatom and jatom indexes |
Definition at line 754 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_decode | ( | integer(kind=int_8), intent(in) | ind, |
integer, intent(out) | pe, | ||
integer, intent(out) | iatom, | ||
integer, intent(out) | jatom, | ||
integer, intent(in) | natoms | ||
) |
Decodes a single integer into the (rank, iatom, jatom) index of a communication task to send/receive a block to/from a process.
ind | : encoded integer |
pe | : the rank of the process the block to be send to or receive from |
iatom | : the first index of the (iatom, jatom) block index |
jatom | : the second index of the (iatom, jatom) block index |
natoms | : the total number of atoms iatom and jatom indexes |
Definition at line 804 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_calc_buffer_sizes | ( | type(fb_com_atom_pairs_obj), intent(in) | atom_pairs, |
integer, intent(in) | nprocs, | ||
integer, dimension(:), intent(in) | row_blk_sizes, | ||
integer, dimension(:), intent(in) | col_blk_sizes, | ||
integer, dimension(:), intent(out) | sendrecv_sizes, | ||
integer, dimension(:), intent(out) | sendrecv_disps, | ||
integer, dimension(:), intent(out) | sendrecv_pair_counts, | ||
integer, dimension(:), intent(out) | sendrecv_pair_disps | ||
) |
Calculate the MPI send or recv buffer sizes according to the communication pairs (atom_pairs) and DBCSR matrix data. Each atom_pair corresponds to one DBCSR matrix block that needs to be sent or recerived.
atom_pairs | : the communication pair object for either sending or receiving |
nprocs | : total number of MPI processes in communicator |
row_blk_sizes | : row_blk_sizes(iblkrow) = number of element rows in each block in the iblkrow-th block row of the DBCSR matrix |
col_blk_sizes | : col_blk_sizes(iblkcol) = number of element cols in each block in the iblkcol-th block col of the DBCSR matrix |
sendrecv_sizes | : size required for the send of recv buffer for each dest/src process |
sendrecv_disps | : sendrecv_disps(ipe) + 1 = starting location in send/recv buffer for data destined for process ipe |
sendrecv_pair_counts | : sendrecv_pair_counts(ipe) = number of pairs (blocks) to be sent to or recv from process ipe |
sendrecv_pair_disps | send_recv_pair_disps(ipe) + 1 = start location in atom_pairs array for all the pairs to be sent to or recv from process ipe |
Definition at line 847 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_gather_blks | ( | type(dbcsr_type), pointer | dbcsr_mat, |
type(fb_com_atom_pairs_obj), intent(in) | atom_pairs_send, | ||
type(fb_com_atom_pairs_obj), intent(in) | atom_pairs_recv, | ||
type(mp_para_env_type), pointer | para_env, | ||
type(fb_matrix_data_obj), intent(inout) | matrix_storage | ||
) |
Given send and recv fb_com_atom_pair object, gather all the relevant DBCSR matrix blocks together, and add them to a fb_matrix_data object for storage.
dbcsr_mat | : the DBCSR matrix where the matrix blocks will be obtained from |
atom_pairs_send | : prescription on exactly which DBCSR blocks are to be sent to where |
atom_pairs_recv | : prescription on exactly which DBCSR blocks are to be received from where |
para_env | : CP2K parallel environment |
matrix_storage | : the fb_matrix_data object to store the received DBCSR matrix blocks |
Definition at line 921 of file qs_fb_com_tasks_types.F.
subroutine, public qs_fb_com_tasks_types::fb_com_atom_pairs_distribute_blks | ( | type(fb_matrix_data_obj), intent(in) | matrix_storage, |
type(fb_com_atom_pairs_obj), intent(in) | atom_pairs_send, | ||
type(fb_com_atom_pairs_obj), intent(in) | atom_pairs_recv, | ||
type(mp_para_env_type), pointer | para_env, | ||
type(dbcsr_type), pointer | dbcsr_mat | ||
) |
Given send and recv fb_com_atom_pair object, distribute the matrix blocks stored in a fb_matrix_data object to a computable DBCSR matrix. It is assumed in this subroutine that the sizes of each block stored in fb_matrix_data object is consistent with the pre-defined block sizes in the DBCSR matrix.
matrix_storage | : the fb_matrix_data object |
atom_pairs_send | : prescription on exactly which DBCSR blocks are to be sent to where |
atom_pairs_recv | : prescription on exactly which DBCSR blocks are to be received from where |
para_env | : CP2K parallel environment |
dbcsr_mat | : the DBCSR matrix where the matrix blocks will be distributed to |
Definition at line 1106 of file qs_fb_com_tasks_types.F.
integer, parameter, public qs_fb_com_tasks_types::task_n_records = 4 |
Definition at line 75 of file qs_fb_com_tasks_types.F.
integer, parameter, public qs_fb_com_tasks_types::task_dest = 1 |
Definition at line 77 of file qs_fb_com_tasks_types.F.
integer, parameter, public qs_fb_com_tasks_types::task_src = 2 |
Definition at line 77 of file qs_fb_com_tasks_types.F.
integer, parameter, public qs_fb_com_tasks_types::task_pair = 3 |
Definition at line 77 of file qs_fb_com_tasks_types.F.
integer, parameter, public qs_fb_com_tasks_types::task_cost = 4 |
Definition at line 77 of file qs_fb_com_tasks_types.F.