From 157ae5da0c8176155808f0076d233161137052c5 Mon Sep 17 00:00:00 2001 From: noel Date: Mon, 13 Mar 2023 12:28:02 -0700 Subject: [PATCH] Simplify by removing the copy_par routine which was used as the assignment operator. For 2 integers, init to zero in routine flow, instead of at declaration. [bfb] --- components/homme/src/share/parallel_mod.F90 | 37 ++++----------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/components/homme/src/share/parallel_mod.F90 b/components/homme/src/share/parallel_mod.F90 index c6860f756b93..69016a8a0636 100644 --- a/components/homme/src/share/parallel_mod.F90 +++ b/components/homme/src/share/parallel_mod.F90 @@ -52,9 +52,6 @@ module parallel_mod integer :: root ! local root integer :: nprocs ! number of processes in group integer :: comm ! local communicator -! integer :: node_comm ! local communicator of all procs per node -! integer :: node_rank ! local rank in node_comm -! integer :: node_nprocs ! local rank in node_comm logical :: masterproc logical :: dynproc ! Designation of a dynamics processor - AaronDonahue end type @@ -69,13 +66,6 @@ module parallel_mod ! =================================================== ! Module Interfaces ! =================================================== - - interface assignment ( = ) - module procedure copy_par - end interface - - - public :: initmp public :: initmp_from_par public :: init_par @@ -87,25 +77,6 @@ module parallel_mod contains -! ================================================ -! copy_par: copy constructor for parallel_t type -! -! -! Overload assignment operator for parallel_t -! ================================================ - - subroutine copy_par(par2,par1) - type(parallel_t), intent(out) :: par2 - type(parallel_t), intent(in) :: par1 - - par2%rank = par1%rank - par2%root = par1%root - par2%nprocs = par1%nprocs - par2%comm = par1%comm - par2%masterproc = par1%masterproc - - end subroutine copy_par - ! ================================================ ! initmp: ! Initializes the parallel (message passing) @@ -124,12 +95,16 @@ subroutine init_par(par,npes_in,npes_stride) integer(kind=int_kind) :: ierr logical :: running ! state of MPI at beginning of initmp call #ifdef CAM - integer :: color = 1 + integer :: color integer :: iam_cam, npes_cam integer :: npes_homme integer :: max_stride #endif - integer :: npes_cam_stride = 1 + integer :: npes_cam_stride +#ifdef CAM + color=1 +#endif + npes_cam_stride=1 !================================================ ! Basic MPI initialization ! ================================================