Capturing Message Time

This is a discussion on Capturing Message Time within the Linux Programming forums, part of the Platform Specific Boards category; I am having difficulty finding the time is takes to send a message via MPI from one processor to another. ...

  1. #1
    PhysicistTurnedProgrammer Cell's Avatar
    Join Date
    Jan 2009
    Location
    New Jersey
    Posts
    72

    Capturing Message Time

    I am having difficulty finding the time is takes to send a message via MPI from one processor to another. The difficult step here is that these processors are of different architectures. They are connected via a network.

    I am looking just for the time it takes to send a message. I've tried a few different things, but I'm just getting bad results.

    Any ideas for how this can be done? Whenever I Google it, I get a bunch of sites that just have information on the function MPI_Wtime(), which is what I have been using.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,535
    MPI_Wtime
    Is your 'time' synchronised?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    PhysicistTurnedProgrammer Cell's Avatar
    Join Date
    Jan 2009
    Location
    New Jersey
    Posts
    72
    Yes, I believe so.

  4. #4
    PhysicistTurnedProgrammer Cell's Avatar
    Join Date
    Jan 2009
    Location
    New Jersey
    Posts
    72
    I guess the issue I'm trying to work out is the concurrency of the situation.

    The idea I've been using is essentially:

    Code:
    if(myrank == 0){
       start_time = MPI_WTIME
       SEND_MSG
    }
    
    if(myrank != 0){
       RECEIVE_MSG
    }
    
    if(myrank == 0){
         end_time = MPI_WTIME
    }
    And the idea I had was that once I arrived at the third 'if' statement, the message must have been received and I'd log the time. However, I do not believe this is correct. I don't think I am considering the concurrency of the code here.

    So, my question is, on a high level - how do I log the communication time between these processors when I am using different processes, different architectures, and MPI for communication.

    One idea I had was to do the MPI send and receive in a separate function and then wrap the MPI_WTIMEs around that function. However, I do not believe that is correct either.

    Any ideas?

  5. #5
    PhysicistTurnedProgrammer Cell's Avatar
    Join Date
    Jan 2009
    Location
    New Jersey
    Posts
    72
    You know, I'm wondering if it is enough to measure just the time it takes to send a message?

    Perhaps I am making this problem out to be more difficult than it is.

    For example:

    Code:
    start_time = MPI_WTIME
    SEND_MSG
    end_time = MPI_WTIME
    Would this give me the communication time for a message sent between two processors?

    I am assuming that when the SEND_MSG function is finished the message is sent. So instead of trying to start the measuring timer on the sending processor and ending the message timer on the receiving processor, I can just measure around the send function and that is how long it took to send - or communicate - the message.

    Is this logic sound? If so, my problem has become much, much easier!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Desperate Over Ecs!
    By cookie in forum C Programming
    Replies: 17
    Last Post: 07-16-2008, 01:25 PM
  2. Making a script language?
    By Blackroot in forum Game Programming
    Replies: 10
    Last Post: 02-16-2006, 01:22 AM
  3. Read and set\change system time
    By Hexxx in forum C++ Programming
    Replies: 9
    Last Post: 01-02-2006, 06:11 AM
  4. Killing someones grandparents
    By nickname_changed in forum A Brief History of Cprogramming.com
    Replies: 37
    Last Post: 09-07-2003, 07:56 AM
  5. The Timing is incorret
    By Drew in forum C++ Programming
    Replies: 5
    Last Post: 08-28-2003, 04:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21