LCOV - code coverage report
Current view: top level - core/src/distributed - mpi.h Hit Total Coverage
Test: ROOT-Sim master Documentation Coverage Lines: 15 16 93.8 %
Date: 2021-03-25 15:11:55

          Line data    Source code
       1           1 : /**
       2             :  * @file distributed/mpi.h
       3             :  *
       4             :  * @brief MPI Support Module
       5             :  *
       6             :  * This module implements all basic MPI facilities to let the distributed
       7             :  * execution of a simulation model take place consistently.
       8             :  *
       9             :  * Several facilities are thread-safe, others are not. Check carefully which
      10             :  * of these can be used by worker threads without coordination when relying
      11             :  * on this module.
      12             :  *
      13             :  * SPDX-FileCopyrightText: 2008-2021 HPDCS Group <rootsim@googlegroups.com>
      14             :  * SPDX-License-Identifier: GPL-3.0-only
      15             :  */
      16             : #pragma once
      17             : 
      18             : #include <lp/msg.h>
      19             : 
      20             : /// A control message MPI tag value
      21           1 : enum msg_ctrl_tag {
      22             :         /// Used by the master to start a new gvt reduction operation
      23             :         MSG_CTRL_GVT_START = 1,
      24             :         /// Used by slaves to signal their completion of the gvt protocol
      25             :         MSG_CTRL_GVT_DONE,
      26             :         /// Used in broadcast to signal that local LPs can terminate
      27             :         MSG_CTRL_TERMINATION
      28             : };
      29             : 
      30           1 : extern void mpi_global_init(int *argc_p, char ***argv_p);
      31           1 : extern void mpi_global_fini(void);
      32             : 
      33           1 : extern void mpi_remote_msg_send(struct lp_msg *msg, nid_t dest_nid);
      34           1 : extern void mpi_remote_anti_msg_send(struct lp_msg *msg, nid_t dest_nid);
      35             : 
      36           1 : extern void mpi_control_msg_broadcast(enum msg_ctrl_tag ctrl);
      37           1 : extern void mpi_control_msg_send_to(enum msg_ctrl_tag ctrl, nid_t dest);
      38           1 : extern void mpi_remote_msg_handle(void);
      39             : 
      40           0 : extern void mpi_reduce_sum_scatter(const unsigned values[n_nodes],
      41             :                 unsigned *result);
      42           1 : extern bool mpi_reduce_sum_scatter_done(void);
      43             : 
      44           1 : extern void mpi_reduce_min(double *node_min_p);
      45           1 : extern bool mpi_reduce_min_done(void);
      46             : 
      47           1 : extern void mpi_node_barrier(void);
      48           1 : extern void mpi_blocking_data_send(const void *data, int data_size, nid_t dest);
      49           1 : extern void *mpi_blocking_data_rcv(int *data_size_p, nid_t src);

Generated by: LCOV version 1.14