hi
I want to create datatypes of the form
XX000000...
00XX0000...
0000XX00...
etc.

I tried MPI_Type_indexed(1, ais, ait, MPI_SHORT, &dtNewType)
where ais= {2} and ait = {2} but this only gives me a datatype of the form
00XX, i.e. no holes at the end.

I guess MPI_Type_vector won't work, because there seems to be
no way to create holes at the beginning of the datatype


I need these datatypes to let each process write its data into the file
in the following way:
XXYYZZXXYYZZXXYYZZ....
(X is data from proc 0, Y is data from proc 1,  Z is data from proc 2)

My intended approach was to define  datatypes of the form XX0000, 00XX00,
0000XX
for the respective processors, and then  call  MPI_File_set_view
with displacement 0 and the respective datatypes fo the "filetype"
parameter,
and finally let each  processor write its stuff to file sequentially using
MPI_File_write.

However, my plan failed since i am unable to create datatypes with holes in
front and at the end.

What function should i use to create the desired datatypes?

Thank You

 Jody

Reply via email to