1 | #ifndef __MPI_INTERFACE__ |
---|
2 | #define __MPI_INTERFACE |
---|
3 | |
---|
4 | #ifdef __cplusplus |
---|
5 | extern"C" |
---|
6 | { |
---|
7 | #endif //__cplusplus |
---|
8 | |
---|
9 | /// Groupe /// |
---|
10 | extern int mpi_comm_world; |
---|
11 | extern int mpi_success; |
---|
12 | extern int mpi_char; |
---|
13 | extern int mpi_status_size; |
---|
14 | extern int mpi_any_tag; |
---|
15 | |
---|
16 | |
---|
17 | /// Initialisation / Finalisation /// |
---|
18 | void mpi_init(int * err); |
---|
19 | void mpi_finalize(int * err); |
---|
20 | |
---|
21 | /// Quitter brutalement MPI /// |
---|
22 | void mpi_abort(int * comm, int * errcode, int * err); |
---|
23 | |
---|
24 | /// Savoir si un processus à fait un MPI_INIT /// |
---|
25 | void mpi_initialized(bool * flag, int * err); |
---|
26 | |
---|
27 | /// Récupérer la chaine de caractÚres associée au code d'erreur err(non fonctionnelle) /// |
---|
28 | void mpi_error_string(int * errcode, char chaine[], int * taille_chaine, int * err); |
---|
29 | |
---|
30 | /// Envoyer un message à un processus /// |
---|
31 | void mpi_send(char buf[], int * count, int * datatype, int * dest, int * tag, int * comm, int * err); |
---|
32 | |
---|
33 | /// Recevoir un message d'un processus /// |
---|
34 | void mpi_recv(char buf[], int * count, int * datatype, int * source, int * tag, int * comm, int status[], int * err); |
---|
35 | |
---|
36 | /// Envoyer et recevoir un message /// |
---|
37 | void mpi_sendrecv(char sendbuf[], int * sendcount, int * sendtype, int * dest, int * sendtag, int recvbuf[], int * recvcount, |
---|
38 | int * recvtype, char source[], int * recvtag, int * comm, int status[], int * err) ; |
---|
39 | |
---|
40 | /// Compter le nombre d'éléments reçus /// |
---|
41 | void mpi_get_count(int status[], int * datatype, int * count, int * err); |
---|
42 | |
---|
43 | /// Tester l'arrivée d'un message /// |
---|
44 | void mpi_iprobe(int * source, int * tag, int * comm, bool * flag, int status[], int * err); |
---|
45 | |
---|
46 | /// Nombre de processus dans un intracommunicateur /// |
---|
47 | void mpi_comm_size(int * comm, int * nbre, int * err); |
---|
48 | |
---|
49 | /// Rang d'un processus dans un intracommunicateur /// |
---|
50 | void mpi_comm_rank(int * comm, int * rang, int * err); |
---|
51 | |
---|
52 | /// Partage d'un communicateur /// |
---|
53 | void mpi_comm_split(int * comm, int * couleur, int * cle, int * newcomm, int * err); |
---|
54 | |
---|
55 | /// Commencer à envoyer un message /// |
---|
56 | void mpi_issend(char * buf, int * count, int * datatype, int * dest, |
---|
57 | int * tag, int * comm, int * request, int * err); |
---|
58 | |
---|
59 | /// Commencer à recevoir un message /// |
---|
60 | void mpi_irecv(char buf[], int * count, int * datatype, int * source, |
---|
61 | int * tag, int * comm, int * request, int * err); |
---|
62 | |
---|
63 | /// Compléter une opération non bloquante /// |
---|
64 | void mpi_wait(int * request, int status[], int * err); |
---|
65 | |
---|
66 | /// Tester une opération non bloquante /// |
---|
67 | void mpi_test(int * request, bool * flag, int status[], int * err); |
---|
68 | |
---|
69 | /// Création d'un communicateur à partir d'un groupe /// |
---|
70 | void mpi_comm_create(int * comm, int * group, int * newcomm, int * err); |
---|
71 | |
---|
72 | /// Obtention d'un groupe à partir d'un communicateur /// |
---|
73 | void mpi_comm_group(int * comm, int * group, int * err); |
---|
74 | |
---|
75 | /// Création de sous-groupe /// |
---|
76 | void mpi_group_incl(int * group, int * n, const int rank[], int * newgroup, int * err); |
---|
77 | |
---|
78 | /// BarriÚre /// |
---|
79 | void mpi_barrier(int * comm, int * err); |
---|
80 | |
---|
81 | #ifdef __cplusplus |
---|
82 | } |
---|
83 | #endif //__cplusplus |
---|
84 | |
---|
85 | #endif //__MPI_INTERFACE__ |
---|