We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a89bef5 commit 8ba4f60Copy full SHA for 8ba4f60
src/basic.c
@@ -1,26 +1,24 @@
1
#include <stdio.h>
2
+#include <stdlib.h>
3
+
4
#include <mpi.h>
5
6
int main(int argc, char **argv)
7
{
- int ierr;
-
8
printf("going to init MPI\n");
9
10
- ierr = MPI_Init(&argc,&argv);
11
- if(ierr != 0) {
+ if(MPI_Init(&argc,&argv)) {
12
perror("could not init MPI\n");
13
- return 1;
+ return EXIT_FAILURE;
14
}
15
printf("MPI Init OK\n");
16
17
- ierr = MPI_Finalize();
18
+ if(MPI_Finalize()) {
19
perror("could not close MPI\n");
20
21
22
23
printf("MPI closed\n");
24
25
- return 0;
+ return EXIT_SUCCESS;
26
0 commit comments