CoreNEURON
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);
28 extern "C" void nrnmpi_check_threading_support_impl();
31 // Write given buffer to a new file using MPI collective I/O
32 extern "C" void nrnmpi_write_file_impl(const std::string& filename,
33  const char* buffer,
34  size_t length);
36 
37 
38 /* from mpispike.cpp */
39 extern "C" int nrnmpi_spike_exchange_impl(int* nin,
40  NRNMPI_Spike* spikeout,
41  int icapacity,
42  NRNMPI_Spike** spikein,
43  int& ovfl,
44  int nout,
45  NRNMPI_Spikebuf* spbufout,
46  NRNMPI_Spikebuf* spbufin);
49 extern "C" int nrnmpi_spike_exchange_compressed_impl(int,
50  unsigned char*&,
51  int,
52  int*,
53  int,
54  unsigned char*,
55  int,
56  unsigned char*,
57  int& ovfl);
60 extern "C" int nrnmpi_int_allmax_impl(int i);
62 extern "C" void nrnmpi_int_allgather_impl(int* s, int* r, int n);
64 extern "C" void nrnmpi_int_alltoall_impl(int* s, int* r, int n);
66 extern "C" void nrnmpi_int_alltoallv_impl(const int* s,
67  const int* scnt,
68  const int* sdispl,
69  int* r,
70  int* rcnt,
71  int* rdispl);
73 extern "C" void nrnmpi_dbl_alltoallv_impl(double* s,
74  int* scnt,
75  int* sdispl,
76  double* r,
77  int* rcnt,
78  int* rdispl);
80 extern "C" double nrnmpi_dbl_allmin_impl(double x);
82 extern "C" double nrnmpi_dbl_allmax_impl(double x);
84 extern "C" void nrnmpi_barrier_impl(void);
86 extern "C" double nrnmpi_dbl_allreduce_impl(double x, int type);
88 extern "C" void nrnmpi_dbl_allreduce_vec_impl(double* src, double* dest, int cnt, int type);
91 extern "C" void nrnmpi_long_allreduce_vec_impl(long* src, long* dest, int cnt, int type);
94 extern "C" bool nrnmpi_initialized_impl();
96 extern "C" void nrnmpi_abort_impl(int);
98 extern "C" double nrnmpi_wtime_impl();
100 extern "C" int nrnmpi_local_rank_impl();
102 extern "C" int nrnmpi_local_size_impl();
104 #if NRN_MULTISEND
105 extern "C" void nrnmpi_multisend_comm_impl();
106 extern mpi_function<cnrn_make_integral_constant_t(nrnmpi_multisend_comm_impl)>
107  nrnmpi_multisend_comm;
108 extern "C" void nrnmpi_multisend_impl(NRNMPI_Spike* spk, int n, int* hosts);
109 extern mpi_function<cnrn_make_integral_constant_t(nrnmpi_multisend_impl)> nrnmpi_multisend;
110 extern "C" int nrnmpi_multisend_single_advance_impl(NRNMPI_Spike* spk);
111 extern mpi_function<cnrn_make_integral_constant_t(nrnmpi_multisend_single_advance_impl)>
112  nrnmpi_multisend_single_advance;
113 extern "C" int nrnmpi_multisend_conserve_impl(int nsend, int nrecv);
114 extern mpi_function<cnrn_make_integral_constant_t(nrnmpi_multisend_conserve_impl)>
115  nrnmpi_multisend_conserve;
116 #endif
117 
118 } // namespace coreneuron
coreneuron::nrnmpi_int_allgather
mpi_function< cnrn_make_integral_constant_t(nrnmpi_int_allgather_impl)> nrnmpi_int_allgather
Definition: nrnmpidec.cpp:30
coreneuron::nrnmpi_local_rank_impl
int nrnmpi_local_rank_impl()
Return local mpi rank within a shared memory node.
Definition: nrnmpi.cpp:117
coreneuron::nrnmpi_abort_impl
void nrnmpi_abort_impl(int errcode)
Definition: nrnmpi.cpp:102
coreneuron::nrnmpi_write_file
mpi_function< cnrn_make_integral_constant_t(nrnmpi_write_file_impl)> nrnmpi_write_file
Definition: nrnmpidec.cpp:20
coreneuron::nrnmpi_int_alltoall
mpi_function< cnrn_make_integral_constant_t(nrnmpi_int_alltoall_impl)> nrnmpi_int_alltoall
Definition: nrnmpidec.cpp:32
coreneuron::nrnmpi_local_size_impl
int nrnmpi_local_size_impl()
Return number of ranks running on single shared memory node.
Definition: nrnmpi.cpp:135
coreneuron::nrnmpi_finalize
mpi_function< cnrn_make_integral_constant_t(nrnmpi_finalize_impl)> nrnmpi_finalize
Definition: nrnmpidec.cpp:16
cnrn_make_integral_constant_t
#define cnrn_make_integral_constant_t(x)
Definition: nrnmpi.h:77
coreneuron::nrnmpi_barrier
mpi_function< cnrn_make_integral_constant_t(nrnmpi_barrier_impl)> nrnmpi_barrier
Definition: nrnmpidec.cpp:42
coreneuron::nrnmpi_dbl_allreduce
mpi_function< cnrn_make_integral_constant_t(nrnmpi_dbl_allreduce_impl)> nrnmpi_dbl_allreduce
Definition: nrnmpidec.cpp:44
coreneuron::nrnmpi_dbl_allmin_impl
double nrnmpi_dbl_allmin_impl(double x)
Definition: mpispike.cpp:276
coreneuron::nrnmpi_barrier_impl
void nrnmpi_barrier_impl()
Definition: mpispike.cpp:288
coreneuron::nrnmpi_init_impl
nrnmpi_init_ret_t nrnmpi_init_impl(int *pargc, char ***pargv, bool is_quiet)
Definition: nrnmpi.cpp:37
coreneuron::nrnmpi_init_ret_t
Definition: nrnmpidec.h:20
coreneuron::nrnmpi_int_alltoallv
mpi_function< cnrn_make_integral_constant_t(nrnmpi_int_alltoallv_impl)> nrnmpi_int_alltoallv
Definition: nrnmpidec.cpp:34
coreneuron::nrnmpi_init_ret_t::numprocs
int numprocs
Definition: nrnmpidec.h:21
coreneuron::nrnmpi_spike_exchange_compressed
mpi_function< cnrn_make_integral_constant_t(nrnmpi_spike_exchange_compressed_impl)> nrnmpi_spike_exchange_compressed
Definition: nrnmpidec.cpp:27
coreneuron::nrnmpi_long_allreduce_vec
mpi_function< cnrn_make_integral_constant_t(nrnmpi_long_allreduce_vec_impl)> nrnmpi_long_allreduce_vec
Definition: nrnmpidec.cpp:49
coreneuron::nrnmpi_write_file_impl
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:160
coreneuron
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
Definition: corenrn_parameters.cpp:12
coreneuron::nrnmpi_spike_exchange_compressed_impl
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
coreneuron::nrnmpi_dbl_allmax_impl
double nrnmpi_dbl_allmax_impl(double x)
Definition: mpispike.cpp:282
coreneuron::nrnmpi_initialized
mpi_function< cnrn_make_integral_constant_t(nrnmpi_initialized_impl)> nrnmpi_initialized
Definition: nrnmpidec.cpp:50
coreneuron::nrnmpi_check_threading_support
mpi_function< cnrn_make_integral_constant_t(nrnmpi_check_threading_support_impl)> nrnmpi_check_threading_support
Definition: nrnmpidec.cpp:19
coreneuron::nrnmpi_check_threading_support_impl
void nrnmpi_check_threading_support_impl()
Definition: nrnmpi.cpp:86
coreneuron::i
int i
Definition: cellorder.cpp:485
coreneuron::nrnmpi_dbl_allreduce_vec_impl
void nrnmpi_dbl_allreduce_vec_impl(double *src, double *dest, int cnt, int type)
Definition: mpispike.cpp:306
coreneuron::nrnmpi_local_rank
mpi_function< cnrn_make_integral_constant_t(nrnmpi_local_rank_impl)> nrnmpi_local_rank
Definition: nrnmpidec.cpp:54
cnt
#define cnt
Definition: tqueue.hpp:44
coreneuron::nrnmpi_int_alltoall_impl
void nrnmpi_int_alltoall_impl(int *s, int *r, int n)
Definition: mpispike.cpp:248
coreneuron::nrnmpi_wtime_impl
double nrnmpi_wtime_impl()
Definition: nrnmpi.cpp:106
coreneuron::nrnmpi_finalize_impl
void nrnmpi_finalize_impl(void)
Definition: nrnmpi.cpp:75
coreneuron::nrnmpi_int_alltoallv_impl
void nrnmpi_int_alltoallv_impl(const int *s, const int *scnt, const int *sdispl, int *r, int *rcnt, int *rdispl)
Definition: mpispike.cpp:252
coreneuron::mpi_function
Definition: nrnmpi.h:75
coreneuron::nrnmpi_long_allreduce_vec_impl
void nrnmpi_long_allreduce_vec_impl(long *src, long *dest, int cnt, int type)
Definition: mpispike.cpp:320
coreneuron::NRNMPI_Spikebuf
Definition: nrnmpi.h:23
coreneuron::nrnmpi_spike_exchange_impl
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
coreneuron::nrnmpi_dbl_alltoallv
mpi_function< cnrn_make_integral_constant_t(nrnmpi_dbl_alltoallv_impl)> nrnmpi_dbl_alltoallv
Definition: nrnmpidec.cpp:36
coreneuron::nrnmpi_wtime
mpi_function< cnrn_make_integral_constant_t(nrnmpi_wtime_impl)> nrnmpi_wtime
Definition: nrnmpidec.cpp:53
coreneuron::nrnmpi_dbl_allmin
mpi_function< cnrn_make_integral_constant_t(nrnmpi_dbl_allmin_impl)> nrnmpi_dbl_allmin
Definition: nrnmpidec.cpp:38
coreneuron::nrnmpi_init
mpi_function< cnrn_make_integral_constant_t(nrnmpi_init_impl)> nrnmpi_init
Definition: nrnmpidec.cpp:15
coreneuron::nrnmpi_dbl_alltoallv_impl
void nrnmpi_dbl_alltoallv_impl(double *s, int *scnt, int *sdispl, double *r, int *rcnt, int *rdispl)
Definition: mpispike.cpp:261
coreneuron::nrnmpi_dbl_allmax
mpi_function< cnrn_make_integral_constant_t(nrnmpi_dbl_allmax_impl)> nrnmpi_dbl_allmax
Definition: nrnmpidec.cpp:40
coreneuron::nrnmpi_int_allgather_impl
void nrnmpi_int_allgather_impl(int *s, int *r, int n)
Definition: mpispike.cpp:272
coreneuron::nrnmpi_dbl_allreduce_impl
double nrnmpi_dbl_allreduce_impl(double x, int type)
Definition: mpispike.cpp:292
coreneuron::nrnmpi_spike_exchange
mpi_function< cnrn_make_integral_constant_t(nrnmpi_spike_exchange_impl)> nrnmpi_spike_exchange
Definition: nrnmpidec.cpp:24
coreneuron::nrnmpi_init_ret_t::myid
int myid
Definition: nrnmpidec.h:22
coreneuron::nrnmpi_int_allmax_impl
int nrnmpi_int_allmax_impl(int x)
Definition: mpispike.cpp:242
coreneuron::nrnmpi_dbl_allreduce_vec
mpi_function< cnrn_make_integral_constant_t(nrnmpi_dbl_allreduce_vec_impl)> nrnmpi_dbl_allreduce_vec
Definition: nrnmpidec.cpp:46
coreneuron::NRNMPI_Spike
Definition: nrnmpi.h:31
coreneuron::nrnmpi_abort
mpi_function< cnrn_make_integral_constant_t(nrnmpi_abort_impl)> nrnmpi_abort
Definition: nrnmpidec.cpp:52
coreneuron::nrnmpi_int_allmax
mpi_function< cnrn_make_integral_constant_t(nrnmpi_int_allmax_impl)> nrnmpi_int_allmax
Definition: nrnmpidec.cpp:28
coreneuron::nrnmpi_initialized_impl
bool nrnmpi_initialized_impl()
Definition: nrnmpi.cpp:96
coreneuron::nrnmpi_local_size
mpi_function< cnrn_make_integral_constant_t(nrnmpi_local_size_impl)> nrnmpi_local_size
Definition: nrnmpidec.cpp:56