forked from ChristophKirst/SimKernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsim_mpi.h
More file actions
38 lines (27 loc) · 1.2 KB
/
sim_mpi.h
File metadata and controls
38 lines (27 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/***********************************************************************
sim_mpi.h - MPI - routines used by Sim / SimControll
Christoph Kirst
Max Planck Institue for Dynamics and Self-Organisation
HU Berlin, BCCN Göttingen & Berlin (2008)
************************************************************************/
#ifndef SIM_MPI_H
#define SIM_MPI_H
#include <string>
#include "mpi.h"
#define SIM_MPI_CNTRL 0
#define SIM_MPI_TAG 100
//#include <iostream>
//#define SIM_MPI_DEBUG(s1,s2) std::cout << "SimMpi Debug: " << s1 << " " << s2 << std::endl; std::cout.flush();
#define SIM_MPI_DEBUG(s1,s2)
void sim_send_signal(int sig, int iter, int to /* = SIM_MPI_CNTRL*/);
void sim_recv_signal(int& sig, int&iter, int& from);
void sim_send_message(std::string msg, int to /*= SIM_MPI_CNTRL*/);
void sim_recv_message(std::string& msg, int& from);
void sim_send_init(int niter, int to);
void sim_recv_init(int& niter, int from /*= SIM_MPI_CNTRL*/);
void sim_send_do(int iter, int to);
void sim_recv_do(int& iter, int from /*= SIM_MPI_CNTRL*/);
void sim_send_finalize(int rank, int to /*= SIM_MPI_CNTRL*/);
void sim_recv_finalize(int& rank, int from /*= MPI::ANY_SOURCE*/);
#endif