CommDist.h 774 Bytes
Newer Older
iker_martin's avatar
iker_martin committed
1
2
3
4
5
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#include <string.h>

6
#define MAL_COMM_COMPLETED 0
7
#define MAL_COMM_UNINITIALIZED 2
8
9
10
11
#define MAL_ASYNC_PENDING 1

#define MAL_USE_NORMAL 0
#define MAL_USE_IBARRIER 1
iker_martin's avatar
iker_martin committed
12
13
14
15
16

int send_sync(char *array, int qty, int myId, int numP, int root, MPI_Comm intercomm, int numP_child);
void recv_sync(char **array, int qty, int myId, int numP, int root, MPI_Comm intercomm, int numP_parents);


17
18
int send_async(char *array, int qty, int myId, int numP, int root, MPI_Comm intercomm, int numP_child, MPI_Request **comm_req, int parents_wait);
void recv_async(char **array, int qty, int myId, int numP, int root, MPI_Comm intercomm, int numP_parents, int parents_wait);
19
20


iker_martin's avatar
iker_martin committed
21
void malloc_comm_array(char **array, int qty, int myId, int numP);