I would like to read and write large datasets in Fortran using MPI-IO. My preferred approach was to use the MPI type defined with MPI_type_create_subarray, with one dimension, to describe the representation of each process in a file. My Fortran code is as follows:
! A contiguous type to describe the vector per element. ! MPI_TYPE_CONTIGUOUS(COUNT, OLDTYPE, NEWTYPE, IERROR) call MPI_Type_contiguous(nComponents, rk_mpi, & & me%vectype, iError) call MPI_Type_commit( me%vectype, iError ) ! A subarray to describe the view of this process on the file. ! MPI_TYPE_CREATE_SUBARRAY(ndims, array_of_sizes, array_of_subsizes, ! array_of_starts, order, oldtype, newtype, ierror) call MPI_Type_create_subarray( 1, [ globElems ], [ locElems ], & & [ elemOff ], MPI_ORDER_FORTRAN, & & me%vectype, me%ftype, iError)
However, array_of_sizes and array_of_starts, which describe global values, are simply "normal" integers in the MPI interface. Thus, with this approach, there is a limit of approximately 2 billion elements. Is there any other interface that uses MPI_OFFSET_KIND for these global values? The only way around this, I see so far, is using the move parameter in MPI_File_set_view instead of defining the view using the MPI subarray type. However, it "feels" wrong. Do you expect performance impact in any collective I / O approach? Does anyone know if this interface will change in MPI-3? Maybe I should use some other type of MPI?
What is the recommended solution here for writing large data files with collective IO efficiently parallel to the disk?