﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
682	Profile Report	arango	arango	"The routines '''wclock_on''' and '''wclock_off''' (t'''imers.F''') fail to report the profile timings in distributed-memory applications (MPI).  This has been broken for awhile since the OpenMP directives were re-worked (see src:ticket:552). In that update the '''numthreads''' was modified in MPI to have the number of distributed nodes:

{{{
      CALL mpi_comm_size (OCN_COMM_WORLD, numthreads, MyError)
}}}

This affected the logic in '''wclock_on''' and '''wclock_off''' in MPI applications, which needs '''numthreads = 1'''.  To correct this problem, both routines were modified to have:

{{{
!
!  Set number of subdivisions, same as for global reductions.
!
#ifdef MPI
      NSUB=1
#else
      NSUB=numthreads
#endif
}}}

then, we use '''NSUB''' instead of '''numthreads''' in the conditional statement in '''wclock_on''':

{{{
       IF (thread_count.eq.NSUB) thread_count=0
}}}


and in '''wclock_off''':

{{{
        IF (thread_count.eq.NSUB) THEN
          thread_count=0
          ...
        END IF
}}}

I also improved the time profile report in nested grid applications.

Many thanks to Kate Hedstrom for reminding me about this problem.
"	defect	closed	major	Release ROMS/TOMS 3.7	Nonlinear	3.7	Fixed		
