diff --git a/src/finalize.F90 b/src/finalize.F90 index 9fd4bcb0a..68210bb87 100644 --- a/src/finalize.F90 +++ b/src/finalize.F90 @@ -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() diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 6bbf408da..79307dc66 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -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 diff --git a/src/plot.F90 b/src/plot.F90 index 46d7f55b7..919d4e26f 100644 --- a/src/plot.F90 +++ b/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)