[MPICH] MPI_Type_create_resized problems

James S Perrin james.s.perrin at manchester.ac.uk
Tue Mar 21 09:19:37 CST 2006


Hi,
	I am trying to read some interlaced values from file

ABCABCABC....

where A B and C are all say floats. I had previously used the following 
deprecated code (that still works):

     types[0] = MPI_FLOAT;
     types[1] = MPI_UB;
     lens[0] = 1;
     lens[1] = 1;
     displs[0] = 0;
     displs[1] = file_extent*3;
     MPI_Type_struct(2, lens, displs, types, &filetype);
     MPI_Type_commit(&filetype);

where file_extent is the size of a float in the file. I would like to use the 
newer MPI2 version:

     MPI_Type_create_resized(MPI_FLOAT, 0, file_extent*3, &filetype);
     MPI_Type_commit(&filetype);

But I get a failure when trying to set my file view. I use disp to move the to 
first A,B or C. :

     MPI_File_set_view(fp, disp, MPI_FLOAT, filetype, "native", MPI_INFO_NULL);

  => Error: Unsupported datatype passed to ADIOI_Count_contiguous_blocks

Both filetypes look the same:

MPI_Type_extent 12
MPI_Type_size 4
MPI_Type_lb 0
MPI_Type_ub 12

Are there any limitations in using MPI_Type_create_resized for Data IO 
especially on Windows (NTFS) or do I have a bug in my code?

Regards
James
-- 
-----------------------------------------------------------------------------
James S. Perrin,                   | email: james.perrin at manchester.ac.uk
Manchester Visualization Centre,   | www.sve.man.ac.uk/General/Staff/perrin
Kilburn Building, The University,  | tel: +44 161 275 6945
Manchester, England. M13 9PL.      | fax: +44 161 275 6800/6040
-----------------------------------------------------------------------------
"The test of intellect is the refusal to belabour the obvious" -Alfred Bester
-----------------------------------------------------------------------------




More information about the mpich-discuss mailing list