Skip to content

Commit

Permalink
Reverted broadcast call for scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Dec 10, 2019
1 parent 25974eb commit 782ecb0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 41 deletions.
42 changes: 21 additions & 21 deletions physics/rrtmgp_lw_gas_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,21 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr
! Broadcast dimensions to all processors
#ifdef MPI
call MPI_BARRIER(mpicomm, ierr)
call MPI_BCAST(ntemps, size(ntemps), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npress, size(npress), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nabsorbers, size(nabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminorabsorbers, size(nminorabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nextrabsorbers, size(nextrabsorbers), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nmixingfracs, size(nmixingfracs), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nlayers, size(nlayers), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nbnds, size(nbnds), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ngpts_lw, size(ngpts_lw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npairs, size(npairs), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_lower, size(ncontributors_lower), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_upper, size(ncontributors_upper), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_lower, size(nminor_absorber_intervals_lower), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_upper, size(nminor_absorber_intervals_upper), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ninternalSourcetemps, size(ninternalSourcetemps), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ntemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npress, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminorabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nextrabsorbers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nmixingfracs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nlayers, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nbnds, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ngpts_lw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npairs, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_lower, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_upper, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ninternalSourcetemps, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
#endif

!if (mpirank .eq. mpiroot) then
Expand Down Expand Up @@ -341,9 +341,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr
call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(kmajor, size(kmajor), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p, size(temp_ref_p), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t, size(temp_ref_t), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop, size(press_ref_trop), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(totplnk, size(totplnk), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(planck_frac, size(planck_frac), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
#else
Expand All @@ -356,9 +356,9 @@ subroutine rrtmgp_lw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, lw_gas_pr
call MPI_BCAST(scaling_gas_upper, size(scaling_gas_upper), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(vmr_ref, size(vmr_ref), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(kmajor, size(kmajor), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p, size(temp_ref_p), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t, size(temp_ref_t), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop, size(press_ref_trop), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p, 1, MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t, 1, MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop, 1, MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(totplnk, size(totplnk), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(planck_frac, size(planck_frac), MPI_REAL, mpiroot, mpicomm, ierr)
#endif
Expand Down
40 changes: 20 additions & 20 deletions physics/rrtmgp_sw_gas_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,20 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p
! Broadcast dimensions to all processors
#ifdef MPI
call MPI_BARRIER(mpicomm, ierr)
call MPI_BCAST(ntemps_sw, size(ntemps_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npress_sw, size(npress_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nabsorbers_sw, size(nabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminorabsorbers_sw, size(nminorabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nextrabsorbers_sw, size(nextrabsorbers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nmixingfracs_sw, size(nmixingfracs_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nlayers_sw, size(nlayers_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nbnds_sw, size(nbnds_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ngpts_sw, size(ngpts_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npairs_sw, size(npairs_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_lower_sw, size(ncontributors_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_upper_sw, size(ncontributors_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_lower_sw, size(nminor_absorber_intervals_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_upper_sw, size(nminor_absorber_intervals_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ntemps_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npress_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminorabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nextrabsorbers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nmixingfracs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nlayers_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nbnds_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ngpts_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(npairs_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(ncontributors_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_lower_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(nminor_absorber_intervals_upper_sw, 1, MPI_INTEGER, mpiroot, mpicomm, ierr)
#endif

! Allocate space for arrays
Expand Down Expand Up @@ -335,9 +335,9 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p
call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p_sw, size(temp_ref_p_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t_sw, size(temp_ref_t_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop_sw, size(press_ref_trop_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop_sw, 1, MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_DOUBLE_PRECISION, mpiroot, mpicomm, ierr)
Expand All @@ -351,9 +351,9 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p
call MPI_BCAST(scaling_gas_upper_sw, size(scaling_gas_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(vmr_ref_sw, size(vmr_ref_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(kmajor_sw, size(kmajor_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p_sw, size(temp_ref_p_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t_sw, size(temp_ref_t_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop_sw, size(press_ref_trop_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_p_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(temp_ref_t_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(press_ref_trop_sw, 1, MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(solar_source_sw, size(solar_source_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(rayl_lower_sw, size(rayl_lower_sw), MPI_REAL, mpiroot, mpicomm, ierr)
call MPI_BCAST(rayl_upper_sw, size(rayl_upper_sw), MPI_REAL, mpiroot, mpicomm, ierr)
Expand Down

0 comments on commit 782ecb0

Please sign in to comment.