Skip to content

Commit 8ba4f60

Browse files
committed
stdlib
1 parent a89bef5 commit 8ba4f60

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/basic.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
#include <stdio.h>
2+
#include <stdlib.h>
3+
24
#include <mpi.h>
35

46
int main(int argc, char **argv)
57
{
6-
int ierr;
7-
88
printf("going to init MPI\n");
99

10-
ierr = MPI_Init(&argc,&argv);
11-
if(ierr != 0) {
10+
if(MPI_Init(&argc,&argv)) {
1211
perror("could not init MPI\n");
13-
return 1;
12+
return EXIT_FAILURE;
1413
}
1514
printf("MPI Init OK\n");
1615

17-
ierr = MPI_Finalize();
18-
if(ierr != 0) {
16+
if(MPI_Finalize()) {
1917
perror("could not close MPI\n");
20-
return 1;
18+
return EXIT_FAILURE;
2119
}
2220

2321
printf("MPI closed\n");
2422

25-
return 0;
23+
return EXIT_SUCCESS;
2624
}

0 commit comments

Comments
 (0)