NEURON
nrnmpidec.h
Go to the documentation of this file.
1 /*
2 # =============================================================================
3 # Copyright (c) 2016 - 2021 Blue Brain Project/EPFL
4 #
5 # See top-level LICENSE file for details.
6 # =============================================================================.
7 */
8 
9 /*
10 This file is processed by mkdynam.sh and so it is important that
11 the prototypes be of the form "type foo(type arg, ...)"
12 */
13 
14 #pragma once
15 
16 #include <stdlib.h>
17 
18 namespace coreneuron {
19 /* from nrnmpi.cpp */
21  int numprocs;
22  int myid;
23 };
24 extern "C" nrnmpi_init_ret_t nrnmpi_init_impl(int* pargc, char*** pargv, bool is_quiet);
26 extern "C" void nrnmpi_finalize_impl(void);
27 declare_mpi_method(nrnmpi_finalize);
28 extern "C" void nrnmpi_check_threading_support_impl();
29 declare_mpi_method(nrnmpi_check_threading_support);
30 // Write given buffer to a new file using MPI collective I/O
31 extern "C" void nrnmpi_write_file_impl(const std::string& filename,
32  const char* buffer,
33  size_t length);
34 declare_mpi_method(nrnmpi_write_file);
35 
36 
37 /* from mpispike.cpp */
38 extern "C" int nrnmpi_spike_exchange_impl(int* nin,
39  NRNMPI_Spike* spikeout,
40  int icapacity,
41  NRNMPI_Spike** spikein,
42  int& ovfl,
43  int nout,
44  NRNMPI_Spikebuf* spbufout,
45  NRNMPI_Spikebuf* spbufin);
46 declare_mpi_method(nrnmpi_spike_exchange);
47 extern "C" int nrnmpi_spike_exchange_compressed_impl(int,
48  unsigned char*&,
49  int,
50  int*,
51  int,
52  unsigned char*,
53  int,
54  unsigned char*,
55  int& ovfl);
56 declare_mpi_method(nrnmpi_spike_exchange_compressed);
57 extern "C" int nrnmpi_int_allmax_impl(int i);
59 extern "C" void nrnmpi_int_allgather_impl(int* s, int* r, int n);
61 extern "C" void nrnmpi_int_alltoall_impl(int* s, int* r, int n);
62 declare_mpi_method(nrnmpi_int_alltoall);
63 extern "C" void nrnmpi_int_alltoallv_impl(const int* s,
64  const int* scnt,
65  const int* sdispl,
66  int* r,
67  int* rcnt,
68  int* rdispl);
70 extern "C" void nrnmpi_dbl_alltoallv_impl(double* s,
71  int* scnt,
72  int* sdispl,
73  double* r,
74  int* rcnt,
75  int* rdispl);
77 extern "C" double nrnmpi_dbl_allmin_impl(double x);
78 declare_mpi_method(nrnmpi_dbl_allmin);
79 extern "C" double nrnmpi_dbl_allmax_impl(double x);
80 declare_mpi_method(nrnmpi_dbl_allmax);
81 extern "C" void nrnmpi_barrier_impl(void);
83 extern "C" double nrnmpi_dbl_allreduce_impl(double x, int type);
84 declare_mpi_method(nrnmpi_dbl_allreduce);
85 extern "C" void nrnmpi_dbl_allreduce_vec_impl(double* src, double* dest, int cnt, int type);
86 declare_mpi_method(nrnmpi_dbl_allreduce_vec);
87 extern "C" void nrnmpi_long_allreduce_vec_impl(long* src, long* dest, int cnt, int type);
88 declare_mpi_method(nrnmpi_long_allreduce_vec);
89 extern "C" bool nrnmpi_initialized_impl();
90 declare_mpi_method(nrnmpi_initialized);
91 extern "C" void nrnmpi_abort_impl(int);
93 extern "C" double nrnmpi_wtime_impl();
95 extern "C" int nrnmpi_local_rank_impl();
96 declare_mpi_method(nrnmpi_local_rank);
97 extern "C" int nrnmpi_local_size_impl();
98 declare_mpi_method(nrnmpi_local_size);
99 #if NRN_MULTISEND
100 extern "C" void nrnmpi_multisend_comm_impl();
102 extern "C" void nrnmpi_multisend_impl(NRNMPI_Spike* spk, int n, int* hosts);
103 declare_mpi_method(nrnmpi_multisend);
104 extern "C" int nrnmpi_multisend_single_advance_impl(NRNMPI_Spike* spk);
106 extern "C" int nrnmpi_multisend_conserve_impl(int nsend, int nrecv);
108 #endif
109 
110 } // namespace coreneuron
static void nrnmpi_dbl_alltoallv(const double *s, const int *scnt, const int *sdispl, double *r, int *rcnt, int *rdispl)
static void nrnmpi_int_allgather(int *s, int *r, int n)
static void nrnmpi_int_alltoallv(const int *s, const int *scnt, const int *sdispl, int *r, int *rcnt, int *rdispl)
static void nrnmpi_barrier()
static int nrnmpi_int_allmax(int x)
#define cnt
Definition: tqueue.hpp:44
#define i
Definition: md1redef.h:19
static double nrnmpi_wtime()
Definition: multisplit.cpp:48
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
int nrnmpi_spike_exchange_impl(int *nin, NRNMPI_Spike *spikeout, int icapacity, NRNMPI_Spike **spikein, int &ovfl, int nout, NRNMPI_Spikebuf *spbufout, NRNMPI_Spikebuf *spbufin)
Definition: mpispike.cpp:82
void nrnmpi_dbl_alltoallv_impl(double *s, int *scnt, int *sdispl, double *r, int *rcnt, int *rdispl)
Definition: mpispike.cpp:261
double nrnmpi_dbl_allmax_impl(double x)
Definition: mpispike.cpp:282
void nrnmpi_dbl_allreduce_vec_impl(double *src, double *dest, int cnt, int type)
Definition: mpispike.cpp:308
double nrnmpi_dbl_allmin_impl(double x)
Definition: mpispike.cpp:276
void nrnmpi_int_alltoall_impl(int *s, int *r, int n)
Definition: mpispike.cpp:248
nrnmpi_init_ret_t nrnmpi_init_impl(int *pargc, char ***pargv, bool is_quiet)
Definition: nrnmpi.cpp:40
void nrnmpi_finalize_impl(void)
Definition: nrnmpi.cpp:81
double nrnmpi_dbl_allreduce_impl(double x, int type)
Definition: mpispike.cpp:302
void nrnmpi_abort_impl(int errcode)
Definition: nrnmpi.cpp:155
void nrnmpi_write_file_impl(const std::string &filename, const char *buffer, size_t length)
Write given buffer to a new file using MPI collective I/O.
Definition: nrnmpi.cpp:213
double nrnmpi_wtime_impl()
Definition: nrnmpi.cpp:159
declare_mpi_method(nrnmpi_init)
int nrnmpi_local_size_impl()
Return number of ranks running on single shared memory node.
Definition: nrnmpi.cpp:188
void nrnmpi_barrier_impl()
Definition: mpispike.cpp:288
int nrnmpi_local_rank_impl()
Return local mpi rank within a shared memory node.
Definition: nrnmpi.cpp:170
int nrnmpi_int_allmax_impl(int x)
Definition: mpispike.cpp:242
void nrnmpi_int_alltoallv_impl(const int *s, const int *scnt, const int *sdispl, int *r, int *rcnt, int *rdispl)
Definition: mpispike.cpp:252
void nrnmpi_int_allgather_impl(int *s, int *r, int n)
Definition: mpispike.cpp:272
int nrnmpi_spike_exchange_compressed_impl(int localgid_size, unsigned char *&spfixin_ovfl, int send_nspike, int *nin, int ovfl_capacity, unsigned char *spikeout_fixed, int ag_send_size, unsigned char *spikein_fixed, int &ovfl)
Definition: mpispike.cpp:177
bool nrnmpi_initialized_impl()
Definition: nrnmpi.cpp:149
void nrnmpi_long_allreduce_vec_impl(long *src, long *dest, int cnt, int type)
Definition: mpispike.cpp:313
void nrnmpi_check_threading_support_impl()
Definition: nrnmpi.cpp:139
int const size_t const size_t n
Definition: nrngsl.h:10
s
Definition: multisend.cpp:521
void nrnmpi_multisend_comm()
int nrnmpi_multisend_single_advance(NRNMPI_Spike *)
int nrnmpi_multisend_conserve(int nsend, int nrecv)
void nrnmpi_init(int nrnmpi_under_nrncontrol, int *pargc, char ***pargv)
Definition: nrnmpi.cpp:55
void nrnmpi_abort(int errcode)
Definition: nrnmpi.cpp:209
short type
Definition: cabvars.h:10