NEURON
ockludge.cpp
Go to the documentation of this file.
1 #include <../../nrnconf.h>
2 #include <stdlib.h>
3 #include <nrnmpi.h>
4 
5 #if NRNMPI && DARWIN && !defined(NRNMPI_DYNAMICLOAD)
6 // For DARWIN I do not really know the proper way to avoid
7 // dyld: lazy symbol binding failed: Symbol not found: _MPI_Init
8 // when the MPI functions are all used in the libnrnmpi.dylib
9 // but the libmpi.a is statically linked. Therefore I am forcing
10 // the linking here by listing all the MPI functions being used.
11 #include <mpi.h>
12 void work_around() {
13  MPI_Comm c = MPI_COMM_WORLD;
14 
15  MPI_Abort(c, 0);
16  MPI_Get_address(0, 0);
17  MPI_Allgather(0, 0, 0, 0, 0, 0, c);
18  MPI_Allgatherv(0, 0, 0, 0, 0, 0, 0, c);
19  MPI_Allreduce(0, 0, 0, 0, 0, c);
20  MPI_Barrier(c);
21  MPI_Bcast(0, 0, 0, 0, c);
22  MPI_Comm_dup(c, 0);
23  MPI_Comm_rank(c, 0);
24  MPI_Comm_size(c, 0);
25  MPI_Finalize();
26  MPI_Gather(0, 0, 0, 0, 0, 0, 0, c);
27  MPI_Gatherv(0, 0, 0, 0, 0, 0, 0, 0, c);
28  MPI_Get_count(0, 0, 0);
29  MPI_Init(0, 0);
30  MPI_Initialized(0);
31  MPI_Iprobe(0, 0, c, 0, 0);
32  MPI_Irecv(0, 0, 0, 0, 0, c, 0);
33  MPI_Isend(0, 0, 0, 0, 0, c, 0);
34  MPI_Op_create(0, 0, 0);
35  MPI_Pack(0, 0, 0, 0, 0, 0, c);
36  MPI_Pack_size(0, 0, c, 0);
37  MPI_Probe(0, 0, c, 0);
38  MPI_Recv(0, 0, 0, 0, 0, c, 0);
39  MPI_Request_free(0);
40  MPI_Send(0, 0, 0, 0, 0, c);
41  MPI_Sendrecv(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, c, 0);
42  MPI_Type_commit(0);
43  MPI_Type_create_struct(0, 0, 0, 0, 0);
44  MPI_Unpack(0, 0, 0, 0, 0, 0, c);
45  MPI_Wait(0, 0);
46  MPI_Wtime();
47 }
48 #endif
static int c
Definition: hoc.cpp:169
#define MPI_Comm