[MPICH2-dev] implementing MPID_Wtick()

William Gropp gropp at mcs.anl.gov
Thu Oct 11 14:36:52 CDT 2007


David,

You should be able to just define the MPID_Wtime functions  
(MPID_Wtime, MPID_Wtime_diff, MPID_Wtime_todouble, MPID_Wtime_acc,  
and MPID_Wtick.  However, it looks like we may need to change the top  
level configure to allow you to specify "device provides timer".   
Would that be ok?

Bill

On Oct 11, 2007, at 1:50 PM, David Gingold wrote:

> Bill --
>
> I agree that it would be cleaner just to supply our own  
> implementations of those MPID functions, but I don't see how to do  
> it easily within the existing structure of the MPICH2 code.  The  
> code in src/mpi/timer/mpidtime.c is always built into the library  
> (I think), but in our case I'd like to override that with device- 
> specific code in src/mpid/sc, where our MPID implementation lives.
>
> You see what I'm saying?  Am I missing a way to do this?
>
> -dg
>
> ....
>
> On Oct 10, 2007, at 2:57 PM, William Gropp wrote:
>
>> David,
>> The original thinking was that the device would provide its own  
>> MPID_Wtime/MPID_Wtick implementation, overriding the default  
>> implementations.  That's what I'd prefer, rather than adding yet  
>> another option to configure :) .  Let us know if that won't work  
>> for you.
>>
>> Bill
>>
>> On Oct 10, 2007, at 1:09 PM, David Gingold wrote:
>>
>>> Here is a question about implementing MPID_Wtick() in MPICH2:
>>>
>>> We're presently using gettimeofday() on our system to implement  
>>> MPI_Wtime().  As far as I know, there is no way to ask Linux what  
>>> the resolution of gettimeofday() is, but I happen to know the  
>>> answer in our case: 1 microsecond.  The "generic" implementation  
>>> of MPID_Wtick() tries to determine this, but now and then it  
>>> returns different values for different ranks.
>>>
>>> To solve this, I'm inclined to add a parameter to configure.in  
>>> that lets me specify, at build time, the value that MPI_Wtick()  
>>> should return.  Is there a better way?  Is it expected, for  
>>> example, that an ADI3 implementation might provide its own  
>>> versions of the functions in src/mpid/timer/mpidtime.c, replacing  
>>> or overriding what is there?
>>>
>>> -dg
>>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mcs.anl.gov/mailman/private/mpich2-dev/attachments/20071011/5fda57f3/attachment.htm>


More information about the mpich2-dev mailing list