[mpich-discuss] ROMIO: view and type_indexed with holes at the end
    Pascal Deveze 
    Pascal.Deveze at bull.net
       
    Mon Mar  8 08:03:37 CST 2010
    
    
  
Hi all,
I found a strange behaviour of  ROMIO with a type indexed datatype that 
is contains holes.
My definition:
       lng[0]= 0;
       dsp[0]= 0; ==> hole at first element
       lng[1]= 1;
       dsp[1]= 1; ===> one element
       lng[2]= 0;
       dsp[2]= 3; ====> hole at the end
       MPI_Type_indexed(3, lng, dsp, MPI_INTEGER, &filetype);
       MPI_Type_commit(&filetype);
       MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY , 
MPI_INFO_NULL, &fh);
       MPI_File_set_view(fh, 0, MPI_INTEGER, filetype,"native", 
MPI_INFO_NULL);
This definition works fine: One element with one hole at the beginning 
and 2 holes at the end.
It works also fine when dsp[2] > 3.
But it does not work with dsp[2]=2. In that case, there is no hole at 
the end.
Attached is a small program to reproduce the error.
I do not find if the MPI standard allows to introduce "holes" in the 
indexed datatype (specifiing lng[i]=0) or does'nt.
In any case, it seems to work in all cases excepted if only one hole is 
specified at the end (dsp[2] = 2).
Is this a bug in ROMIO or a limit of the MPI standard ?
Pascal
    
    
More information about the mpich-discuss
mailing list