mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 06:25:30 -04:00
Fixed mpi reduce for serpent-style plots
This commit is contained in:
parent
334b10077e
commit
cbc428f104
3 changed files with 14 additions and 6 deletions
|
|
@ -54,7 +54,7 @@ contains
|
|||
end if
|
||||
|
||||
! Finish reaction rate plots
|
||||
if (master .and. rxn_plots) call finalize_rxn_plots()
|
||||
if (rxn_plots) call finalize_rxn_plots()
|
||||
|
||||
! deallocate arrays
|
||||
call free_memory()
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ contains
|
|||
|
||||
! Check flag to enable rxn plot scoring
|
||||
call lower_case(rxn_plots_)
|
||||
if (rxn_plots_ == 'true' .or. rxn_plots == '1') then
|
||||
if (rxn_plots_ == 'true' .or. rxn_plots_ == '1') then
|
||||
rxn_plots = .true.
|
||||
end if
|
||||
|
||||
|
|
|
|||
16
src/plot.F90
16
src/plot.F90
|
|
@ -107,10 +107,18 @@ contains
|
|||
if (.not. pl % type == PLOT_TYPE_RXNRATE) cycle
|
||||
|
||||
#ifdef MPI
|
||||
call MPI_REDUCE(MPI_IN_PLACE, pl % fisswgt, size(pl % fisswgt), &
|
||||
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
call MPI_REDUCE(MPI_IN_PLACE, pl % fluxwgt, size(pl % fluxwgt), &
|
||||
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
if (master) then
|
||||
call MPI_REDUCE(MPI_IN_PLACE, pl % fisswgt, size(pl % fisswgt), &
|
||||
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
call MPI_REDUCE(MPI_IN_PLACE, pl % fluxwgt, size(pl % fluxwgt), &
|
||||
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
else
|
||||
call MPI_REDUCE(pl % fisswgt, pl % fisswgt, size(pl % fisswgt), &
|
||||
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
call MPI_REDUCE(pl % fluxwgt, pl % fluxwgt, size(pl % fluxwgt), &
|
||||
MPI_REAL8, MPI_SUM, 0, MPI_COMM_WORLD, mpi_err)
|
||||
cycle
|
||||
end if
|
||||
#endif
|
||||
|
||||
pl % fisswgt = pl % fisswgt / maxval(pl % fisswgt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue