This is maybe a dumb question but,
I would like that N
processors write all a different byte count
in the same file with a different offset
to make the data contignously.
I would like to use MPI_File_write_all(file,data,count,type,status)
(individual file pointers, collective, blocking) function.
The first question can each processor specify a different value for the count
parameter?
I could not find anything mentioned in the MPI 3.0 reference. (My intention is that it is not possible?)
What I found out so far is the following two problems:
When I want to write a large amount of MPI_BYTES
the integer (32bit) count
in the MPI_File_write... functions is to little and gives overflow of course!
I do not (cannot)/want to use a derived data type in MPI because as mentioned above all processor write a different byte count
and the type is MPI_BYTES
Thanks for any help on this topic!
You've rolled up a few questions here
Absolutely, proceses can specify different or even zero amounts of data to the collective MPI_File_write_all
routine. Not only can the count
parameter differ, there's no reason the datatype
parameter needs to be the same either.
Problem #1: If you want to write more than an int
worth of MPI_BYTE data, you'll have to create a new datatpye. For example, let's say you wanted to write 9 billion bytes. Create a contig type of size 1 billion, then write 9 of those. (if the amount of data you want to write is not evenly divisible, you might need an hindexed or struct type).
problem #2: It's not at all a problem to have every MPI process create its own datatype or count of datatype.