41 use size_m
, only : lx1, lx2, lelt, nx1, ny1, nz1, nx2, ny2, nz2
42 use input, only : ifcvode, ifexplvis, ifsplit, param, ccurve, xc, yc, zc
44 use soln, only : abx1, abx2, aby1, aby2, abz1, abz2, vgradt1, vgradt2
45 use tstep, only : if_full_pres
55 if (lx1 == lx2) ifsplit= .true.
57 if_full_pres = .false.
69 CALL
blank(ccurve ,12*lelt)
97 use geom, only : ifwcno
98 use input, only : ifadvc, iftran
99 use tstep, only : nid, istep, ifield, nfield, lastep, time, dt, courno
100 use tstep, only : re_cell
105 REAL(DP) :: EETIME0,EETIME1,EETIME2, TTIME_STP
106 SAVE eetime0,eetime1,eetime2
107 DATA eetime0,eetime1,eetime2 /0.0, 0.0, 0.0/
114 IF (eetime0 == 0.0 .AND. istep == 1) eetime0=
dnekclock()
120 DO 10 ifield=1,nfield
121 IF (ifadvc(ifield)) ifcour = .true.
123 IF (ifwcno) ifcour = .true.
124 ELSEIF (istep > 0 .AND. lastep == 0 .AND. iftran)
THEN
125 ttime_stp = eetime2-eetime1
126 ttime = eetime2-eetime0
132 WRITE (6,100) istep,time,dt,courno,re_cell,ttime,ttime_stp
133 IF ( .NOT. ifcour)
WRITE (6,101) istep,time,dt
134 ELSEIF (lastep == 1)
THEN
135 ttime_stp = eetime2-eetime1
136 ttime = eetime2-eetime0
138 100
FORMAT(
'Step',i7,
', t=',1pe14.7,
', DT=',1pe10.3 &
139 ,
', C=',0pf7.3,
', ReC=',0pf8.4,1pe11.4,1pe8.1)
140 101
FORMAT(
'Step',i7,
', time=',1pe12.5,
', DT=',1pe11.3)
150 use size_m
, only : nfield, nid, lorder, nelt, ldimt, lzd, lyd, lxd
151 use size_m
, only : nxd, nyd, nzd, nelv
152 use geom, only : ifgmsh3
153 use input, only : param, ifcvode, ifnav, ifnatc, iflomach
154 use input, only : ifadvc, iftmsh, ifmvbd, ifmodel, ifmhd, iftran
155 use input, only : npscal, ifstrs, ifflow, ifsplit, ngeom, ifheat
156 use tstep, only : tolpdf, lastep, iostep, timeio, iocomm, nsteps, fintim
157 use tstep, only : dtinit, dt, gtheta, betag, nmxnl, dtlag, nbd, ifield, tolnl
158 use tstep, only : prelax, nbdinp, tolrel, tolhdf, pi, ctarg, tolabs, nmxe
159 use tstep, only : nelfld, nmxh, nmxp
163 integer :: NFLDTM, nfldt, mfield, NABMSH, IADV, IFLD1
164 real(DP) :: TLFAC, one
173 IF ( ifstrs ) ifgmsh3 = .false.
174 IF ( .NOT. ifflow) ifgmsh3 = .false.
175 IF ( ifsplit ) ifgmsh3 = .false.
192 IF (ifmodel)
write(*,*)
"Oops: turb"
194 IF (ifmodel) CALL settmc
195 IF (ifmodel .AND. ifkeps)
THEN
196 write(*,*)
"Oops: turb"
199 IF (ldimt < nfldtm)
THEN
200 WRITE (6,*)
'k-e turbulence model activated'
201 WRITE (6,*)
'Insufficient number of field arrays'
202 WRITE (6,*)
'Rerun through PRE or change SIZE file'
210 IF (ifmvbd) mfield = 0
212 DO 100 ifield=mfield,nfldt+(ldimt-1 - npscal)
213 IF (iftmsh(ifield))
THEN
214 nelfld(ifield) = nelt
216 nelfld(ifield) = nelv
221 if (iftran) nmxh = 100
233 nsteps = int(param(11))
234 iocomm = int(param(13))
236 iostep = int(param(15))
238 tolpdf = abs(param(21))
239 tolhdf = abs(param(22))
240 tolrel = abs(param(24))
241 tolabs = abs(param(25))
243 nbdinp = int(param(27))
244 nabmsh = int(param(28))
246 if (nbdinp > lorder)
then
248 write(6,*)
'ERROR: torder > lorder.',nbdinp,lorder
249 write(6,*)
'Change SIZEu and recompile entire code.'
254 if(abs(param(16)) >= 2) ifcvode = .true.
259 IF (tolrel <= 0.) tolrel = 0.01
264 IF ( .NOT. iftran .AND. .NOT. ifnav) prelax = 1.e-5
271 IF (fintim /= 0.) nsteps = 1000000000
272 IF ( .NOT. iftran ) nsteps = 1
275 IF (iocomm == 0) iocomm = nsteps+1
280 IF (betag > 0.) ifnatc= .true.
281 IF(iflomach) ifnatc = .false.
284 IF (nabmsh <= 0 .OR. nabmsh > 3)
THEN
296 IF ( .NOT. ifflow) ifld1 = 2
297 DO 200 ifield=ifld1,nfldt
298 IF (ifadvc(ifield)) iadv = 1
322 use size_m
, only : nid, ndim, ldim
323 use input, only : reafle, vnekton, nktonv, param
327 CHARACTER(132) :: tmp_string
328 CHARACTER(1) :: tmp_string1(132)
329 equivalence(tmp_string,tmp_string1)
332 integer :: ls, nparam, j, i
336 OPEN (unit=9,file=reafle,status=
'OLD')
341 READ(9,*,err=400) vnekton
344 IF(vnekton < vnekmin)
THEN
345 print*,
' Error: This NEKTON Solver Requires a .rea file'
346 print*,
' from prenek version ',vnekmin,
' or higher'
347 print*,
' Please run the session through the preprocessor'
348 print*,
' to bring the .rea file up to date.'
351 READ(9,*,err=400) ndim
354 WRITE(6,10) ldim,ndim
355 10
FORMAT(//,2x,
'Error: This NEKTON Solver has been compiled' &
356 /,2x,
' for spatial dimension equal to',i2,
'.' &
357 /,2x,
' The data file has dimension',i2,
'.')
361 CALL
blank(tmp_string,132)
362 CALL
chcopy(tmp_string,reafle,132)
364 READ(9,*,err=400) nparam
365 WRITE(6,82) nparam,(tmp_string1(j),j=1,ls)
368 CALL
blank(tmp_string,132)
369 READ(9,80,err=400) tmp_string
371 IF (param(i) /= 0.0)
WRITE(6,81) i,(tmp_string1(j),j=1,ls)
374 81
FORMAT(i4,3x,132a1)
375 82
FORMAT(i4,3x,
'Parameters from file:',132a1)
385 if (param(62) > 0)
then
386 if(nid == 0)
write(6,*) &
387 'enable byte swap for output'
397 401
FORMAT(2x,
'ERROR READING PARAMETER DATA' &
398 ,/,2x,
'ABORTING IN ROUTINE ECHOPAR.')
402 501
FORMAT(2x,
'ERROR READING LOGICAL DATA' &
403 ,/,2x,
'ABORTING IN ROUTINE ECHOPAR.')
413 use size_m
, only : nid
414 use geom, only : ifgeom
415 use tstep, only : istep
418 integer,
intent(in) :: igeom
420 if (nid == 0 .AND. istep <= 1)
write(6,*)
'generate geometry data'
424 ELSEIF (igeom == 2)
THEN
436 ELSEIF (igeom == 3)
THEN
438 write(*,*)
"Oops: igeom"
444 CALL
dssum(xm3,nx3,ny3,nz3)
445 call col2(xm3,tmult,ntot3)
446 CALL
dssum(ym3,nx3,ny3,nz3)
447 call col2(ym3,tmult,ntot3)
449 CALL
dssum(xm3,nx3,ny3,nz3)
450 call col2(xm3,tmult,ntot3)
454 CALL
dssum(xm3,nx3,ny3,nz3)
455 call col2(xm3,vmult,ntot3)
456 CALL
dssum(ym3,nx3,ny3,nz3)
457 call col2(ym3,vmult,ntot3)
459 CALL
dssum(xm3,nx3,ny3,nz3)
460 call col2(xm3,vmult,ntot3)
463 CALL
geom1(xm3,ym3,zm3)
474 if (nid == 0 .AND. istep <= 1)
then
475 write(6,*)
'done :: generate geometry data'
485 use size_m
, only : nid
486 use input, only : session, path
487 use input, only : reafle, re2fle, fldfle, hisfle, schfle
488 use input, only : dmpfle, orefle, nrefle
492 integer :: ls, lpp, lsp, l1, ln, len
494 CHARACTER(132) :: NAME, slash
495 CHARACTER(1) :: DMP(4),FLD(4),REA(4),HIS(4),SCH(4) ,ORE(4), NRE(4)
496 CHARACTER(1) :: RE2(4)
497 CHARACTER(4) :: DMP4 ,FLD4 ,REA4 ,HIS4 ,SCH4 ,ORE4 , NRE4
499 equivalence(dmp,dmp4), (fld,fld4), (rea,rea4), (his,his4) &
500 , (sch,sch4), (ore,ore4), (nre,nre4) &
502 DATA dmp4,fld4,rea4 /
'.dmp',
'.fld',
'.rea'/
503 DATA his4,sch4 /
'.his',
'.sch'/
504 DATA ore4,nre4 /
'.ore',
'.nre'/
506 CHARACTER(78) :: tmp_string
528 if(
indx1(path(len:len),slash,1) < 1)
then
529 call
chcopy(path(len+1:len+1),slash,1)
535 CALL
blank(reafle,132)
536 CALL
blank(re2fle,132)
537 CALL
blank(fldfle,132)
538 CALL
blank(hisfle,132)
539 CALL
blank(schfle,132)
540 CALL
blank(dmpfle,132)
541 CALL
blank(orefle,132)
542 CALL
blank(nrefle,132)
543 CALL
blank(name ,132)
551 call
chcopy(name(1:1),path,lpp)
552 call
chcopy(name(lpp+1:lpp+1),session,ls )
558 call
chcopy(name(l1:l1),rea , 4)
559 call
chcopy(reafle ,name,ln)
563 call
chcopy(name(l1:l1),re2 , 4)
564 call
chcopy(re2fle ,name,ln)
567 call
chcopy(name(l1:l1),fld , 4)
568 call
chcopy(fldfle ,name,ln)
571 call
chcopy(name(l1:l1),his , 4)
572 call
chcopy(hisfle ,name,ln)
575 call
chcopy(name(l1:l1),sch , 4)
576 call
chcopy(schfle ,name,ln)
580 call
chcopy(name(l1:l1),dmp , 4)
581 call
chcopy(dmpfle ,name,ln)
584 call
chcopy(name(l1:l1),ore , 4)
585 call
chcopy(orefle ,name,ln)
588 call
chcopy(name(l1:l1),nre , 4)
589 call
chcopy(nrefle ,name,ln)
594 CALL
chcopy(tmp_string,reafle,78)
595 WRITE(6,1000) tmp_string
597 1000
FORMAT(//,2x,
'Beginning session:',/,2x,a78)
614 use geom, only : ifsurt
615 use input, only : ifmvbd, param, ifprint
616 use tstep, only : dtlag, ab, abmsh, bd, dt, iocomm
617 use tstep, only : istep, nab, nbd, nbdinp, time, timef
620 integer :: ilag, irst, nabmsh, nbdmsh
622 irst = int(param(46))
627 dtlag(ilag) = dtlag(ilag-1)
631 IF (istep == 1 .AND. irst <= 0) dtlag(2) = dt
641 if (irst > 0) nbd = nbdinp
643 CALL
setbd(bd,dtlag,nbd)
645 IF (istep <= 2 .AND. irst <= 0) nab = istep
650 nabmsh = int(param(28))
651 IF (nabmsh > istep .AND. irst <= 0) nabmsh = istep
652 IF (ifsurt) nabmsh = nbd
654 CALL
setabbd(abmsh,dtlag,nabmsh,nbdmsh)
661 IF (iocomm > 0 .AND. mod(istep,iocomm) == 0) ifprint= .true.
662 IF (istep == 1 .OR. istep == 0 ) ifprint= .true.
675 use eigen, only : ifaa, ifae, ifas, ifast, ifga, ifge, ifgs, ifgst
676 use input, only : ifflow, ifheat
677 use tstep, only : ifield, imesh, tolev, tolhdf, tolhe, tolhr, tolhs
678 use tstep, only : tolpdf, tolps
682 integer,
intent(in) :: igeom
684 IF (igeom == 1)
RETURN
713 ELSEIF (ifheat .AND. .NOT. ifflow)
THEN
734 use size_m
, only : nid
736 use input, only : ifnav, ifsplit, iftran
737 use tstep, only : ifield, imesh, istep, time
741 integer,
intent(inout) :: igeom
752 if(nid == 0 .AND. igeom == 1) &
753 write(6,*)
'Solving for fluid',ifsplit,iftran,ifnav
777 if (ifmodel) call twalluz(igeom)
778 if (igeom >= 2) call chkptol
793 if(nid == 0 .AND. igeom >= 2) &
794 write(*,
'(4x,i7,1x,1p2e12.4,a)') &
814 use size_m
, only : nid, nfield
816 use input, only : ifcvode, ifsplit, iftmsh
817 use tstep, only : ifield, imesh, istep, time
821 integer,
intent(inout) :: igeom
823 integer :: intype, igeo
827 if (nid == 0 .AND. igeom == 1) &
828 write(*,
'(13x,a)')
'Solving for heat'
833 call cdscal_cvode(igeom)
836 elseif (ifsplit)
then
841 if ( .NOT. iftmsh(ifield)) imesh = 1
842 if ( iftmsh(ifield)) imesh = 2
854 if ( .NOT. iftmsh(ifield)) imesh = 1
855 if ( iftmsh(ifield)) imesh = 2
863 if (nid == 0 .AND. igeom >= 2) &
864 write(*,
'(4x,i7,1x,1p2e12.4,a)') &
946 use ctimer, only : ifsync, nadvc, ncdtp, ncrsl, ndadd, nddsl
947 use ctimer, only : pinvc, pinv3, phmhz, peslv, pdsum, pddsl, pdadd
948 use ctimer, only : pvdss, pusbc, pspro, psolv, ppres, pmltd, pcrsl
950 use ctimer, only : tgop_sync, tgop, teslv, tdsum, tddsl, tdadd, tcrsl, tcdtp
951 use ctimer, only : tspro, tsolv, tpres, tprep, tmltd, tinvc, tinv3, thmhz
952 use ctimer, only : tadvc, twal, tvdss, tusbc, tttstp, ttime, tsyc
953 use ctimer, only : nwal, nvdss, nusbc, nsyc, nspro, nsolv, npres
954 use ctimer, only : ninvc, ninv3, nhmhz, ngop, neslv, nmltd, ndsum
956 use ctimer, only : nproj, tproj, proj_flop, proj_mop
957 use ctimer, only : nhconj, thconj, hconj_flop, hconj_mop
958 use ctimer, only : ncggo, tcggo, cggo_flop, cggo_mop
959 use ctimer, only : naxhm, taxhm, axhelm_flop, axhelm_mop
960 use ctimer, only : nintp, tintp, intp_flop, intp_mop
961 use ctimer, only : ngrst, tgrst, grst_flop, grst_mop
962 use ctimer, only : nscn, tscn
963 use ctimer, only : nmakef, tmakef
964 use ctimer, only : nmakeq, tmakeq
965 use ctimer, only : nsetfast, tsetfast
966 use ctimer, only : ndpc, tdpc
967 use ctimer, only : nmg_mask, tmg_mask
968 use ctimer, only : np4misc, tp4misc
970 use ctimer, only : ngmres, tgmres, gmres_flop, gmres_mop
971 use ctimer, only : nh1mg, th1mg, h1mg_flop, h1mg_mop
972 use ctimer, only : nschw, tschw, schw_flop, schw_mop
973 use ctimer, only : nscps, tscps
974 use ctimer, only : nnmsc, tnmsc
975 use ctimer, only : nnmvc, tnmvc
976 use ctimer, only : ncrespsp, tcrespsp
977 use ctimer, only : ncresvsp, tcresvsp
978 use ctimer, only : nheat2, theat2
979 use ctimer, only : nprep, tprep
980 use ctimer, only : nfoo, tfoo
981 use size_m
, only : nid
985 real(DP) :: min_dsum, max_dsum, avg_dsum
986 real(DP) :: min_vdss, max_vdss, avg_vdss
987 real(DP) :: min_gop, max_gop, avg_gop
988 real(DP) :: min_gop_sync, max_gop_sync, avg_gop_sync
989 real(DP) :: min_crsl, max_crsl, avg_crsl
990 real(DP) :: min_usbc, max_usbc, avg_usbc
991 real(DP) :: min_syc, max_syc, avg_syc
992 real(DP) :: min_wal, max_wal, avg_wal
993 real(DP) :: min_irc, max_irc, avg_irc
994 real(DP) :: min_isd, max_isd, avg_isd
995 real(DP) :: min_comm, max_comm, avg_comm
996 real(DP) :: tstop, tirc, tisd, trc, tsd, tcomm, wwork, padvc
997 real(DP) :: total_share
998 integer :: nirc, nisd
1000 real(DP) :: comm_timers(8)
1001 integer :: comm_counters(8)
1002 character(132) :: s132
1010 tgop = comm_timers(1)
1011 tgop_sync = comm_timers(2)
1012 twal = comm_timers(3)
1013 tsyc = comm_timers(4)
1014 tirc = comm_timers(5)
1015 tisd = comm_timers(6)
1016 trc = comm_timers(7)
1017 tsd = comm_timers(8)
1018 ngop = comm_counters(1)
1019 nwal = comm_counters(3)
1020 nsyc = comm_counters(4)
1021 nirc = comm_counters(5)
1022 nisd = comm_counters(6)
1024 tcomm = tisd + tirc + tsyc + tgop + twal + trc + tsd
1026 call
gop(min_comm,wwork,
'm ',1)
1028 call
gop(max_comm,wwork,
'M ',1)
1030 call
gop(avg_comm,wwork,
'+ ',1)
1031 avg_comm = avg_comm/
np
1034 call
gop(min_isd,wwork,
'm ',1)
1036 call
gop(max_isd,wwork,
'M ',1)
1038 call
gop(avg_isd,wwork,
'+ ',1)
1039 avg_isd = avg_isd/
np
1042 call
gop(min_irc,wwork,
'm ',1)
1044 call
gop(max_irc,wwork,
'M ',1)
1046 call
gop(avg_irc,wwork,
'+ ',1)
1047 avg_irc = avg_irc/
np
1050 call
gop(min_syc,wwork,
'm ',1)
1052 call
gop(max_syc,wwork,
'M ',1)
1054 call
gop(avg_syc,wwork,
'+ ',1)
1055 avg_syc = avg_syc/
np
1058 call
gop(min_wal,wwork,
'm ',1)
1060 call
gop(max_wal,wwork,
'M ',1)
1062 call
gop(avg_wal,wwork,
'+ ',1)
1063 avg_wal = avg_wal/
np
1066 call
gop(min_gop,wwork,
'm ',1)
1068 call
gop(max_gop,wwork,
'M ',1)
1070 call
gop(avg_gop,wwork,
'+ ',1)
1071 avg_gop = avg_gop/
np
1073 min_gop_sync = tgop_sync
1074 call
gop(min_gop_sync,wwork,
'm ',1)
1075 max_gop_sync = tgop_sync
1076 call
gop(max_gop_sync,wwork,
'M ',1)
1077 avg_gop_sync = tgop_sync
1078 call
gop(avg_gop_sync,wwork,
'+ ',1)
1079 avg_gop_sync = avg_gop_sync/
np
1082 call
gop(min_vdss,wwork,
'm ',1)
1084 call
gop(max_vdss,wwork,
'M ',1)
1086 call
gop(avg_vdss,wwork,
'+ ',1)
1087 avg_vdss = avg_vdss/
np
1090 call
gop(min_dsum,wwork,
'm ',1)
1092 call
gop(max_dsum,wwork,
'M ',1)
1094 call
gop(avg_dsum,wwork,
'+ ',1)
1095 avg_dsum = avg_dsum/
np
1099 call
gop(min_crsl,wwork,
'm ',1)
1101 call
gop(max_crsl,wwork,
'M ',1)
1103 call
gop(avg_crsl,wwork,
'+ ',1)
1104 avg_crsl = avg_crsl/
np
1107 call
gop(min_usbc,wwork,
'm ',1)
1109 call
gop(max_usbc,wwork,
'M ',1)
1111 call
gop(avg_usbc,wwork,
'+ ',1)
1112 avg_usbc = avg_usbc/
np
1114 tttstp = tttstp + 1e-7
1116 write(6,
'(A)')
'runtime statistics:'
1117 write(6,*)
'total time',tttstp
1122 call
print_times(
'cggo time', ncggo , tcggo , tttstp, total_share)
1123 call
print_times(
'axhm time', naxhm , taxhm , tttstp, total_share)
1124 call
print_times(
'h1mg time', nh1mg , th1mg , tttstp, total_share)
1125 call
print_times(
'schw time', nschw , tschw , tttstp, total_share)
1126 call
print_times(
'gmrs time', ngmres , tgmres , tttstp, total_share)
1127 call
print_times(
'prhs time', ncrespsp, tcrespsp, tttstp, total_share)
1128 call
print_times(
'vrhs time', ncresvsp, tcresvsp, tttstp, total_share)
1131 call
print_times(
'proj time', nproj , tproj , tttstp, total_share)
1132 call
print_times(
'hcoj time', nhconj , thconj , tttstp, total_share)
1133 call
print_times(
'dpc time', ndpc , tdpc , tttstp, total_share)
1134 call
print_times(
'scps time', nscps , tscps , tttstp, total_share)
1135 call
print_times(
'stft time', nsetfast, tsetfast, tttstp, total_share)
1136 call
print_times(
'scn time', nscn , tscn , tttstp, total_share)
1137 call
print_times(
'het2 time', nheat2 , theat2 , tttstp, total_share)
1138 call
print_times(
'p4mc time', np4misc , tp4misc , tttstp, total_share)
1139 call
print_times(
'makf time', nmakef , tmakef , tttstp, total_share)
1140 call
print_times(
'makq time', nmakeq , tmakeq , tttstp, total_share)
1141 call
print_times(
'prep time', nprep , tprep , tttstp, total_share)
1142 call
print_times(
'mmsk time', nmg_mask, tmg_mask, tttstp, total_share)
1143 call
print_times(
'nmsc time', nnmsc , tnmsc , tttstp, total_share)
1144 call
print_times(
'nmvc time', nnmvc , tnmvc , tttstp, total_share)
1145 call
print_times(
'advc time', nadvc , tadvc , tttstp, total_share)
1146 call
print_times(
'foo time', nfoo , tfoo , tttstp, total_share)
1148 write(6,
'(A,F8.4)')
"Still missing ", (tttstp - total_share) / tttstp
1150 call
print_flops(
'cggo flop/s', cggo_flop, cggo_mop, tcggo)
1151 call
print_flops(
'gmres flop/s', gmres_flop, gmres_mop, tgmres)
1152 call
print_flops(
'h1mg flop/s', h1mg_flop, h1mg_mop, th1mg)
1153 call
print_flops(
'schw flop/s', schw_flop, schw_mop, tschw)
1154 call
print_flops(
'axhm flop/s', axhelm_flop, axhelm_mop, taxhm)
1157 call
print_flops(
'proj flop/s', proj_flop, proj_mop, tproj)
1158 call
print_flops(
'hcoj flop/s', hconj_flop, hconj_mop, thconj)
1161 call
print_flops(
'Subset FLOPS/s', total_flop, total_mop, time_flop)
1162 call
print_flops(
'Total FLOPS/s', total_flop, total_mop, tttstp)
1172 write(6,*)
'inv3 time',ninv3,tinv3,pinv3
1174 write(6,*)
'invc time',ninvc,tinvc,pinvc
1176 write(6,*)
'mltd time',nmltd,tmltd,pmltd
1178 write(6,*)
'cdtp time',ncdtp,tcdtp,pcdtp
1180 write(6,*)
'eslv time',neslv,teslv,peslv
1184 write(6,*)
'pres time',npres,tpres,ppres
1188 write(6,*)
'crsl time',ncrsl,tcrsl,pcrsl
1189 write(6,*)
'crsl min ',min_crsl
1190 write(6,*)
'crsl max ',max_crsl
1191 write(6,*)
'crsl avg ',avg_crsl
1195 write(6,*)
'hmhz time',nhmhz,thmhz,phmhz
1199 write(6,*)
'spro time',nspro,tspro,pspro
1203 write(6,*)
'usbc time',nusbc,tusbc,pusbc
1204 write(6,*)
'usbc min ',min_usbc
1205 write(6,*)
'usbc max ',max_usbc
1206 write(6,*)
'usb avg ',avg_usbc
1211 write(6,*)
'advc time',nadvc,tadvc,padvc
1215 write(6,*)
'vdss time',nvdss,tvdss,pvdss
1216 write(6,*)
'vdss min ',min_vdss
1217 write(6,*)
'vdss max ',max_vdss
1218 write(6,*)
'vdss avg ',avg_vdss
1222 write(6,*)
'dsum time',ndsum,tdsum,pdsum
1223 write(6,*)
'dsum min ',min_dsum
1224 write(6,*)
'dsum max ',max_dsum
1225 write(6,*)
'dsum avg ',avg_dsum
1234 write(6,*)
'dadd time',ndadd,tdadd,pdadd
1243 write(6,*)
'ddsl time',nddsl,tddsl,pddsl
1246 write(6,*)
'solv time',nsolv,tsolv,psolv
1257 write(6,
'(/,A)')
'MPI timings'
1259 write(6,*)
'total comm time',tcomm, max_comm/ttime
1260 write(6,*)
'comm min ',min_comm
1261 write(6,*)
'comm max ',max_comm
1262 write(6,*)
'comm avg ',avg_comm
1266 write(6,*)
'barrier time',nsyc,tsyc,psyc
1267 write(6,*)
'barrier min ',min_syc
1268 write(6,*)
'barrier max ',max_syc
1269 write(6,*)
'barrier avg ',avg_syc
1273 write(6,*)
'waitall time',nwal,twal,pwal
1274 write(6,*)
'waitall min ',min_wal
1275 write(6,*)
'waitall max ',max_wal
1276 write(6,*)
'waitall avg ',avg_wal
1280 write(6,*)
'allreduce time',ngop,tgop,pgop
1281 write(6,*)
'allreduce min ',min_gop
1282 write(6,*)
'allreduce max ',max_gop
1283 write(6,*)
'allreduce avg ',avg_gop
1286 pgop_sync=tgop_sync/tcomm
1287 write(6,*)
'allreduce_sync time',tgop_sync,pgop_sync
1288 write(6,*)
'allreduce_sync min ',min_gop_sync
1289 write(6,*)
'allreduce_sync max ',max_gop_sync
1290 write(6,*)
'allreduce_sync avg ',avg_gop_sync
1294 if (
np > 1024)
return
1296 write(6,1)
'tusbc',
'tdadd',
'tcrsl',
'tvdss',
'tdsum',
' tgop',ifsync
1297 1
format(/,
'#',2x,
'nid',6(7x,a5),4x,
'qqq',1x,l4)
1299 call
blank(s132,132)
1300 write(s132,132) nid,tusbc,tdadd,tcrsl,tvdss,tdsum,tgop
1301 132
format(i12,1p6e12.4,
' qqq')
1312 use size_m
, only : nid
1317 integer,
intent(in) :: n_in, io
1318 character(n_in),
intent(in) :: s
1320 integer :: n, mtag, m, i, k, l
1330 write(
io,1) (s(k:k),k=1,l)
1334 call
csend(mtag,s,1,i,0)
1340 write(
io,1) (w(k:k),k=1,l)
1342 write(
io,*)
'pprint long message: ',i,m
1344 write(
io,1) (w(k:k),k=1,l)
1348 call
crecv(mtag,w,m)
1350 call
csend(nid,s,l,0,0)
1358 use opctr, only : nrout, dcount, ncall, dct, maxrts
1361 integer,
intent(in) :: icall
1364 if (icall == 1)
then
1367 if (icall == 1 .OR. icall == 2)
then
1374 if (icall == 3)
then
1375 write(*,*)
"Oops: icall = 3"
1380 write(6,*) nid,
' opcount',dcount
1382 call
csend(i,idum,4,i,0)
1383 call
crecv(i,ddcount,wdsize)
1384 write(6,*) i,
' opcount',ddcount
1387 call
crecv(nid,idum,4)
1388 call
csend(nid,dcount,wdsize,0,0)
1392 call
gop(dhc,dwork,
'+ ',1)
1394 write(6,*)
' TOTAL OPCOUNT',dhc
1397 CALL drcopy(rct,dct,nrout)
1398 CALL
sort(rct,ind,nrout)
1399 CALL chswapr(rname,6,ind,nrout,sname)
1400 call
iswap(ncall,ind,nrout,idum)
1404 write(6,201) nid,rname(i),rct(i),ncall(i)
1406 201
format(2x,
' opnode',i4,2x,a6,g18.7,i12)
1416 use kinds, only : dp, i8
1417 use size_m
, only : nx1, ny1, nz1, nelv, nid
1418 use size_m
, only : nx2, ny2, nz2
1419 use input, only : ifflow, ifsplit
1421 use soln, only : vmult, tmult, tmask, v1mask, pmask
1426 integer :: nxyz, nel, ntot1, ntot2
1427 real(DP) :: vpts, ppts
1428 real(DP),
external :: glsum
1429 integer,
external :: glsc2, i8glsum
1430 integer(i8) :: ntot,ntotp,ntotv
1436 vpts = glsum(vmult,nel*nxyz) + .1
1441 ppts = glsum(work,1) + .1
1444 if (nid == 0)
write(6,
'(A,2i13)') &
1445 'gridpoints unique/tot: ',nvtot,ntot
1447 ntot1=nx1*ny1*nz1*nelv
1448 ntot2=nx2*ny2*nz2*nelv
1450 ntotv = glsc2(tmult,tmask,ntot1)
1451 ntotp = i8glsum(ntot2,1)
1453 if (ifflow) ntotv = glsc2(vmult,v1mask,ntot1)
1454 if (ifsplit) ntotp = glsc2(vmult,pmask ,ntot1)
1455 if (nid == 0)
write(6,*)
' dofs:',ntotv,ntotp
1461 use kinds, only : dp
1463 character(*),
intent(in) :: label
1464 integer,
intent(in) :: num_calls
1465 real(DP),
intent(in) :: time, total_time
1466 real(DP),
intent(inout) :: cum_time
1468 cum_time = cum_time + time
1469 write(6,42) label,num_calls, time, time/total_time
1471 42
format(a,i12,f10.2,f8.4)
1475 use kinds, only : i8, dp
1477 character(*) :: label
1478 integer(i8) :: flops, mops
1480 real(DP),
parameter :: bandwidth = 30.*1024 / 64
1482 real(DP),
parameter :: compute = 204.*1024 / 64
1487 if (time > 1.e-6 .and. flops > 1 .and. mops > 1)
then
1488 peak = min(compute, flops * bandwidth / (mops*8))
1489 write(6,
'(A,2F14.1,F8.4)') label, &
1490 real(flops, kind=DP) / (1.e6 * time), &
1491 peak,
real(flops, kind=DP) / (1.e6 * time * peak)
subroutine setdt
Set the new time step. All cases covered.
subroutine plan4()
Splitting scheme .
subroutine dssum(u)
Direct stiffness sum.
subroutine sort(a, ind, n)
Use Heap Sort (p 231 Num. Rec., 1st Ed.)
subroutine setvar
Initialize variables.
subroutine files
Defines machine specific input and output file names.
subroutine print_flops(label, flops, mops, time)
subroutine esteig
Estimate eigenvalues.
subroutine initdim
Transfer array dimensions to common.
subroutine iswap(b, ind, n, temp)
SORT ASSOCIATED ELEMENTS BY PUTTING ITEM(JJ) into item(i) where JJ = ind(i)
subroutine runstat
print run statistics from ctimer
subroutine crecv(mtype, buf, lenm)
integer function indx1(S1, S2, L2)
subroutine opcount(ICALL)
init opcounter
subroutine dofcnt
count degrees of freedom
subroutine time00
zero the ctimer
subroutine pprint_all(s, n_in, io)
pretty-print from runstat
real(dp) function dnekclock()
subroutine setchar
If characteristics, need number of sub-timesteps (DT/DS). Current sub-timeintegration scheme: RK4...
subroutine sfastax()
For undeformed elements, set up appropriate elemental matrices and geometric factors for fast evaluat...
subroutine setabbd(ab, dtlag, nab, nbd)
Compute Adams-Bashforth coefficients (order NAB, less or equal to 3). NBD .EQ. 1 Standard Adams-Bashf...
subroutine unorm
Norm calculation.
subroutine fluid(igeom)
Driver for solving the incompressible Navier-Stokes equations.
subroutine gengeom(igeom)
Generate geometry data.
subroutine geneig(igeom)
Compute eigenvalues.
subroutine eigenv
Compute the following eigenvalues:. EIGAA = minimum eigenvalue of the matrix A (=Laplacian) EIGAE = m...
subroutine setbd(bd, dtbd, nbd)
Compute backwards-difference (BDF) coefficients, order NBD.
subroutine setordbd
Set up parameters for backward differentiation scheme.
subroutine blank(A, N)
blank a string
subroutine lagmass()
Lag the mass matrix (matrices)
subroutine setinvm()
Invert the mass matrix. 1) Copy BM1 to BINVM1 2) Perform direct stiffness summation on BINVM1 3) Comp...
subroutine gop(x, w, op, n)
Global vector commutative operation.
subroutine volume
Compute the volume based on mesh M1 and mesh M2.
subroutine geom2
Routine to generate all elemental geometric data for mesh 2 (Gauss-Legendre mesh). RXM2, RYM2, RZM2 - dr/dx, dr/dy, dr/dz SXM2, SYM2, SZM2 - ds/dx, ds/dy, ds/dz TXM2, TYM2, TZM2 - dt/dx, dt/dy, dt/dz JACM2 - Jacobian BM2 - Mass matrix.
subroutine chcopy(a, b, n)
subroutine gencoor()
Generate xyz coordinates for all elements. Velocity formulation : mesh 3 is used Stress formulation :...
subroutine echopar
Echo the nonzero parameters from the readfile to the logfile.
subroutine print_times(label, num_calls, time, total_time, cum_time)
subroutine settolt
Set tolerances for temerature/passive scalar solver.
integer function ltrunc(string, l)
subroutine cdscal(igeom)
Solve the convection-diffusion equation for passive scalar IPSCAL.
subroutine geom1()
Routine to generate all elemental geometric data for mesh 1. Velocity formulation : global-to-local m...
subroutine heat(igeom)
Driver for temperature or passive scalar.
subroutine setdef()
Set up deformed element logical switches.
subroutine settolv
Set tolerances for velocity solver.
subroutine settime
setup time-stepping
subroutine comment
No need to comment !!
subroutine csend(mtype, buf, len, jnid, jpid)
subroutine initdat
Initialize and set default values.