Skip to content

Commit ff7c890

Browse files
committed
Merge branch 'rljacob/from-cime' (PR #70)
Bring over some changes that were made directly to mpeu m_ioutil: assume flush is always present. J.Edwards m_inpak90: increase size of i90_MXDEP J. Wolfe
2 parents ed2c38c + 8d30f9c commit ff7c890

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

mct/m_MCTWorld.F90

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ subroutine initm_(ncomps,globalcomm,mycomms,myids)
191191
! !REVISION HISTORY:
192192
! 20Sep07 - T. Craig migrated code from initd routine
193193
! 20Sep07 - T. Craig - made mycomms an array
194+
! 03Nov19 - J. Edwards - Add barrier to improve peformance on high proc counts
194195
!EOP ___________________________________________________________________
195196
!
196197
character(len=*),parameter :: myname_=myname//'::initm_'
@@ -315,6 +316,7 @@ subroutine initm_(ncomps,globalcomm,mycomms,myids)
315316
!
316317
! allocate space to hold global ids
317318
! only needed on root, but allocate everywhere to avoid complaints.
319+
! Don't allocate large size on non-root.
318320
if (myLid==0) then
319321
allocate(Gprocids(mysize),stat=ier)
320322
else
@@ -323,10 +325,12 @@ subroutine initm_(ncomps,globalcomm,mycomms,myids)
323325
if(ier/=0) call die(myname_,'allocate(Gprocids)',ier)
324326
! gather over the LOCAL comm
325327
call MPI_GATHER(myGid,1,MP_INTEGER,Gprocids,1,MP_INTEGER,0,mycomms(i),ier)
326-
call MPI_Barrier(mycomms(i), ier)
327-
328328
if(ier/=0) call die(myname_,'MPI_GATHER Gprocids',ier)
329329

330+
! This barrier needed for good performance on high-processor counts.
331+
call MPI_Barrier(mycomms(i), ier)
332+
if(ier/=0) call die(myname_,'MPI_Barrier Gprocids',ier)
333+
330334
if(myLid == 0) then
331335
call MPI_SEND(Gprocids,mysize,MP_INTEGER,0,myids(i),globalcomm,ier)
332336
if(ier /= 0) call MP_perr_die(myname_,'MPI_SEND(Gprocids)',ier)

mpeu/m_inpak90.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ module m_inpak90
297297
character(len=*),parameter :: myname='MCT(MPEU)::m_inpak90'
298298
!-----------------------------------------------------------------------
299299

300-
integer,parameter :: i90_MXDEP = 4
300+
integer,parameter :: i90_MXDEP = 5
301301
integer,save :: i90_depth = 0
302302
type(inpak90),save,pointer :: i90_now
303303

mpeu/m_ioutil.F90

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ subroutine luflush(unit)
410410
! 08Jul02 - E. Ong <[email protected]> - added flush support for nag95
411411
! 2001-11-08 Jace A Mogill <[email protected]> - Flush is not part of
412412
! the F90 standard. Default is NO unit flush.
413+
! 2020-08-03 - J. Edwards - flush is now supported by all fortran compilers
413414
!EOP
414415
!_______________________________________________________________________
415416
character(len=*),parameter :: myname_=myname//'::luflush'
@@ -423,15 +424,7 @@ subroutine luflush(unit)
423424
if(present(unit)) lu=unit
424425
if(lu < 0) return
425426

426-
! The following call may be system dependent.
427-
428-
#if SYSIRIX64 || CPRNAG || SYSUNICOS
429-
call flush(lu,ier)
430-
#elif SYSAIX || CPRXLF
431-
call flush_(lu) ! Function defined in xlf reference document.
432-
#elif SYSLINUX || SYSOSF1 || SYSSUNOS || SYST3E || SYSUNIXSYSTEMV || SYSSUPERUX
433427
call flush(lu)
434-
#endif
435428

436429
end subroutine luflush
437430
!-----------------------------------------------------------------------

0 commit comments

Comments
 (0)