[MPICH] ROMIO error

Yong Chen chenyon1 at iit.edu
Fri May 4 15:24:21 CDT 2007


Hi,

I kept getting the following error when I run the sample 
MPI_File_set_view() code,

Error: Unsupported datatype passed to ADIOI_Count_contiguous_blocks
[cli_0]: aborting job:
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
rank 0 in job 125  x86_32838   caused collective abort of all ranks
  exit status of rank 0: killed by signal 9

I did a debugging with gdb, the filetype caused the problem and 
MPI_File_set_view() threw the error. Indeed, if filetype is replaced 
with MPI_INT, it works well. Did a search on google, still cannot figure 
out why. Can anyone give me a clue? thanks very much! The following is 
the sample code.

#include "mpi.h"
int main( int argc, char *argv[] )
{
    MPI_Aint     lb, extent;
    MPI_Datatype etype, filetype, contig;
    MPI_Offset   disp;
    MPI_File     fh;
    int buf[1000];

    MPI_Init( &argc, &argv );
    /* ... other application code ... */
    MPI_File_open(MPI_COMM_WORLD, "datafile",
                  MPI_MODE_CREATE | MPI_MODE_RDWR, MPI_INFO_NULL, &fh);

    MPI_Type_contiguous(2, MPI_INT, &contig);
    lb     = 0;
    extent = 6 * sizeof(int);
    MPI_Type_create_resized(contig, lb, extent, &filetype);
    MPI_Type_commit(&filetype);

    disp  = 5 * sizeof(int);    /* assume displacement in this file view
                                   is of size equal to 5 integers */
    etype = MPI_INT;
/*    filetype = MPI_INT; */
    MPI_File_set_view(fh, disp, etype, filetype, "native",
                      MPI_INFO_NULL);
    MPI_File_write(fh, buf, 1000, MPI_INT, MPI_STATUS_IGNORE);
    /* ... */
    MPI_Finalize();
    return 0;
}


Thanks,
Yong





More information about the mpich-discuss mailing list