From f169189677710cc14222fbf55aa3f24e545727bb Mon Sep 17 00:00:00 2001 From: David Minton Date: Sun, 29 Sep 2019 11:57:57 -0400 Subject: [PATCH] Small fix to main tally loop to reduce the number of reductions --- examples/mare-with-rays-model2/ctem.in | 2 +- examples/mare-with-rays-model2/equilmovie.plt | 4 ++-- src/crater/crater_tally_observed.f90 | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/mare-with-rays-model2/ctem.in b/examples/mare-with-rays-model2/ctem.in index c5daff8f..5e945074 100644 --- a/examples/mare-with-rays-model2/ctem.in +++ b/examples/mare-with-rays-model2/ctem.in @@ -69,7 +69,7 @@ doangle T ! Vary the impact angle. Set to Kd1 0.00312669649143281 psi 2.000 fe 10.0 -ejecta_truncation 20.0 +ejecta_truncation 10.0 dorays T ! Testing input. These are used to perform non-Monte Carlo tests. diff --git a/examples/mare-with-rays-model2/equilmovie.plt b/examples/mare-with-rays-model2/equilmovie.plt index 247c3ecd..c0cf5491 100644 --- a/examples/mare-with-rays-model2/equilmovie.plt +++ b/examples/mare-with-rays-model2/equilmovie.plt @@ -1,5 +1,5 @@ #gnuplot 5.0 script -do for [ii=78:78] { +do for [ii=119:119] { reset @@ -37,7 +37,7 @@ set label 1 "100 m" at 800+50e0/pix,100 tc rgb "white" front center set style line 1 lt 1 lc rgb "white" lw 0.1 -surf = sprintf("/Users/daminton/work/Projects/Lunar-Saturation/Diffusion/CTEMsims2/ray-fe10-narrow/surf/surf%06d.jpg",ii) +surf = sprintf("surf/surf%06d.jpg",ii) plot surf binary filetype=auto w rgbimage notitle diff --git a/src/crater/crater_tally_observed.f90 b/src/crater/crater_tally_observed.f90 index face1cba..0b211083 100644 --- a/src/crater/crater_tally_observed.f90 +++ b/src/crater/crater_tally_observed.f90 @@ -151,7 +151,6 @@ subroutine crater_tally_observed(user,surf,domain,nkilled,onum,obsdist,obslist,o !$OMP SHARED(domain,maxpix,istart,iend,ind,mlist,mposlist,mpxlist,mlayerlist) & !$OMP SHARED(tnum,totpix,poslist,tlist,tmp_depthdiam,countable,Kval) & !$OMP REDUCTION(+:nkilled) & - !$OMP REDUCTION(+:onum) !$OMP DO do craternum = 1,tnum ! This is the first pixel of this crater, so record the appropriate values @@ -184,10 +183,10 @@ subroutine crater_tally_observed(user,surf,domain,nkilled,onum,obsdist,obslist,o end do nkilled = nkilled + 1 end if - if (countable(craternum)) onum = onum + 1 end do !$OMP END DO - !$OMP END PARALLEL + !$OMP END PARALLEL + onum = tnum - nkilled ! Bin the observed craters if required if (present(obsdist)) then