A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add proper error checking.
[simgrid.git]
/
examples
/
smpi
/
energy
/
f77
/
sef.f
diff --git
a/examples/smpi/energy/f77/sef.f
b/examples/smpi/energy/f77/sef.f
index
51a6ea2
..
a4c4644
100644
(file)
--- a/
examples/smpi/energy/f77/sef.f
+++ b/
examples/smpi/energy/f77/sef.f
@@
-13,7
+13,16
@@
double precision p, t, e
call MPI_Init(ierr)
double precision p, t, e
call MPI_Init(ierr)
+ if (ierr .ne. MPI_SUCCESS) then
+ print *, 'MPI_Init failed:', ierr
+ stop 1
+ endif
call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)
call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierr)
+ if (ierr .ne. MPI_SUCCESS) then
+ print *, 'MPI_Comm_rank failed:', ierr
+ call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+ stop 1
+ endif
pstates = smpi_get_host_nb_pstates()
pstates = smpi_get_host_nb_pstates()
@@
-44,5
+53,10
@@
end do
call MPI_Finalize(ierr)
end do
call MPI_Finalize(ierr)
+ if (ierr .ne. MPI_SUCCESS) then
+ print *, 'MPI_Finalize failed:', ierr
+ call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
+ stop 1
+ endif
end program main
end program main