Skip to content

Commit

Permalink
Write only when STRESS_PRINT_FLAG=1
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatel2107 committed Oct 29, 2024
1 parent 073ab40 commit 4ec7aa3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions cgyro/src/cgyro_flux.f90
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,17 @@ subroutine cgyro_flux
NEW_COMM_1, &
i_err)

! Reduce complex stress(kx, theta), distributed over n

call MPI_ALLREDUCE(stress_integrated_loc, &
stress_integrated, &
size(stress_integrated), &
MPI_DOUBLE_COMPLEX, &
MPI_SUM, &
NEW_COMM_1, &
i_err)
if (stress_print_flag .eq 1) then
! Reduce complex stress(kx, theta), distributed over n

call MPI_ALLREDUCE(stress_integrated_loc, &
stress_integrated, &
size(stress_integrated), &
MPI_DOUBLE_COMPLEX, &
MPI_SUM, &
NEW_COMM_1, &
i_err)
end if

! Reduced real cflux(ky), below, is still distributed over n

Expand Down

0 comments on commit 4ec7aa3

Please sign in to comment.