Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: jody (jody.xha_at_[hidden])
Date: 2007-07-10 10:53:07

I want to create datatypes of the form

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:
(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,
for the respective processors, and then call MPI_File_set_view
with displacement 0 and the respective datatypes fo the "filetype"
and finally let each processor write its stuff to file sequentially using

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