Slashdot Mirror


Looking for Portable MPI I/O Implementation?

rikt writes "I am trying to implement MPI I/O for our CFD product. I am facing a problem with the portability of the generated data files. MPI2 interface describes a way to achieve this either by using 'external32' or user defined data representations. The problem is that ROMIO, the most widely available MPI I/O implementation, has not implemented support for any data representation other than 'native'. Do you know of any MPI I/O implementation that supports this, and is available on various platforms? I know IBM and Sun supports this, but I am looking for a solution on Linux and Windows (both 32 & 64 bit) as well."

2 of 36 comments (clear)

  1. Re:Huh? by Usquebaugh · · Score: 2, Insightful

    Go away and read.

    I hate the drivel question asked on /. This type of question is great, it usually means I'll go off and read up on this stuff.

  2. Maybe I am missing something by sfcat · · Score: 2, Insightful
    But I think native is just a bit vector. So implementing your own messages on top of it is possible assuming that you won't have to move messages between little endian and big endian machines and the compilers for the various machines implments the structs (or other data structures) the same in memory.

    Think of it this way.

    /* for each type of message make sure int messageType; is the first element of each struct and messageSize is the second element of each struct*/

    typedef struct MessageStruct {

    int messageType;

    int messageSize;

    /* some message data*/

    } Message;

    ...

    /* we send the message here*/

    Message msg;

    msg.type = messageType;

    msg.size = sizeof(Message);

    msg.data = someData; /* repeat for each part of the message struct*/

    SendMessage(&msg, msg.size);

    /* we receive the message here*/

    MPIMessage msg;

    if (msg.size == sizeof(Message)) {

    Message *msg = &msg;

    /* do stuff with message */

    }

    I think something along these lines should work. Just make a struct for each type of message your app has. Then check the size and type elements of the structs to determine which type of message you have recieved. You can also just make a struct with just a type and size field and copy the first 8 bytes of the message into that and use that to determine the type of message. I'm sure I am missing some implementation details, but something like this should handle your problem.

    --
    "Those that start by burning books, will end by burning men."