[cig-commits] [commit] master: More robustness of field_transform.F90 (cfd0fcc)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Sep 19 01:48:21 PDT 2014
Repository : https://github.com/geodynamics/axisem
On branch : master
Link : https://github.com/geodynamics/axisem/compare/bf3258866c83310e4c4b56c210dbe2ee78ad09a5...cfd0fcc28b053f40dd1aaf39b09d671b25c2d596
>---------------------------------------------------------------
commit cfd0fcc28b053f40dd1aaf39b09d671b25c2d596
Author: Simon Stähler <staehler at geophysik.uni-muenchen.de>
Date: Thu Sep 18 15:14:42 2014 +0200
More robustness of field_transform.F90
- If progress attributes have not even been written, it continues anyway
>---------------------------------------------------------------
cfd0fcc28b053f40dd1aaf39b09d671b25c2d596
SOLVER/UTILS/field_transform.F90 | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/SOLVER/UTILS/field_transform.F90 b/SOLVER/UTILS/field_transform.F90
index 8063e2d..f845ddc 100644
--- a/SOLVER/UTILS/field_transform.F90
+++ b/SOLVER/UTILS/field_transform.F90
@@ -63,7 +63,7 @@ program field_transformation
integer, dimension(9) :: ncin_field_varid
integer, dimension(9) :: ncout_field_varid
- integer :: isfinalized, percent
+ integer :: isfinalized, status, percent
integer :: nstep, nvars_mesh
integer :: attnum, nf_att_stat
character(len=80) :: attname, varname
@@ -111,13 +111,14 @@ program field_transformation
call check( nf90_open(path="./Data/axisem_output.nc4", &
mode=NF90_NOWRITE, ncid=ncin_id) )
- call check( nf90_get_att(ncin_id, NF90_GLOBAL, 'finalized', isfinalized) )
+ status = nf90_get_att(ncin_id, NF90_GLOBAL, 'finalized', isfinalized)
- do while (isfinalized.ne.1)
- call check( nf90_get_att(ncin_id, NF90_GLOBAL, 'percent completed', percent) )
- print "('Solver run not yet finished (at ', I3, '%). Waiting for 60s')", percent
+ do while (isfinalized.ne.1 .or. status.ne.NF90_NOERR)
+ percent = 0
+ status = nf90_get_att(ncin_id, NF90_GLOBAL, 'percent completed', percent)
+ print "('Solver run not yet finished (at ', I3, '%). Waiting for 10s')", percent
call check( nf90_close(ncin_id))
- call sleep(60)
+ call sleep(10)
call check( nf90_open(path="./Data/axisem_output.nc4", &
mode=NF90_NOWRITE, ncid=ncin_id) )
More information about the CIG-COMMITS
mailing list