18 if (stat_rdim.eq.1)
then
38 logical ifpo_tmp, ifto_tmp, ifxyo_tmp
48 call outpost(stat_ruavg(1,1,1),stat_ruavg(1,1,2),
49 $ stat_ruavg(1,1,3),pr,stat_ruavg(1,1,4),
's01')
52 call outpost(stat_ruavg(1,1,5),stat_ruavg(1,1,6),
53 $ stat_ruavg(1,1,7),pr,stat_ruavg(1,1,8),
's02')
56 call outpost(stat_ruavg(1,1,9),stat_ruavg(1,1,10),
57 $ stat_ruavg(1,1,11),pr,stat_ruavg(1,1,12),
's03')
60 call outpost(stat_ruavg(1,1,13),stat_ruavg(1,1,14),
61 $ stat_ruavg(1,1,15),pr,stat_ruavg(1,1,16),
's04')
64 call outpost(stat_ruavg(1,1,17),stat_ruavg(1,1,18),
65 $ stat_ruavg(1,1,19),pr,stat_ruavg(1,1,20),
's05')
68 call outpost(stat_ruavg(1,1,21),stat_ruavg(1,1,22),
69 $ stat_ruavg(1,1,23),pr,stat_ruavg(1,1,24),
's06')
72 call outpost(stat_ruavg(1,1,25),stat_ruavg(1,1,26),
73 $ stat_ruavg(1,1,27),pr,stat_ruavg(1,1,28),
's07')
76 call outpost(stat_ruavg(1,1,29),stat_ruavg(1,1,30),
77 $ stat_ruavg(1,1,31),pr,stat_ruavg(1,1,32),
's08')
80 call outpost(stat_ruavg(1,1,33),stat_ruavg(1,1,34),
81 $ stat_ruavg(1,1,35),pr,stat_ruavg(1,1,36),
's09')
84 call outpost(stat_ruavg(1,1,37),stat_ruavg(1,1,38),
85 $ stat_ruavg(1,1,39),pr,stat_ruavg(1,1,40),
's10')
88 call outpost(stat_ruavg(1,1,41),stat_ruavg(1,1,42),
89 $ stat_ruavg(1,1,43),pr,stat_ruavg(1,1,44),
's11')
115 real ur1(lx1,lz1,2*LELT)
133 integer*8 offs0, offs
134 integer*8 stride,strideB
142 integer igl_running_sum
143 real dnekclock_sync, glsum
146 tiostart=dnekclock_sync()
152 if(abs(param(65)).eq.1 .and. abs(param(66)).eq.6) ifmpiio=.true.
164 if(param(65).lt.0) ifdiro = .true.
165 nfileo = abs(param(65))
166 if(nfileo.eq.0) nfileo = 1
167 if(np.lt.nfileo) nfileo=np
168 nproc_o = np / nfileo
171 pid1 = min(np-1,pid0+nproc_o-1)
192 nel2db = igl_running_sum(itmp)
193 nel2db = nel2db - map2d_lown
213 $
'Error opening file in stat_mfo_outfld2D.')
219 offs0 = iheadersize + 4 + isize*int(map2d_gnum,8)
223 strideb = int(nelb,8)*nxyzo*wdsizo
224 stride = int(map2d_gnum,8)*nxyzo*wdsizo
233 if(map2d_own(il).eq.nid)
then
234 call copy(ur1(1,1,2*kl+1),map2d_xm1(1,1,il),nxyzo)
235 call copy(ur1(1,1,2*kl+2),map2d_ym1(1,1,il),nxyzo)
242 if (kl.ne.map2d_lown) ierr=1
247 offs = offs0 + stride*ioflds + 2*strideb
257 if(map2d_own(il).eq.nid)
then
259 call copy(ur1(1,1,kl),stat_ruavg(1,il,jl),nxyzo)
265 if (kl.ne.map2d_lown) ierr=1
269 offs = offs0 + stride*ioflds + strideb
279 dnbyte = 1.*ioflds*map2d_lown*wdsizo*nxyzo
282 if (nid.eq.pid0)
then
290 $
'Error closing file in stat_mfo_outfld2D.')
292 tio = dnekclock_sync()-tiostart
295 dnbyte = glsum(dnbyte,1)
296 dnbyte = dnbyte + iheadersize + 4 + isize*map2d_gnum
297 dnbyte = dnbyte/1024/1024
298 if(nio.eq.0)
write(6,7) istep,time,dnbyte,dnbyte/tio,
300 7
format(/,i9,1pe12.4,
' done :: Write checkpoint',/,
301 & 30x,
'file size = ',3pg12.2,
'MB',/,
302 & 30x,
'avg data-throughput = ',0pf7.1,
'MB/s',/,
303 & 30x,
'io-nodes = ',i5,/)
331 integer lglist(0:LELT)
332 common /ctmp0/ lglist
344 integer ibsw_out, len
346 logical if_press_mesh
359 call csend(mtype,idum,isize,jl,0)
360 call crecv(mtype,inelp,isize)
365 call crecv(mtype,idum,isize)
366 call csend(mtype,map2d_lown,isize,pid0,0)
376 call blank(rdcode1,10)
382 write(rdcode1(3),
'(i1)') stat_nvar/10
383 write(rdcode1(4),
'(i1)') stat_nvar-(stat_nvar/10)*10
386 if_press_mesh = .false.
388 write(hdr,1) wdsizo,nxo,nyo,nzo,nelo,map2d_gnum,time,istep,
389 $ fid0, nfileoo, (rdcode1(il),il=1,10),p0th,if_press_mesh
390 1
format(
'#std',1x,i1,1x,i2,1x,i2,1x,i2,1x,i10,1x,i10,1x,
391 $ e20.13,1x,i9,1x,i6,1x,i6,1x,10a,1pe15.7,1x,l1)
394 test_pattern = 6.54321
408 $
'Error writing header in stat_mfo_write_hdr2D.')
412 lglist(0) = map2d_lown
415 if(map2d_own(il).eq.nid)
then
417 lglist(kl) = map2d_gmap(il)
422 if (kl.ne.map2d_lown) ierr=1
428 ioff = iheadersize + 4 + int(nelb,8)*isize
437 call csend(mtype,idum,isize,jl,0)
439 call crecv(mtype,lglist,len)
443 $ (lglist(1),lglist(0),-1,ifh_mbyte,ierr)
451 call crecv(mtype,idum,isize)
453 len = isize*(map2d_lown+1)
454 call csend(mtype,lglist,len,pid0,0)
458 $
'Error writing global nums in stat_mfo_write_hdr2D')
503 integer lglist(0:LELT), itmp(LELT)
506 real zgml(nxl), wgtl(nxl)
507 real iresl(nxl,lx1), itresl(lx1,nxl)
508 real rtmp1(nxl,lx1), rtmp2(nxl,nxl)
509 real rglist(2,0:LELT)
519 integer ibsw_out, len
530 $
'Error opening file in stat_mfo_AMRd2D.')
542 call csend(mtype,idum,isize,jl,0)
543 call crecv(mtype,inelp,isize)
548 call crecv(mtype,idum,isize)
549 call csend(mtype,map2d_lown,isize,pid0,0)
558 call blank(rdcode1,10)
560 write(hdr,1) wdsizo,nelo,map2d_gnum,time,istep,
562 1
format(
'#amr',1x,i2,1x,i10,1x,i10,1x,
563 $ e20.13,1x,i9,1x,i6,1x,i6)
566 test_pattern = 6.54321
579 $
'Error writing header in stat_mfo_crd2D.')
583 lglist(0) = map2d_lown
586 if(map2d_own(il).eq.nid)
then
588 lglist(kl) = map2d_gmap(il)
593 if (kl.ne.map2d_lown) ierr=1
598 noutl = lglist(0)*isize/4
600 ioff = iheadersize + 4 + int(nelb,8)*isize
609 call csend(mtype,idum,isize,jl,0)
611 call crecv(mtype,lglist,len)
613 noutl = lglist(0)*isize/4
623 call crecv(mtype,idum,isize)
625 len = isize*(map2d_lown+1)
626 call csend(mtype,lglist,len,pid0,0)
630 $
'Error writing global nums in stat_mfo_crd2D')
635 itmp(map2d_lmap(il)) = amr_level(il)
643 lglist(0) = map2d_lown
646 if(map2d_own(il).eq.nid)
then
648 lglist(kl) = itmp(il)
653 noutl = lglist(0)*isize/4
655 ioff = iheadersize + 4 + (int(map2d_gnum,8) + int(nelb,8))
665 call csend(mtype,idum,isize,jl,0)
667 call crecv(mtype,lglist,len)
669 noutl = lglist(0)*isize/4
679 call crecv(mtype,idum,isize)
681 len = isize*(map2d_lown+1)
682 call csend(mtype,lglist,len,pid0,0)
686 $
'Error writing refinement level in stat_mfo_crd2D')
690 call zwgll(zgml,wgtl,nxl)
691 call igllm(iresl,itresl,zgm1,zgml,lx1,nxl,lx1,nxl)
694 rglist(1,0) = real(map2d_lown)
697 if(map2d_own(il).eq.nid)
then
699 call mxm(iresl,nxl,map2d_xm1(1,1,il),lx1,rtmp1,lx1)
700 call mxm (rtmp1,nxl,itresl,lx1,rtmp2,nxl)
701 rglist(1,kl) = rtmp2(2,2)
702 call mxm(iresl,nxl,map2d_ym1(1,1,il),lx1,rtmp1,lx1)
703 call mxm (rtmp1,nxl,itresl,lx1,rtmp2,nxl)
704 rglist(2,kl) = rtmp2(2,2)
710 noutl = 2*int(rglist(1,0))*wdsizo/4
712 ioff = iheadersize + 4 + int(map2d_gnum,8)*2*isize
713 $ + int(nelb,8)*2*wdsizo
722 call csend(mtype,idum,isize,jl,0)
723 len = 2*wdsize*(lelt+1)
724 call crecv(mtype,rglist,len)
726 noutl = 2*int(rglist(1,0))*wdsizo/4
729 $ (rglist(1,1),noutl,-1,ifh_mbyte,ierr)
737 call crecv(mtype,idum,isize)
739 len = 2*wdsize*(map2d_lown+1)
740 call csend(mtype,rglist,len,pid0,0)
744 $
'Error writing element centres in stat_mfo_crd2D')
747 if (nid.eq.pid0)
then
755 $
'Error closing file in stat_mfo_crd2D.')
subroutine byte_write_mpi(buf, icount, iorank, mpi_fh, ierr)
subroutine byte_close_mpi(mpi_fh, ierr)
subroutine byte_set_view(ioff_in, mpi_fh)
subroutine crecv(mtype, buf, lenm)
subroutine csend(mtype, buf, len, jnid, jpid)
subroutine mntr_check_abort(mid, ierr, logs)
Abort simulation.
subroutine stat_mfo_write_stat2d
Write additional data at the end of the file.
subroutine stat_mfo_write_hdr2d
Write hdr, byte key, global ordering of 2D data.
subroutine stat_mfo()
Main interface for saving statistics.
subroutine stat_mfo_outfld3d()
Statistics muti-file output of 3D data.
subroutine stat_mfo_crd2d
Write element centres to the file (in case of AMR level as well)
subroutine stat_mfo_outfld2d()
Statistics muti-file output of 2D data.
subroutine mxm(a, n1, b, n2, c, n3)
subroutine mfo_open_files(prefix, ierr)
subroutine mfo_outs(u, nel, mx, my, mz)
subroutine outpost(v1, v2, v3, vp, vt, name3)
subroutine zwgll(Z, W, NP)
subroutine igllm(I12, IT12, Z1, Z2, lz1, lz2, ND1, ND2)