Skip to content

Commit

Permalink
Merge branch E3SM-Project/ndk/homme/simplify-assignment2 (PR #5523)
Browse files Browse the repository at this point in the history
Simplify by removing interface assignment and copy_par subroutine
  • Loading branch information
ndkeen authored Mar 16, 2023
2 parents 00ce36f + 157ae5d commit 353b46a
Showing 1 changed file with 6 additions and 31 deletions.
37 changes: 6 additions & 31 deletions components/homme/src/share/parallel_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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
! ================================================
Expand Down

0 comments on commit 353b46a

Please sign in to comment.