Skip to content

Commit 41072c1

Browse files
authored
Remove unnecessary check npes>1 (ESCOMP#384)
Tag name (required for release branches): Originator(s): cacraig Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number): - closes ESCOMP#132 (npes > 1 check) Describe any changes made to build system: N/A Describe any changes made to the namelist: N/A List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A List all files eliminated and why: N/A List all files added and what they do: N/A List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) M src/data/ref_pres.F90 M src/dynamics/utils/vert_coord.F90 M src/physics/utils/physics_grid.F90 - removed unnecessary NPES > 1 checks If there are new failures (compared to the `test/existing-test-failures.txt` file), have them OK'd by the gatekeeper, note them here, and add them to the file. If there are baseline differences, include the test and the reason for the diff. What is the nature of the change? Roundoff? derecho/intel/aux_sima: All Pass derecho/gnu/aux_sima: All Pass If this changes climate describe any run(s) done to evaluate the new climate in enough detail that it(they) could be reproduced: CAM-SIMA date used for the baseline comparison tests if different than latest:
1 parent 394446b commit 41072c1

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

src/data/ref_pres.F90

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,11 @@ subroutine ref_pres_readnl(nlfile)
9494
end if
9595
end if
9696

97-
if (npes > 1) then
98-
! Broadcast namelist variables
99-
call mpi_bcast(trop_cloud_top_press, 1, mpi_real8, masterprocid, mpicom, ierr)
100-
call mpi_bcast(clim_modal_aero_top_press, 1, mpi_real8, masterprocid, mpicom, ierr)
101-
call mpi_bcast(do_molec_press, 1, mpi_real8, masterprocid, mpicom, ierr)
102-
call mpi_bcast(molec_diff_bot_press, 1, mpi_real8, masterprocid, mpicom, ierr)
103-
endif
97+
! Broadcast namelist variables
98+
call mpi_bcast(trop_cloud_top_press, 1, mpi_real8, masterprocid, mpicom, ierr)
99+
call mpi_bcast(clim_modal_aero_top_press, 1, mpi_real8, masterprocid, mpicom, ierr)
100+
call mpi_bcast(do_molec_press, 1, mpi_real8, masterprocid, mpicom, ierr)
101+
call mpi_bcast(molec_diff_bot_press, 1, mpi_real8, masterprocid, mpicom, ierr)
104102

105103
end subroutine ref_pres_readnl
106104

src/dynamics/utils/vert_coord.F90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,8 @@ subroutine vert_coord_readnl(nlfile)
6767
end if
6868
end if
6969

70-
if (npes > 1) then
71-
! Broadcast namelist variables
72-
call mpi_bcast(pver, 1, mpi_integer, masterprocid, mpicom, ierr)
73-
endif
70+
! Broadcast namelist variables
71+
call mpi_bcast(pver, 1, mpi_integer, masterprocid, mpicom, ierr)
7472

7573
end subroutine vert_coord_readnl
7674

src/physics/utils/physics_grid.F90

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,12 @@ subroutine phys_grid_init(hdim1_d_in, hdim2_d_in, dycore_name_in, &
285285
file=__FILE__, line=__LINE__)
286286

287287
! We need a global minimum longitude and latitude
288-
if (npes > 1) then
289-
temp = lonmin
290-
call MPI_allreduce(temp, lonmin, 1, MPI_INTEGER, MPI_MIN, &
291-
mpicom, ierr)
292-
temp = latmin
293-
call MPI_allreduce(temp, latmin, 1, MPI_INTEGER, MPI_MIN, &
294-
mpicom, ierr)
295-
end if
288+
temp = lonmin
289+
call MPI_allreduce(temp, lonmin, 1, MPI_INTEGER, MPI_MIN, &
290+
mpicom, ierr)
291+
temp = latmin
292+
call MPI_allreduce(temp, latmin, 1, MPI_INTEGER, MPI_MIN, &
293+
mpicom, ierr)
296294
! Create lon coord map which only writes from one of each unique lon
297295
where(latvals == latmin)
298296
coord_map(:) = grid_map(3, :)

0 commit comments

Comments
 (0)