Line data Source code
1 1 : /** 2 : * @file distributed/no_mpi.c 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 : 17 : #include <distributed/mpi.h> 18 : 19 1 : void mpi_global_init(int *argc_p, char ***argv_p) 20 : { 21 : (void)argc_p; 22 : (void)argv_p; 23 : } 24 : 25 1 : void mpi_global_fini(void) 26 : { 27 : } 28 : 29 1 : void mpi_remote_msg_send(struct lp_msg *msg, nid_t dest_nid) 30 : { 31 : (void)msg; 32 : (void)dest_nid; 33 : __builtin_unreachable(); 34 : } 35 : 36 1 : void mpi_remote_anti_msg_send(struct lp_msg *msg, nid_t dest_nid) 37 : { 38 : (void)msg; 39 : (void)dest_nid; 40 : __builtin_unreachable(); 41 : } 42 : 43 1 : void mpi_control_msg_broadcast(enum msg_ctrl_tag ctrl) 44 : { 45 : switch (ctrl) { 46 : case MSG_CTRL_GVT_START: 47 : gvt_start_processing(); 48 : break; 49 : case MSG_CTRL_GVT_DONE: 50 : gvt_on_done_ctrl_msg(); 51 : break; 52 : case MSG_CTRL_TERMINATION: 53 : termination_on_ctrl_msg(); 54 : break; 55 : default: 56 : __builtin_unreachable(); 57 : } 58 : } 59 : 60 1 : void mpi_control_msg_send_to(enum msg_ctrl_tag ctrl, nid_t dest) 61 : { 62 : if (dest) 63 : __builtin_unreachable(); 64 : 65 : mpi_control_msg_broadcast(ctrl); 66 : } 67 : 68 1 : void mpi_remote_msg_handle(void) 69 : { 70 : } 71 : 72 0 : void mpi_reduce_sum_scatter(const unsigned values[n_nodes], unsigned *result) 73 : { 74 : *result = values[0]; 75 : } 76 : 77 1 : bool mpi_reduce_sum_scatter_done(void) 78 : { 79 : return true; 80 : } 81 : 82 1 : void mpi_reduce_min(double *node_min_p) 83 : { 84 : (void)node_min_p; 85 : } 86 : 87 1 : bool mpi_reduce_min_done(void) 88 : { 89 : return true; 90 : } 91 : 92 1 : void mpi_node_barrier(void) 93 : { 94 : } 95 : 96 1 : void mpi_blocking_data_send(const void *data, int data_size, nid_t dest) 97 : { 98 : (void)data; 99 : (void)data_size; 100 : (void)dest; 101 : } 102 : 103 1 : void *mpi_blocking_data_rcv(int *data_size_p, nid_t src) 104 : { 105 : (void)data_size_p; 106 : (void)src; 107 : return NULL; 108 : }