[cig-commits] [commit] master: Only one processor should try to create XDMF files (e203750)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Oct 30 05:20:17 PDT 2014
Repository : https://github.com/geodynamics/axisem
On branch : master
Link : https://github.com/geodynamics/axisem/compare/40eb3e9d6991802f4d62ea03e4d20b5b4cf0ed34...37960e972c4c27dbba87386daa5763c23432be63
>---------------------------------------------------------------
commit e203750829f306149f6ed2560b66c34440e00b84
Author: Simon Stähler <staehler at geophysik.uni-muenchen.de>
Date: Thu Oct 30 13:19:26 2014 +0100
Only one processor should try to create XDMF files
- The XDMF files in question are the ones for the kerner wavefield files
>---------------------------------------------------------------
e203750829f306149f6ed2560b66c34440e00b84
SOLVER/nc_routines.F90 | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/SOLVER/nc_routines.F90 b/SOLVER/nc_routines.F90
index 40283b4..150e113 100644
--- a/SOLVER/nc_routines.F90
+++ b/SOLVER/nc_routines.F90
@@ -1146,11 +1146,14 @@ subroutine nc_define_outputfile(nrec, rec_names, rec_th, rec_th_req, rec_ph, rec
call comm_elem_number(npts_sol, npts_sol_global, npts_sol_myfirst, npts_sol_mylast)
call comm_elem_number(npts_flu, npts_flu_global, npts_flu_myfirst, npts_flu_mylast)
- do ivar=1, nvar/2 ! The big snapshot variables for the kerner.
- call dump_mesh_data_xdmf(trim(nc_fnam), trim(nc_varnamelist(ivar))//'.xdmf', &
- 'Snapshots/'//trim(nc_varnamelist(ivar)), &
- npts_sol_global + npts_flu_global, nstrain)
- enddo
+ if (lpr) then ! This has to be called by just one processor. Since 0 will have to
+ ! do more stuff further below, let's assign lpr to this task
+ do ivar=1, nvar/2 ! The big snapshot variables for the kerner.
+ call dump_mesh_data_xdmf(trim(nc_fnam), trim(nc_varnamelist(ivar))//'.xdmf', &
+ 'Snapshots/'//trim(nc_varnamelist(ivar)), &
+ npts_sol_global + npts_flu_global, nstrain)
+ enddo
+ end if
end if ! dump_wavefields
@@ -1473,9 +1476,10 @@ subroutine nc_define_outputfile(nrec, rec_names, rec_th, rec_th_req, rec_ph, rec
end if
- if (verbose > 2) write(6,'(a/)') 'NetCDF variables defined'
+ if (verbose > 2) write(6,'(I6, a/)') mynum, 'NetCDF variables defined'
! Leave definition mode
call check( nf90_enddef(ncid_out))
+ if (verbose > 2) write(6,'(I6, a/)') mynum, 'NetCDF definition mode left!'
! in case of parallel IO, only the first rank writes
#ifdef enable_parallel_netcdf
More information about the CIG-COMMITS
mailing list