CommDist.h 825 Bytes
Newer Older
1
2
3
#ifndef COMMDIST_H
#define COMMDIST_H

iker_martin's avatar
iker_martin committed
4
5
6
7
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#include <string.h>
8
#include "malleabilityStates.h"
iker_martin's avatar
iker_martin committed
9

10
11
12
//#define MAL_COMM_COMPLETED 0
//#define MAL_COMM_UNINITIALIZED 2
//#define MAL_ASYNC_PENDING 1
13

14
15
16
17
//#define MAL_USE_NORMAL 0
//#define MAL_USE_IBARRIER 1
//#define MAL_USE_POINT 2
//#define MAL_USE_THREAD 3
iker_martin's avatar
iker_martin committed
18

19
int sync_communication(char *send, char **recv, int qty, int myId, int numP, int numO, int is_children_group, int comm_type, MPI_Comm comm);
iker_martin's avatar
iker_martin committed
20

21
22
int send_async(char *array, int qty, int myId, int numP, MPI_Comm intercomm, int numP_child, MPI_Request **comm_req, int parents_wait);
void recv_async(char **array, int qty, int myId, int numP, MPI_Comm intercomm, int numP_parents, int parents_wait);
23
24


iker_martin's avatar
iker_martin committed
25
void malloc_comm_array(char **array, int qty, int myId, int numP);
26
#endif