Skip to content

Commit

Permalink
Added some print statements to diagnose MPI init.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Dec 9, 2019
1 parent 26cc6b1 commit f471f79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions physics/rrtmgp_sw_gas_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p

! Broadcast dimensions to all processors
#ifdef MPI
write(*,*) "mpiroot: ",mpiroot
write(*,*) "mpicomm: ",mpicomm
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)
Expand Down Expand Up @@ -204,6 +206,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p

! On master processor, read in fields, broadcast to all processors
if (mpirank .eq. mpiroot) then
write (*,*) 'Reading RRTMGP shortwave k-distribution data ... '
! Read in fields from file
if(nf90_open(trim(sw_gas_props_file), NF90_WRITE, ncid_sw) .eq. NF90_NOERR) then
status = nf90_inq_varid(ncid_sw,'gas_names',varID)
Expand Down Expand Up @@ -312,6 +315,7 @@ subroutine rrtmgp_sw_gas_optics_init(Model, mpicomm, mpirank, mpiroot, sw_gas_p

! Broadcast arrays to all processors
#ifdef MPI
write (*,*) 'Broadcasting RRTMGP shortwave k-distribution data ... '
call MPI_BCAST(minor_limits_gpt_upper_sw, size(minor_limits_gpt_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(minor_limits_gpt_lower_sw, size(minor_limits_gpt_lower_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
call MPI_BCAST(kminor_start_upper_sw, size(kminor_start_upper_sw), MPI_INTEGER, mpiroot, mpicomm, ierr)
Expand Down

0 comments on commit f471f79

Please sign in to comment.