[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [bgl-discuss] Odd MPI-IO behavior.



The filetype must describe offsets that are monotonically nondecreasing (see
the defn. at http://www.mpi-forum.org/docs/mpi-20-html/node173.htm). The
datatype describing the memory buffer, i.e. the one passed to
MPI_File_read_all, has no restrictions. So you could do the permutation
there.

Rajeev 


> -----Original Message-----
> From: owner-discuss@xxxxxxxxxxxxxxx 
> [mailto:owner-discuss@xxxxxxxxxxxxxxx] On Behalf Of Robert Jacob
> Sent: Thursday, September 07, 2006 7:02 PM
> To: discuss@xxxxxxxxxxxxxxx
> Subject: [bgl-discuss] Odd MPI-IO behavior.
> 
> 
> Hello,
> 
> We are trying to read some data files for the Parallel Ocean 
> Program using 
> MPI-IO on BG/L and seeing an odd bug.   The bug seems to be 
> caused by using 
> a monotonic decreasing displacement array in the 
> MPI_type_create_indexed_block call.   The code works fine on 
> an IBM SP4 
> with GPFS but doesn't work on the Argonne and NCAR BG/L's.   The bug 
> manifests as a "hole" in the input data field.
> 
> A Fortran code fragment illustrating the calls are below.   
> Some possible 
> questions:
> 1.  Is a monotonic decreasing array legal in the displacement 
> array for 
> MPI_type_create_indexed_block?
> 2.  If so, is this possible a bug in BG/L's MPI?
> 
> Thanks,
> Rob Jacob
> John Dennis
> 
> 
> !-------------------------------------------------------------
> ---------- 
> --------------
> !  This displacement generates a bug on NCAR's and Argonne's BGL
> !   but works on NCAR's IBM Power4.
> displace = [48 40 32 24 16 8 0];
> 
> !  This displacement works on NCAR's and Argonne's BGL
> ! displace = [0 8 16 24 32 40 48];
> 
> 
> lenBLOCKS = 24
> baseTYPE = MPI_REAL8
> numBLOCKS = SIZE(displace)
> 
> !---------------------------------
> ! Create the elementary structure
> !---------------------------------
> call MPI_Type_contiguous(lenBLOCKS,baseTYPE,elemTYPE,ierr)
> call MPI_Type_commit(elemTYPE,ierr)
> 
> !---------------------------
> ! Create the file structure
> !---------------------------
> call
> MPI_Type_create_indexed_block(numBLOCKS,1,displace,elemTYPE,fi
> leTYPE,ier r)
> call MPI_Type_commit(fileTYPE,ierr)
> 
> !-----------------------
> !  Set the file view
> !-----------------------
> call MPI_File_set_view(File%fh,offset, elemTYPE, fileTYPE,
> datarep,File%info,ierr)
> 
> allocate(IOBUF(numBLOCKS*lenBLOCKS))
> IOBUF = specialVALUE
> !-----------------------------
> ! Read out distributed array
> !-----------------------------
> call MPI_file_read_all(File%fh,IOBUF,numBLOCKS,elemTYPE,fstatus,ierr)
> call MPI_get_count(fstatus,elemTYPE,cnt,ierr)
> 
> !------------------------------------------------------
> ! FAILURE:  Occurs when:
> !	COUNT(specialVALUE) != 0
> !		and
> !	  numBLOCKS == cnt
> !------------------------------------------------------
> print *,'COUNT(specialVALUE) :=', COUNT(IOBUF .eq. specialVALUE)
> print *,'numBLOCKS, cnt: ',numBLOCKS,cnt
> 
> !-------------------------------------------------------------
> ---------- 
> --------------
> 
> - --------------------------------------------------------------------
> To add or remove yourself from this mailing list, use the 'notifyme'
> command on any BGL machine. To remove: notifyme -n, to add: 
> notifyme -y.
> 
> 

- --------------------------------------------------------------------
To add or remove yourself from this mailing list, use the 'notifyme'
command on any BGL machine. To remove: notifyme -n, to add: notifyme -y.