20 if (idoarp.eq.-2)
then
22 $
'Writing checkpoint; ido = ',idoarp)
49 $
'Reading checkpoint.')
80 integer lwdsizo, lfid0, ierr
81 logical lifreguo, lifmpiio
104 write(str,
'(i5.5)') mod(arna_fnum,2) + 1
105 fname = trim(fname)//trim(str)
118 $
'arna_write_par: Error writing par file.')
142 parameter(ahdsize=16)
144 integer il, itmp(33), ierr
148 real*4 rtmp4(6), workla4(2*wldima)
149 real*8 rtmp8(3), workla8(wldima)
150 equivalence(rtmp4,rtmp8)
151 equivalence(workla4,workla8)
154 call blank(hdr,ahdsize)
156 write(hdr,1) idoarp,bmatarp,whicharp,tstpr_mode
157 1
format(
'#arp',1x,i2,1x,a1,1x,a2,1x,i1)
162 test_pattern = 6.54321
176 itmp(8+il) = iparp(il)
179 itmp(19+il) = ipntarp(il)
192 call copy(workla8,workla,nwlarp)
220 integer lwdsizo, lfid0, ierr, il
221 logical lifreguo, lifmpiio
244 write(str,
'(i5.5)') arna_fnum
245 fname = trim(fname)//trim(str)
259 $
'arna_read_par: Error opening par file.')
265 if (idoarp0.ne.-2)
then
267 $
'arna_read_par, wrong idoarp0')
268 call mntr_logi(arna_id,lp_err,
'idoarp0 = ', idoarp0)
273 if (bmatarp0.ne.bmatarp)
then
275 $
'arna_read_par, different ARPACK modes')
276 call mntr_logi(arna_id,lp_err,
'bmatarp0 = ', bmatarp0)
277 call mntr_logi(arna_id,lp_err,
'bmatarp = ', bmatarp)
282 if (whicharp0.ne.whicharp)
then
284 $
'arna_read_par, different mode selsction')
285 call mntr_logi(arna_id,lp_err,
'whicharp0 = ', whicharp0)
286 call mntr_logi(arna_id,lp_err,
'whicharp = ', whicharp)
291 if (tstpr_mode0.ne.tstpr_mode)
then
293 $
'arna_read_par, wrong simulation mode')
294 call mntr_logi(arna_id,lp_err,
'tstpr_mode0 = ',tstpr_mode0)
295 call mntr_logi(arna_id,lp_err,
'tstpr_mode = ',tstpr_mode)
301 if (arna_ns0.ne.arna_ns)
then
303 $
'arna_read_par, different vector length (IFHEAT?)')
304 call mntr_logi(arna_id,lp_err,
'arna_ns0 = ', arna_ns0)
305 call mntr_logi(arna_id,lp_err,
'arna_ns = ', arna_ns)
312 if (arna_nkrl0.ne.arna_nkrl)
then
314 $
'arna_read_par, different Krylov space size')
315 call mntr_logi(arna_id,lp_err,
'arna_nkrl0 = ', arna_nkrl0)
316 call mntr_logi(arna_id,lp_err,
'arna_nkrl = ', arna_nkrl)
320 if (nwlarp0.ne.nwlarp)
then
322 $
'arna_read_par, different size of work array')
323 call mntr_logi(arna_id,lp_err,
'nwlarp0 = ', nwlarp0)
324 call mntr_logi(arna_id,lp_err,
'nwlarp = ', nwlarp)
329 if (tstpr_tol0.ne.tstpr_tol)
then
331 $
'arna_read_par, different stopping criterion')
332 call mntr_logi(arna_id,lp_err,
'tstpr_tol0 = ', tstpr_tol0)
333 call mntr_logi(arna_id,lp_err,
'tstpr_tol = ', tstpr_tol)
337 if (arna_negv0.ne.arna_negv)
then
339 $
'arna_read_par, different number of eigenvalues')
340 call mntr_logi(arna_id,lp_err,
'arna_negv0 = ', arna_negv0)
341 call mntr_logi(arna_id,lp_err,
'arna_negv = ', arna_negv)
345 if (dtarp0.ne.dt)
then
347 $
'arna_read_par, different time step')
348 call mntr_logi(arna_id,lp_err,
'dtarp0 = ', dtarp0)
349 call mntr_logi(arna_id,lp_err,
'dt = ', dt)
352 if (tstpr_step0.ne.tstpr_step)
then
354 $
'arna_read_par, different number of steps instepper phase')
355 call mntr_logi(arna_id,lp_err,
'tstpr_step0 = ',tstpr_step0)
356 call mntr_logi(arna_id,lp_err,
'tstpr_step = ',tstpr_step)
360 if (iparp0(1).ne.iparp(1))
then
362 $
'arna_read_par, different shift in ARPACK')
363 call mntr_logi(arna_id,lp_err,
'iparp0(1) = ', iparp0(1))
364 call mntr_logi(arna_id,lp_err,
'iparp(1) = ', iparp(1))
368 if (iparp0(3).ne.iparp(3))
then
370 $
'arna_read_par, different cycle number')
371 call mntr_logi(arna_id,lp_err,
'iparp0(3) = ', iparp0(3))
372 call mntr_logi(arna_id,lp_err,
'iparp(3) = ', iparp(3))
375 if (iparp0(7).ne.iparp(7))
then
377 $
'arna_read_par, different ARPACK modes')
378 call mntr_logi(arna_id,lp_err,
'iparp0(7) = ', iparp0(7))
379 call mntr_logi(arna_id,lp_err,
'iparp(7) = ', iparp(7))
389 iparp(il) = iparp0(il)
393 ipntarp(il) = ipntarp0(il)
398 $
'arna_read_par: Error reading par file.')
402 call bcast(nparp,isize)
403 call bcast(ncarp,isize)
404 call bcast(infarp,isize)
405 call bcast(iparp,11*isize)
406 call bcast(ipntarp,14*isize)
407 call bcast(rnmarp,wdsize)
409 call bcast(workla,nwlarp*wdsize)
436 parameter(ahdsize=16)
438 integer ibsw_out, il, itmp(33), ierr
442 real*4 rtmp4(6), workla4(2*wldima)
443 real*8 rtmp8(3), workla8(wldima)
444 equivalence(rtmp4,rtmp8)
445 equivalence(workla4,workla8)
447 logical if_byte_swap_test, if_byte_sw_loc
453 call blank(hdr,ahdsize)
457 if (indx2(hdr,132,
'#arp',4).eq.1)
then
458 read(hdr,*) dummy,idoarp0,bmatarp0,whicharp0,tstpr_mode0
461 $
'arna_mfip; Error reading header')
467 if_byte_sw_loc = if_byte_swap_test(test_pattern,ierr)
480 tstpr_step0 = itmp(8)
482 iparp0(il) = itmp(8+il)
485 ipntarp0(il) = itmp(19+il)
492 tstpr_tol0 = rtmp8(1)
497 if (nwlarp0.le.wldima)
then
499 if (if_byte_sw)
call byte_reverse(workla4,2*nwlarp0,ierr)
500 call copy(workla,workla8,nwlarp0)
503 $ .le.
'arna_mfip; Wrong work array size nwlarp0wldima')
529 integer*8 offs0,offs,nbyte,stride,strideB,nxyzo8
530 integer lwdsizo, il, ierr
532 real dnbyte, tio, tiostart
535 logical lifxyo, lifpo, lifvo, lifto, lifreguo, lifpso(LDIMT1)
538 real dnekclock_sync, glsum
541 real UR1(LXO*LXO*LXO*LELT), UR2(LXO*LXO*LXO*LELT),
542 $ UR3(LXO*LXO*LXO*LELT)
543 common /scruz/ ur1, ur2, ur3
545 tiostart=dnekclock_sync()
569 lifpso(il)= ifpso(il)
575 if (nid.eq.pid0)
then
579 write(str,
'(i5.5)') mod(arna_fnum,2) + 1
580 fname = trim(fname)//trim(str)
591 offs0 = iheadersize + 4 + isize*nelgt
593 strideb = nelb * nxyzo8*wdsizo
594 stride = nelgt* nxyzo8*wdsizo
601 call arna_mfosv(ioflds,nout,offs0,stride,strideb,
602 $ ur1,ur2,ur3,resida)
606 call arna_mfosv(ioflds,nout,offs0,stride,strideb,
607 $ ur1,ur2,ur3,workda(1+arna_ns*il))
612 call arna_mfosv(ioflds,nout,offs0,stride,strideb,
613 $ ur1,ur2,ur3,vbasea(1,il))
616 dnbyte = 1.*ioflds*nout*wdsizo*nxo*nyo*nzo
627 ifpso(il) = lifpso(il)
634 tio = dnekclock_sync()-tiostart
637 dnbyte = glsum(dnbyte,1)
638 dnbyte = dnbyte + iheadersize + 4. + isize*nelgt
639 dnbyte = dnbyte/1024/1024
641 call mntr_log(arna_id,lp_prd,
'Checkpoint written:')
642 call mntr_logr(arna_id,lp_vrb,
'file size (MB) = ',dnbyte)
643 call mntr_logr(arna_id,lp_vrb,
'avg data-throughput (MB/s) = ',
645 call mntr_logi(arna_id,lp_vrb,
'io-nodes = ',nfileo)
674 integer e, il, iofldsr, ierr
675 integer*8 offs0,offs,nbyte,stride,strideB,nxyzr8
676 real dnbyte, tio, tiostart
679 real dnekclock_sync, glsum
683 parameter(lwk = 7*lx1*ly1*lz1*lelt)
687 real UR1(LX1,LY1,LZ1,LELT), UR2(LX1,LY1,LZ1,LELT),
688 $ UR3 (LX1,LY1,LZ1,LELT)
689 COMMON /scruz/ ur1, ur2, ur3
691 tiostart=dnekclock_sync()
696 if (nid.eq.pid0r)
then
699 write(str,
'(i5.5)') arna_fnum
700 fname = trim(fname)//trim(str)
709 offs0 = iheadersize + 4 + isize*nelgr
711 strideb = nelbr* nxyzr8*wdsizr
712 stride = nelgr* nxyzr8*wdsizr
719 $ ur1,ur2,ur3,resida(1))
724 $ ur1,ur2,ur3,workda(1+arna_ns*il))
730 $ ur1,ur2,ur3,vbasea(1,il))
738 tio = dnekclock_sync()-tiostart
741 if(nid.eq.pid0r)
then
742 dnbyte = 1.*iofldsr*nelr*wdsizr*nxr*nyr*nzr
747 dnbyte = glsum(dnbyte,1)
748 dnbyte = dnbyte + iheadersize + 4. + isize*nelgt
749 dnbyte = dnbyte/1024/1024
751 call mntr_log(arna_id,lp_prd,
'Checkpoint read:')
752 call mntr_logr(arna_id,lp_vrb,
'avg data-throughput (MB/s) = ',
754 call mntr_logi(arna_id,lp_vrb,
'io-nodes = ',nfileo)
780 integer*8 offs0,stride,strideB
781 real UR1(LXO*LXO*LXO*LELT), UR2(LXO*LXO*LXO*LELT),
782 $ ur3(lxo*lxo*lxo*lelt)
788 offs = offs0 + ioflds*stride + ndim*strideb
791 call copy(ur1,vect(1),tstpr_nv)
792 call copy(ur2,vect(1+tstpr_nv),tstpr_nv)
793 if (if3d)
call copy(ur3,vect(1+2*tstpr_nv),tstpr_nv)
795 call mfo_outv(ur1,ur2,ur3,nout,nxo,nyo,nzo)
796 ioflds = ioflds + ndim
799 offs = offs0 + ioflds*stride + strideb
801 call copy(ur1,vect(1+ndim*tstpr_nv),tstpr_nt)
831 integer*8 offs0,stride,strideB
832 real UR1(LX1*LX1*LX1*LELT), UR2(LX1*LX1*LX1*LELT),
833 $ ur3(lx1*lx1*lx1*lelt)
837 parameter (lwk = 7*lx1*ly1*lz1*lelt)
844 offs = offs0 + iofldr*stride + ndim*strideb
846 call mfi_getv(ur1,ur2,ur3,wk,lwk,.false.)
848 call copy(vect(1),ur1,tstpr_nv)
849 call copy(vect(1+tstpr_nv),ur2,tstpr_nv)
850 if (if3d)
call copy(vect(1+2*tstpr_nv),ur3,tstpr_nv)
851 iofldr = iofldr + ndim
854 offs = offs0 + iofldr*stride + strideb
858 call copy(vect(1+ndim*tstpr_nv),ur1,tstpr_nt)
subroutine byte_set_view(ioff_in, mpi_fh)
subroutine bcast(buf, len)
subroutine arna_mfip
Read procesor independent variables.
subroutine arna_mfov(prefix)
Write procesor dependent data (long vectors)
subroutine arna_write_par(prefix)
Write procesor independent data.
subroutine arna_mfiv(prefix)
Read procesor dependent data (long vectors)
subroutine arna_mfisv(iofldr, offs0, stride, strideB, ur1, ur2, ur3, vect)
Read single Krylov vector from the file.
subroutine arna_mfop
Write procesor independent variables.
subroutine arna_rst_read
Read from checkpoints.
subroutine arna_rst_save
Write restart files.
subroutine arna_mfosv(ioflds, nout, offs0, stride, strideB, ur1, ur2, ur3, vect)
Write single Krylov vector to the file.
subroutine arna_read_par(prefix)
Read procesor independent data.
subroutine mntr_logi(mid, priority, logs, ivar)
Write log message adding single integer.
subroutine mntr_logr(mid, priority, logs, rvar)
Write log message adding single real.
subroutine mntr_warn(mid, logs)
Write warning message.
subroutine mntr_abort(mid, logs)
Abort simulation.
subroutine mntr_log(mid, priority, logs)
Write log message.
subroutine mntr_error(mid, logs)
Write error message.
subroutine mntr_check_abort(mid, ierr, logs)
Abort simulation.
subroutine mfi_getv(u, v, w, wk, lwk, iskip)
subroutine mfi_gets(u, wk, lwk, iskip)
subroutine mfi_prepare(hname)
subroutine mfo_outv(u, v, w, nel, mx, my, mz)
subroutine mfo_outs(u, nel, mx, my, mz)