X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/45c3f1cfee86fb48c96d53f8267f99b6db6e3d7a..83c44c7a79a9f0ed5b64b0d48d5a914135c548f6:/examples/smpi/energy/f77/sef.f diff --git a/examples/smpi/energy/f77/sef.f b/examples/smpi/energy/f77/sef.f index 51a6ea277a..1c00d59bd7 100644 --- 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) + if (ierr .ne. MPI_SUCCESS) then + print *, 'MPI_Init failed:', ierr + stop 1 + endif 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() @@ -28,7 +37,7 @@ end do do i = 0, pstates - 1 - call smpi_set_host_power_peak_at(i) + call smpi_set_host_pstate(i) t = MPI_Wtime() p = smpi_get_host_current_power_peak() print *, '[', t, '] [rank ', rank, '] Current pstate: ', i, @@ -44,5 +53,10 @@ 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