Skip to content

Commit

Permalink
Correction to MPI calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Jul 1, 2019
1 parent f7915b9 commit 7f8fc0b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
28 changes: 14 additions & 14 deletions physics/rrtmgp_lw_cloud_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,19 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou
! Broadcast arrays to all processors
#ifdef MPI
if (Model%rrtmgp_cld_optics .eq. 1) then
call MPI_BCAST(radliq_lwr, size(radliq_lwr), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_upr, size(radliq_upr), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_fac, size(radliq_fac), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_lwr, size(radice_lwr), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_upr, size(radice_upr), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_fac, size(radice_fac), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_lwr, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_upr, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_fac, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_lwr, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_upr, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_fac, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_extliq, size(lut_extliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_ssaliq, size(lut_ssaliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_asyliq, size(lut_asyliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_extice, size(lut_extice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_ssaice, size(lut_ssaice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_asyice, size(lut_asyice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy , size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr)
endif
if (Model%rrtmgp_cld_optics .eq. 2) then
call MPI_BCAST(pade_extliq, size(pade_extliq), kind_phys, mpiroot, mpicomm, ierr)
Expand All @@ -285,13 +285,13 @@ subroutine rrtmgp_lw_cloud_optics_init(Model, mpicomm, mpirank, mpiroot, lw_clou
call MPI_BCAST(pade_extice, size(pade_extice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_ssaice, size(pade_ssaice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_asyice, size(pade_asyice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extliq), size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaliq), size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyliq), size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extice), size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaice), size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyice), size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy), size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extliq, size(pade_sizereg_extliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaliq, size(pade_sizereg_ssaliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyliq, size(pade_sizereg_asyliq), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extice, size(pade_sizereg_extice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaice, size(pade_sizereg_ssaice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyice, size(pade_sizereg_asyice), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy, size(band_lims_cldy), kind_phys, mpiroot, mpicomm, ierr)
endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion physics/rrtmgp_lw_gas_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ subroutine rrtmgp_lw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot,

! Local variables
integer :: ncid_lw,dimID,varID,status,iGas
integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4
integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4
character(len=264) :: lw_gas_props_file
integer,parameter :: max_strlen=256

Expand Down
28 changes: 14 additions & 14 deletions physics/rrtmgp_sw_cloud_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,19 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud
! Broadcast arrays to all processors
#ifdef MPI
if (Model%rrtmgp_cld_optics .eq. 1) then
call MPI_BCAST(radliq_lwr_sw, size(radliq_lwr_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_upr_sw, size(radliq_upr_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_fac_sw, size(radliq_fac_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_lwr_sw, size(radice_lwr_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_upr_sw, size(radice_upr_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_fac_sw, size(radice_fac_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_lwr_sw, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_upr_sw, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radliq_fac_sw, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_lwr_sw, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_upr_sw, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(radice_fac_sw, 1, kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_extliq_sw, size(lut_extliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_ssaliq_sw, size(lut_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_asyliq_sw, size(lut_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_extice_sw, size(lut_extice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_ssaice_sw, size(lut_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(lut_asyice_sw, size(lut_asyice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr)
endif
if (Model%rrtmgp_cld_optics .eq. 2) then
call MPI_BCAST(pade_extliq_sw, size(pade_extliq_sw), kind_phys, mpiroot, mpicomm, ierr)
Expand All @@ -285,13 +285,13 @@ subroutine rrtmgp_sw_cloud_optics_init(Model,mpicomm, mpirank, mpiroot, sw_cloud
call MPI_BCAST(pade_extice_sw, size(pade_extice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_ssaice_sw, size(pade_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_asyice_sw, size(pade_asyice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extliq_sw), size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaliq_sw), size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyliq_sw), size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extice_sw), size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaice_sw), size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyice_sw), size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy_sw), size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extliq_sw, size(pade_sizereg_extliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaliq_sw, size(pade_sizereg_ssaliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyliq_sw, size(pade_sizereg_asyliq_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_extice_sw, size(pade_sizereg_extice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_ssaice_sw, size(pade_sizereg_ssaice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(pade_sizereg_asyice_sw, size(pade_sizereg_asyice_sw), kind_phys, mpiroot, mpicomm, ierr)
call MPI_BCAST(band_lims_cldy_sw, size(band_lims_cldy_sw), kind_phys, mpiroot, mpicomm, ierr)
endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion physics/rrtmgp_sw_gas_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, Radtend, mpicomm, mpirank, mpiroot,

! Local variables
integer :: status,ncid_sw,dimid,varID,iGas
integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4
integer,dimension(:),allocatable :: temp1,temp2,temp3,temp4, temp_log_array1, temp_log_array2, temp_log_array3, temp_log_array4
character(len=264) :: sw_gas_props_file

! Initialize
Expand Down

0 comments on commit 7f8fc0b

Please sign in to comment.