Skip to content

Commit

Permalink
Fix timing and atomic relaxations in CAVRZnrc
Browse files Browse the repository at this point in the history
Account for the overall cpu time to properly compute the number of
histories per hour. Previously, the total time was not included, but the
total number of histories was.

Turn off atomic relaxations in the cavrznrc_template.egsinpsample input
file, otherwise if fails because bound Compton scattering is turned off.
Funnily, it doesn't fail if the photon xsection library SI is used. Why?
  • Loading branch information
mainegra authored and ftessier committed Mar 29, 2021
1 parent da12bc0 commit 66fea4b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
26 changes: 15 additions & 11 deletions HEN_HOUSE/user_codes/cavrznrc/cavrznrc.mortran
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,7 @@ $SHOW-RNG-STATE(iout); write(iout,'(a)') ' *********';
$SET_ELAPSED_TOTAL_TIME(TIMEB);
ETIMETOT=ETIMETOT+TIMEB;
$SET_ELAPSED_CPUTIME(CPUT2);
TIMCPU=CPUT2-CPUT1;
TIMCPU=CPUT2-CPUT1+TMCPUO;
IF(IRESTART=3)["just analyzing data--no elapsed time"
WRITE(IOUT,250)TMCPUO,TMCPUO/3600;
WRITE(6,250)TMCPUO,TMCPUO/3600;
Expand All @@ -2985,18 +2985,22 @@ ELSEIF(IRESTART=5)["output time results for parallel runs"
]
ELSE[
IF(TMCPUO.EQ.0)["This is first run"
RATIO=ETIMETOT/TIMCPU;
WRITE(IOUT,260)ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
WRITE(6,260)ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
RATIO=ETIMETOT/TIMCPU;
WRITE(IOUT,260)ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
WRITE(6,260)ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
IF(IHSTRY.NE.0 .AND. TIMCPU.NE.0.0) ["this should always happen"
WRITE(IOUT,280) TIMCPU/dble(IHSTRY),3600.*dble(IHSTRY)/TIMCPU;
WRITE(6,280) TIMCPU/dble(IHSTRY),3600.*dble(IHSTRY)/TIMCPU;
]
]
ELSE[ "There was previous run, but don't have elapsed time for it"
RATIO = ETIMETOT/(TIMCPU-TMCPUO); "ratio this run only"
WRITE(IOUT,261) ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
WRITE(6,261) ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
]
IF(IHSTRY.NE.0 .AND. TIMCPU.NE.0.0) ["this should always happen"
WRITE(IOUT,280) TIMCPU/dble(IHSTRY),3600.*dble(IHSTRY)/TIMCPU;
WRITE(6,280) TIMCPU/dble(IHSTRY),3600.*dble(IHSTRY)/TIMCPU;
RATIO = ETIMETOT/(TIMCPU-TMCPUO); "ratio this run only"
WRITE(IOUT,261) ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
WRITE(6,261) ETIMETOT,TIMCPU,TIMCPU/3600.,RATIO;
IF(IHSTRY.NE.0 .AND. TIMCPU.NE.0.0) ["this should always happen"
WRITE(IOUT,280) TMCPUO/dble(IHSTRY),3600.*dble(IHSTRY)/TMCPUO;
WRITE(6,280) TMCPUO/dble(IHSTRY),3600.*dble(IHSTRY)/TMCPUO;
]
]
]

Expand Down
2 changes: 2 additions & 0 deletions HEN_HOUSE/user_codes/cavrznrc/cavrznrc_template.egsinp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ Brems cross sections= BH # BH (default),NIST;
# BH: Bethe-Heitler cross-sections used
# NIST: NIST cross-sections used

Atomic relaxations= Off # On (EADL) or Off

Bound Compton scattering= Off # Off, On, simple or norej (default);
# Off: Klein-Nishina used for Compton
# scattering
Expand Down

0 comments on commit 66fea4b

Please sign in to comment.