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