[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.3-213-gc26861b

Service Account noreply at mpich.org
Thu Nov 13 20:10:05 CST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  c26861ba3ff025bb62351acf1d74945581f5c59c (commit)
       via  66fa21c77151c7a68a5525d8d6311e7bfea4ddb7 (commit)
       via  30da9161a6c21f8dfb4a115e45fd52081ddf6a5d (commit)
       via  48c38c08fa002e2cd042b141ebacdec1786fbfe7 (commit)
       via  56fee8ce9b43db1668d5d9dad3acfab1c42e9a33 (commit)
      from  3f060b9f7da8a534fdd258a9b1dd490af4fcf3c4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/c26861ba3ff025bb62351acf1d74945581f5c59c

commit c26861ba3ff025bb62351acf1d74945581f5c59c
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Wed Nov 12 12:50:17 2014 -0600

    Support spaces after @whatever@ in testlist
    
    It makes testlist.in files more flexible and easier to read
    
    Signed-off-by: Sangmin Seo <sseo at anl.gov>

diff --git a/maint/f77tof90.in b/maint/f77tof90.in
index 3be22ed..b6ecccc 100644
--- a/maint/f77tof90.in
+++ b/maint/f77tof90.in
@@ -472,7 +472,7 @@ sub ConvertTestlist {
 	    # Cray-style pointers for MPI_Alloc_mem).
 	    $_ = "\@ALLOCMEMFC\@\n";
 	}
-	elsif (/^(\@\w+\@)(\w+f)\s+(.*)/) {
+	elsif (/^(\@\w+\@)(\s*\w+f)\s+(.*)/) {
 	    # This handles the case where an autoconf variable in the
             # testlist.in file is used to optionally comment out a test
 	    $_ = $1 . $2 . "90 "  . $3 . "\n";

http://git.mpich.org/mpich.git/commitdiff/66fa21c77151c7a68a5525d8d6311e7bfea4ddb7

commit 66fa21c77151c7a68a5525d8d6311e7bfea4ddb7
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Mon Nov 10 17:22:28 2014 -0600

    Add Fortran tests for nonblocking collective I/O
    
    No review since F08 binding is experimental now.

diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index 60e69d4..5459964 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -38,6 +38,7 @@
 /f77/init/checksizes.c
 /f90/datatype/allctypesf90.f90
 /io/test.ord
+/io/i_setviewcur
 /threads/pt2pt/greq_test
 /threads/pt2pt/greq_wait
 /threads/pt2pt/multisend
@@ -246,6 +247,7 @@
 /f77/io/writeordbef.f
 /f77/io/writeshf.f
 /f77/io/writeatallf.f
+/f77/io/iwriteatallf.f
 /f77/io/writeatallbef.f
 /f77/io/writeallbef.f
 /f77/io/iwritef
@@ -259,6 +261,7 @@
 /f77/io/writeatall
 /f77/io/writeatallbef
 /f77/io/writeallbef
+/f77/io/i_setviewcurf
 /f77/io/iooffset.h
 /f77/io/iodisp.h
 /f77/io/ioaint.h
@@ -343,6 +346,7 @@
 /f90/io/writeordbef90.f90
 /f90/io/writeshf90.f90
 /f90/io/writeatallf90.f90
+/f90/io/iwriteatallf90.f90
 /f90/io/writeatallbef90.f90
 /f90/io/writeallbef90.f90
 /f90/io/c2f2ciof90.f90
@@ -350,8 +354,10 @@
 /f90/io/c2f90multio.c
 /f90/io/Makefile.sm
 /f90/io/testlist
+/f90/io/testlist.in
 /f90/io/ioharness.defn
 /f90/io/ioharness.tlt
+/f90/io/i_setviewcurf90.f90
 /f90/misc/sizeof
 /f90/misc/f77tof90
 /f90/pt2pt/Makefile.sm
@@ -442,6 +448,9 @@
 /f08/datatype/get_elem_d
 /f08/datatype/get_elem_u
 /f08/rma/testlist
+/f08/io/iwriteatallf90.f90
+/f08/io/iwriteatallf90
+/f08/io/i_fcoll_test
 /group/errstring
 /group/grouptest
 /group/groupcreate
@@ -798,6 +807,8 @@
 /f77/io/setviewcurf
 /f77/io/shpositionf
 /f77/io/writeatallf
+/f77/io/iwriteatallf
+/f77/io/testlist
 /f77/pt2pt/allpairf
 /f77/pt2pt/greqf
 /f77/pt2pt/mprobef
@@ -866,6 +877,7 @@
 /f90/io/writeallf90
 /f90/io/writeatallbef90
 /f90/io/writeatallf90
+/f90/io/iwriteatallf90
 /f90/io/writeatf90
 /f90/io/writef90
 /f90/io/writeordbef90
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index 2ce7df8..26a9d95 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -1547,6 +1547,7 @@ AC_OUTPUT(maint/testmerge \
           f77/io/iooffset.h \
           f77/io/iodisp.h \
           f77/io/ioaint.h \
+          f77/io/testlist \
 	  f77/profile/Makefile \
           f90/Makefile \
           f90/attr/Makefile \
@@ -1566,6 +1567,7 @@ AC_OUTPUT(maint/testmerge \
           f90/ext/Makefile \
           f90/ext/testlist \
           f90/io/Makefile \
+          f90/io/testlist \
           f90/misc/Makefile \
 	      f90/profile/Makefile \
 	  f08/Makefile \
@@ -1579,6 +1581,7 @@ AC_OUTPUT(maint/testmerge \
 	      f08/subarray/Makefile \
 	      f08/topo/Makefile \
 	      f08/io/Makefile \
+	      f08/io/testlist \
           f08/init/Makefile \
           f08/info/Makefile \
           f08/spawn/Makefile \
diff --git a/test/mpi/f08/io/Makefile.am b/test/mpi/f08/io/Makefile.am
index e69d4de..a81572d 100644
--- a/test/mpi/f08/io/Makefile.am
+++ b/test/mpi/f08/io/Makefile.am
@@ -7,7 +7,7 @@
 
 include $(top_srcdir)/Makefile_f08.mtest
 
-EXTRA_DIST = testlist
+EXTRA_DIST = testlist.in
 
 # avoid having to write many "foo_SOURCES = foo.f90" lines
 AM_DEFAULT_SOURCE_EXT = .f90
@@ -34,6 +34,11 @@ noinst_PROGRAMS = \
     c2f90multio \
     c2f2ciof90
 
+if BUILD_MPIX_TESTS
+noinst_PROGRAMS += \
+    i_fcoll_test \
+    iwriteatallf90
+endif
 
 # We don't want to distribute these source files because they are created by
 # "testmerge", hence "nodist_foo_SOURCES"
@@ -49,6 +54,7 @@ nodist_writef90_SOURCES        = writef90.f90
 nodist_writeordbef90_SOURCES   = writeordbef90.f90
 nodist_writeordf90_SOURCES     = writeordf90.f90
 nodist_writeshf90_SOURCES      = writeshf90.f90
+nodist_iwriteatallf90_SOURCES  = iwriteatallf90.f90
 
 c2f90multio_SOURCES     = c2f90multio.c
 # this is a C only program, so we must either:
@@ -68,6 +74,7 @@ c2f2ciof90_SOURCES = c2f2ciof90.f90 c2f902cio.c
 # these files are genereated using testmerge (see below)
 generated_io_sources = \
     iwriteatf90.f90        \
+    iwriteatallf90.f90     \
     iwritef90.f90          \
     iwriteshf90.f90        \
     writeallbef90.f90      \
diff --git a/test/mpi/f08/io/i_fcoll_test.f90 b/test/mpi/f08/io/i_fcoll_test.f90
new file mode 100644
index 0000000..29bc82a
--- /dev/null
+++ b/test/mpi/f08/io/i_fcoll_test.f90
@@ -0,0 +1,155 @@
+! -*- Mode: Fortran; -*-
+!
+!  (C) 2014 by Argonne National Laboratory.
+!  See COPYRIGHT in top-level directory.
+!
+program main
+use mpi_f08
+
+implicit none
+!include 'mpif.h'
+
+! Fortran 2008 equivalent of src/mpi/romio/test/coll_test.c
+
+integer FILESIZE
+parameter (FILESIZE=32*32*32*4)
+
+! A 32^3 array. For other array sizes, change FILESIZE above and
+! array_of_gsizes below.
+
+! Uses collective I/O. Writes a 3D block-distributed array to a file
+! corresponding to the global array in row-major (C) order, reads it
+! back, and checks that the data read is correct.
+
+! Note that the file access pattern is noncontiguous.
+
+integer i, ndims, array_of_gsizes(3)
+integer order, intsize, nprocs, j, array_of_distribs(3)
+integer array_of_dargs(3), array_of_psizes(3)
+integer readbuf(FILESIZE), writebuf(FILESIZE), bufcount
+integer mynod, tmpbuf(FILESIZE), array_size, argc
+integer ierr
+character*256 str   ! used to store the filename
+integer errs, toterrs
+integer(MPI_OFFSET_KIND) :: disp
+
+type(MPI_Datatype) ::  newtype
+type(MPI_Status) :: status
+type(MPI_Request) :: request
+type(MPI_File) :: fh
+
+errs = 0
+str = "iotest.txt"
+
+call MPI_INIT(ierr)
+call MPI_COMM_SIZE(MPI_COMM_WORLD, nprocs, ierr)
+call MPI_COMM_RANK(MPI_COMM_WORLD, mynod, ierr)
+
+! create the distributed array filetype
+
+ndims = 3
+order = MPI_ORDER_FORTRAN
+
+array_of_gsizes(1) = 32
+array_of_gsizes(2) = 32
+array_of_gsizes(3) = 32
+
+array_of_distribs(1) = MPI_DISTRIBUTE_BLOCK
+array_of_distribs(2) = MPI_DISTRIBUTE_BLOCK
+array_of_distribs(3) = MPI_DISTRIBUTE_BLOCK
+
+array_of_dargs(1) = MPI_DISTRIBUTE_DFLT_DARG
+array_of_dargs(2) = MPI_DISTRIBUTE_DFLT_DARG
+array_of_dargs(3) = MPI_DISTRIBUTE_DFLT_DARG
+
+do i=1, ndims
+   array_of_psizes(i) = 0
+end do
+
+call MPI_DIMS_CREATE(nprocs, ndims, array_of_psizes, ierr)
+
+call MPI_TYPE_CREATE_DARRAY(nprocs, mynod, ndims,   &
+     array_of_gsizes, array_of_distribs, array_of_dargs,  &
+     array_of_psizes, order, MPI_INTEGER, newtype, ierr)
+
+call MPI_TYPE_COMMIT(newtype, ierr)
+
+! initialize writebuf
+
+call MPI_TYPE_SIZE(newtype, bufcount, ierr)
+call MPI_TYPE_SIZE(MPI_INTEGER, intsize, ierr)
+bufcount = bufcount/intsize
+do i=1, bufcount
+   writebuf(i) = 1
+end do
+
+do i=1, FILESIZE
+   tmpbuf(i) = 0
+end do
+
+call MPI_IRECV(tmpbuf, 1, newtype, mynod, 10, MPI_COMM_WORLD, request, ierr)
+call MPI_SEND(writebuf, bufcount, MPI_INTEGER, mynod, 10, MPI_COMM_WORLD, ierr)
+call MPI_WAIT(request, status, ierr)
+
+j = 1
+array_size = array_of_gsizes(1) * array_of_gsizes(2) * array_of_gsizes(3)
+do i=1, array_size
+   if (tmpbuf(i) .ne. 0) then
+      writebuf(j) = i
+      j = j + 1
+   end if
+end do
+
+! end of initialization
+
+! write the array to the file
+
+call MPI_FILE_OPEN(MPI_COMM_WORLD, str, MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr)
+
+disp = 0
+call MPI_FILE_SET_VIEW(fh, disp, MPI_INTEGER, newtype, "native", MPI_INFO_NULL, ierr)
+call MPIX_FILE_IWRITE_ALL(fh, writebuf, bufcount, MPI_INTEGER, request, ierr)
+call MPI_WAIT(request, status, ierr)
+call MPI_FILE_CLOSE(fh, ierr)
+
+!now read it back
+
+call MPI_FILE_OPEN(MPI_COMM_WORLD, str, MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr)
+
+call MPI_FILE_SET_VIEW(fh, disp, MPI_INTEGER, newtype, "native", MPI_INFO_NULL, ierr)
+call MPIX_FILE_IREAD_ALL(fh, readbuf, bufcount, MPI_INTEGER, request, ierr)
+call MPI_WAIT(request, status, ierr)
+call MPI_FILE_CLOSE(fh, ierr)
+
+! check the data read
+do i=1, bufcount
+   if (readbuf(i) .ne. writebuf(i)) then
+      errs = errs + 1
+       print *, 'Node ', mynod, '  readbuf ', readbuf(i),  &
+          '  writebuf ', writebuf(i), '  i', i
+   end if
+end do
+
+call MPI_TYPE_FREE(newtype, ierr)
+
+if (mynod .eq. 0) then
+    call MPI_FILE_DELETE(str, MPI_INFO_NULL, ierr)
+    if (ierr .ne. MPI_SUCCESS) then
+        errs = errs + 1
+    endif
+endif
+
+call MPI_Allreduce( errs, toterrs, 1, MPI_INTEGER, MPI_SUM, MPI_COMM_WORLD, ierr )
+
+if (mynod .eq. 0) then
+  if( toterrs .gt. 0 ) then
+     print *, 'Found ', toterrs, ' errors'
+  else
+     print *, ' No Errors'
+  endif
+endif
+
+call MPI_FINALIZE(ierr)
+
+stop
+end
diff --git a/test/mpi/f08/io/ioharness.defn b/test/mpi/f08/io/ioharness.defn
index ca261e5..5a7d756 100644
--- a/test/mpi/f08/io/ioharness.defn
+++ b/test/mpi/f08/io/ioharness.defn
@@ -246,6 +246,38 @@ enddo
 </readfile>
 </TESTDEFN>
 
+# This test uses nonblocking collective I/O with thread-safe, individual file pointers
+<TESTDEFN filename="iwriteatallf90.f90">
+<writefiledecl>
+type(MPI_Status) status
+type(MPI_Request) request
+integer buf(MAX_BUFFER), ans
+integer (kind=MPI_OFFSET_KIND)offset
+</writefiledecl>
+<writefile>
+do k=1, b
+   <setContigBuffer/>
+   <findOffset/>
+   call MPIX_File_iwrite_at_all( fh, offset, buf, n, MPI_INTEGER, request, ierr )
+   call MPI_Wait(request, status, ierr)
+   <checkErr/>
+enddo
+</writefile>
+# No extra declarations are needed for the read step
+<readfiledecl>
+</readfiledecl>
+<readfile>
+do k=1, b
+   <clearContigBuffer/>
+   <findOffset/>
+   call MPIX_File_iread_at_all( fh, offset, buf, n, MPI_INTEGER, request, ierr )
+   call MPI_Wait(request, status, ierr)
+   <checkErr/>
+   <checkContigBuffer/>
+enddo
+</readfile>
+</TESTDEFN>
+
 # This test uses collective I/O with thread-safe, individual file pointers
 <TESTDEFN filename="writeatallbef90.f90">
 <writefiledecl>
diff --git a/test/mpi/f08/io/testlist b/test/mpi/f08/io/testlist.in
similarity index 86%
rename from test/mpi/f08/io/testlist
rename to test/mpi/f08/io/testlist.in
index 46c2ef8..d2dd57d 100644
--- a/test/mpi/f08/io/testlist
+++ b/test/mpi/f08/io/testlist.in
@@ -18,3 +18,5 @@ miscfilef90 4
 setviewcurf90 4
 c2f2ciof90 1
 c2f90multio 1
+ at mpix@ i_fcoll_test 4
+ at mpix@ iwriteatallf90 4
diff --git a/test/mpi/f77/io/Makefile.am b/test/mpi/f77/io/Makefile.am
index d7f5d06..2cd966c 100644
--- a/test/mpi/f77/io/Makefile.am
+++ b/test/mpi/f77/io/Makefile.am
@@ -7,7 +7,7 @@
 
 include $(top_srcdir)/Makefile_f77.mtest
 
-EXTRA_DIST = testlist
+EXTRA_DIST = testlist.in
 
 # avoid having to write many "foo_SOURCES = foo.f" lines
 AM_DEFAULT_SOURCE_EXT = .f
@@ -34,10 +34,17 @@ noinst_PROGRAMS = \
     c2fmultio \
     c2f2ciof
 
+if BUILD_MPIX_TESTS
+noinst_PROGRAMS += \
+    i_setviewcurf  \
+    iwriteatallf
+endif
+
 
 # We don't want to distribute these source files because they are created by
 # "testmerge", hence "nodist_foo_SOURCES"
 nodist_iwriteatf_SOURCES     = iwriteatf.f
+nodist_iwriteatallf_SOURCES  = iwriteatallf.f
 nodist_iwritef_SOURCES       = iwritef.f
 nodist_iwriteshf_SOURCES     = iwriteshf.f
 nodist_writeallbef_SOURCES   = writeallbef.f
@@ -82,6 +89,7 @@ writeordf.$(OBJEXT): iooffset.h
 # these files are genereated using testmerge (see below)
 generated_io_sources = \
     iwriteatf.f        \
+    iwriteatallf.f     \
     iwritef.f          \
     iwriteshf.f        \
     writeallbef.f      \
diff --git a/test/mpi/f77/io/i_setviewcurf.f b/test/mpi/f77/io/i_setviewcurf.f
new file mode 100644
index 0000000..15b222e
--- /dev/null
+++ b/test/mpi/f77/io/i_setviewcurf.f
@@ -0,0 +1,122 @@
+C -*- Mode: Fortran; -*-
+C
+C  (C) 2003 by Argonne National Laboratory.
+C      See COPYRIGHT in top-level directory.
+C
+      program main
+      implicit none
+      include 'mpif.h'
+      include 'iooffset.h'
+      integer errs, ierr, size, rank
+      integer fh, comm, status(MPI_STATUS_SIZE)
+      integer buf(1024)
+      integer request
+
+      errs = 0
+      call MTest_Init( ierr )
+
+C    This test reads a header then sets the view to every "size" int,
+C    using set view and current displacement.  The file is first written
+C    using a combination of collective and ordered writes
+
+      comm = MPI_COMM_WORLD
+      call MPI_File_open( comm, "test.ord", MPI_MODE_WRONLY +
+     $     MPI_MODE_CREATE, MPI_INFO_NULL, fh, ierr )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Open(1)", ierr )
+      endif
+      call MPI_Comm_size( comm, size, ierr )
+      call MPI_Comm_rank( comm, rank, ierr )
+      if (size .gt. 1024) then
+         if (rank .eq. 0) then
+            print *,
+     $"This program must be run with no more than 1024 processes"
+            call MPI_Abort( MPI_COMM_WORLD, 1, ierr )
+         endif
+      endif
+
+      buf(1) = size
+      call MPIX_File_iwrite_all( fh, buf, 1, MPI_INTEGER, request, ierr)
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "iwrite_all", ierr )
+      endif
+
+      call MPI_Wait(request, status, ierr)
+
+      call MPI_File_get_position( fh, offset, ierr )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Get_position", ierr )
+      endif
+      call MPI_File_seek_shared( fh, offset, MPI_SEEK_SET, ierr )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Seek_shared", ierr )
+      endif
+      buf(1) = rank
+      call MPI_File_write_ordered( fh, buf, 1, MPI_INTEGER, status,ierr)
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Write_ordered", ierr )
+      endif
+      call MPI_File_close( fh, ierr )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Close(1)", ierr )
+      endif
+
+C Reopen the file as sequential
+      call MPI_File_open( comm, "test.ord", MPI_MODE_RDONLY +
+     $     MPI_MODE_SEQUENTIAL + MPI_MODE_DELETE_ON_CLOSE,
+     $     MPI_INFO_NULL, fh, ierr )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Open(Read)", ierr )
+      endif
+
+      if (rank .eq. 0) then
+         call MPI_File_read_shared( fh, buf, 1, MPI_INTEGER, status,
+     $        ierr )
+         if (ierr .ne. MPI_SUCCESS) then
+            errs = errs + 1
+            call MTestPrintErrorMsg( "Read_all", ierr )
+         endif
+         if (buf(1) .ne. size) then
+           errs = errs + 1
+           print *, "Unexpected value for the header = ", buf(1),
+     $          ", should be ", size
+        endif
+      endif
+      call MPI_Barrier( comm, ierr  )
+C   All processes must provide the same file view for MODE_SEQUENTIAL
+      call MPI_File_set_view( fh, MPI_DISPLACEMENT_CURRENT, MPI_INTEGER
+     $     ,MPI_INTEGER, "native", MPI_INFO_NULL, ierr )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Set_view", ierr )
+      endif
+      buf(1) = -1
+      call MPI_File_read_ordered( fh, buf, 1, MPI_INTEGER, status, ierr
+     $     )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Read_all", ierr )
+      endif
+      if (buf(1) .ne. rank) then
+         errs = errs + 1
+         print *, rank, ": buf(1) = ", buf(1)
+      endif
+
+      call MPI_File_close( fh, ierr )
+      if (ierr .ne. MPI_SUCCESS) then
+         errs = errs + 1
+         call MTestPrintErrorMsg( "Close(2)", ierr )
+      endif
+
+      call MTest_Finalize( errs )
+
+      call MPI_Finalize( ierr )
+      end
+
diff --git a/test/mpi/f77/io/ioharness.defn b/test/mpi/f77/io/ioharness.defn
index 55760ca..22d143c 100644
--- a/test/mpi/f77/io/ioharness.defn
+++ b/test/mpi/f77/io/ioharness.defn
@@ -246,6 +246,38 @@ enddo
 </readfile>
 </TESTDEFN>
 
+# This test uses nonblocking collective I/O with thread-safe, individual file pointers
+<TESTDEFN filename="iwriteatallf.f">
+<writefiledecl>
+integer status(MPI_STATUS_SIZE)
+integer request
+integer buf(MAX_BUFFER), ans
+include 'iooffset.h'
+</writefiledecl>
+<writefile>
+do k=1, b
+   <setContigBuffer/>
+   <findOffset/>
+   call mpix_file_iwrite_at_all( fh, offset, buf, n, MPI_INTEGER, request, ierr )
+   call mpi_wait(request, status, ierr)
+   <checkErr/>
+enddo
+</writefile>
+# No extra declarations are needed for the read step
+<readfiledecl>
+</readfiledecl>
+<readfile>
+do k=1, b
+   <clearContigBuffer/>
+   <findOffset/>
+   call mpix_file_iread_at_all( fh, offset, buf, n, MPI_INTEGER, request, ierr )
+   call mpi_wait(request, status, ierr)
+   <checkErr/>
+   <checkContigBuffer/>
+enddo
+</readfile>
+</TESTDEFN>
+
 # This test uses collective I/O with thread-safe, individual file pointers
 <TESTDEFN filename="writeatallbef.f">
 <writefiledecl>
diff --git a/test/mpi/f77/io/testlist b/test/mpi/f77/io/testlist.in
similarity index 84%
rename from test/mpi/f77/io/testlist
rename to test/mpi/f77/io/testlist.in
index 297353a..51646b1 100644
--- a/test/mpi/f77/io/testlist
+++ b/test/mpi/f77/io/testlist.in
@@ -18,3 +18,5 @@ miscfilef 4
 setviewcurf 4
 c2f2ciof 1
 c2fmultio 1
+ at mpix@ i_setviewcurf 4
+ at mpix@ iwriteatallf 4

http://git.mpich.org/mpich.git/commitdiff/30da9161a6c21f8dfb4a115e45fd52081ddf6a5d

commit 30da9161a6c21f8dfb4a115e45fd52081ddf6a5d
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Thu Nov 6 20:26:07 2014 -0600

    Add F08 bindings for nonblocking collective I/O
    
    No review since F08 binding is experimental now.

diff --git a/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90 b/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90
index af7b15d..ba27a93 100644
--- a/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90
+++ b/src/binding/fortran/use_mpi_f08/mpi_c_interface_cdesc.F90
@@ -1565,6 +1565,62 @@ function MPIR_Ineighbor_alltoallw_cdesc(sendbuf, sendcounts, sdispls, sendtypes,
     integer(c_int) :: ierror
 end function MPIR_Ineighbor_alltoallw_cdesc
 
+function MPIR_File_iread_all_cdesc(fh, buf, count, datatype, request) &
+    bind(C, name="MPIR_File_iread_all_cdesc") result(ierror)
+    use, intrinsic :: iso_c_binding, only : c_int
+    use :: mpi_c_interface_types, only : c_File, c_Datatype, c_Request
+    implicit none
+    integer(c_File), value, intent(in) :: fh
+    type(*), dimension(..) :: buf
+    integer(c_int), value, intent(in) :: count
+    integer(c_Datatype), value, intent(in) :: datatype
+    integer(c_Request), intent(out) :: request
+    integer(c_int) :: ierror
+end function MPIR_File_iread_all_cdesc
+
+function MPIR_File_iwrite_all_cdesc(fh, buf, count, datatype, request) &
+    bind(C, name="MPIR_File_iwrite_all_cdesc") result(ierror)
+    use, intrinsic :: iso_c_binding, only : c_int, c_ptr
+    use :: mpi_c_interface_types, only : c_File, c_Datatype, c_Request
+    implicit none
+    integer(c_File), value, intent(in) :: fh
+    type(*), dimension(..), intent(in) :: buf
+    integer(c_int), value, intent(in) :: count
+    integer(c_Datatype), value, intent(in) :: datatype
+    integer(c_Request), intent(out) :: request
+    integer(c_int) :: ierror
+end function MPIR_File_iwrite_all_cdesc
+
+function MPIR_File_iread_at_all_cdesc(fh, offset, buf, count, datatype, request) &
+    bind(C, name="MPIR_File_iread_at_all_cdesc") result(ierror)
+    use, intrinsic :: iso_c_binding, only : c_int
+    use :: mpi_f08_compile_constants, only : MPI_OFFSET_KIND
+    use :: mpi_c_interface_types, only : c_File, c_Datatype, c_Request
+    implicit none
+    integer(c_File), value, intent(in) :: fh
+    integer(MPI_OFFSET_KIND), value, intent(in) :: offset
+    type(*), dimension(..) :: buf
+    integer(c_int), value, intent(in) :: count
+    integer(c_Datatype), value, intent(in) :: datatype
+    integer(c_Request), intent(out) :: request
+    integer(c_int) :: ierror
+end function MPIR_File_iread_at_all_cdesc
+
+function MPIR_File_iwrite_at_all_cdesc(fh, offset, buf, count, datatype, request) &
+    bind(C, name="MPIR_File_iwrite_at_all_cdesc") result(ierror)
+    use, intrinsic :: iso_c_binding, only : c_int
+    use :: mpi_f08_compile_constants, only : MPI_OFFSET_KIND
+    use :: mpi_c_interface_types, only : c_File, c_Datatype, c_Request
+    implicit none
+    integer(c_File), value, intent(in) :: fh
+    integer(MPI_OFFSET_KIND), value, intent(in) :: offset
+    type(*), dimension(..) :: buf
+    integer(c_int), value, intent(in) :: count
+    integer(c_Datatype), value, intent(in) :: datatype
+    integer(c_Request), intent(out) :: request
+    integer(c_int) :: ierror
+end function MPIR_File_iwrite_at_all_cdesc
+
 end interface
 
 end module mpi_c_interface_cdesc
diff --git a/src/binding/fortran/use_mpi_f08/mpi_f08.F90 b/src/binding/fortran/use_mpi_f08/mpi_f08.F90
index 7a36ff3..d1ba398 100644
--- a/src/binding/fortran/use_mpi_f08/mpi_f08.F90
+++ b/src/binding/fortran/use_mpi_f08/mpi_f08.F90
@@ -4121,4 +4121,60 @@ interface MPIX_Aint_diff
     end function MPIX_Aint_diff_f08
 end interface MPIX_Aint_diff
 
+interface MPIX_File_iread_all
+    subroutine MPIX_File_iread_all_f08ts(fh, buf, count, datatype, request, ierror)
+        use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request
+        implicit none
+        type(MPI_File), intent(in) :: fh
+        type(*), dimension(..) :: buf
+        integer, intent(in) :: count
+        type(MPI_Datatype), intent(in) :: datatype
+        type(MPI_Request), intent(out) :: request
+        integer, optional, intent(out) :: ierror
+    end subroutine MPIX_File_iread_all_f08ts
+end interface MPIX_File_iread_all
+
+interface MPIX_File_iwrite_all
+    subroutine MPIX_File_iwrite_all_f08ts(fh, buf, count, datatype, request, ierror)
+        use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request
+        implicit none
+        type(MPI_File), intent(in) :: fh
+        type(*), dimension(..), intent(in) :: buf
+        integer, intent(in) :: count
+        type(MPI_Datatype), intent(in) :: datatype
+        type(MPI_Request), intent(out) :: request
+        integer, optional, intent(out) :: ierror
+    end subroutine MPIX_File_iwrite_all_f08ts
+end interface MPIX_File_iwrite_all
+
+interface MPIX_File_iread_at_all
+    subroutine MPIX_File_iread_at_all_f08ts(fh, offset, buf, count, datatype, request, ierror)
+        use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request
+        use :: mpi_f08_compile_constants, only : MPI_OFFSET_KIND
+        implicit none
+        type(MPI_File), intent(in) :: fh
+        integer(MPI_OFFSET_KIND), intent(in) :: offset
+        type(*), dimension(..) :: buf
+        integer, intent(in) :: count
+        type(MPI_Datatype), intent(in) :: datatype
+        type(MPI_Request), intent(out) :: request
+        integer, optional, intent(out) :: ierror
+    end subroutine MPIX_File_iread_at_all_f08ts
+end interface MPIX_File_iread_at_all
+
+interface MPIX_File_iwrite_at_all
+    subroutine MPIX_File_iwrite_at_all_f08ts(fh, offset, buf, count, datatype, request, ierror)
+        use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request
+        use :: mpi_f08_compile_constants, only : MPI_OFFSET_KIND
+        implicit none
+        type(MPI_File), intent(in) :: fh
+        integer(MPI_OFFSET_KIND), intent(in) :: offset
+        type(*), dimension(..) :: buf
+        integer, intent(in) :: count
+        type(MPI_Datatype), intent(in) :: datatype
+        type(MPI_Request), intent(out) :: request
+        integer, optional, intent(out) :: ierror
+    end subroutine MPIX_File_iwrite_at_all_f08ts
+end interface MPIX_File_iwrite_at_all
+
 end module mpi_f08
diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_all_f08ts.F90
new file mode 100644
index 0000000..72c86b6
--- /dev/null
+++ b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_all_f08ts.F90
@@ -0,0 +1,42 @@
+!   -*- Mode: Fortran; -*-
+!
+!   (C) 2014 by Argonne National Laboratory.
+!   See COPYRIGHT in top-level directory.
+!
+subroutine MPIX_File_iread_all_f08ts(fh, buf, count, datatype, request, ierror)
+    use, intrinsic :: iso_c_binding, only : c_loc, c_associated
+    use, intrinsic :: iso_c_binding, only : c_int, c_ptr
+    use :: mpi_f08, only : MPI_File, MPI_Datatype, MPI_Request
+    use :: mpi_f08, only : MPI_File_f2c, MPI_File_c2f
+    use :: mpi_c_interface, only : c_File, c_Datatype
+    use :: mpi_c_interface, only : c_Request
+    use :: mpi_c_interface, only : MPIR_File_iread_all_cdesc
+
+    implicit none
+
+    type(MPI_File), intent(in) :: fh
+    type(*), dimension(..) :: buf
+    integer, intent(in) :: count
+    type(MPI_Datatype), intent(in) :: datatype
+    type(MPI_Request), intent(out) :: request
+    integer, optional, intent(out) :: ierror
+
+    integer(c_File) :: fh_c
+    integer(c_int) :: count_c
+    integer(c_Datatype) :: datatype_c
+    integer(c_Request) :: request_c
+    integer(c_int) :: ierror_c
+
+    fh_c = MPI_File_f2c(fh%MPI_VAL)
+    if (c_int == kind(0)) then
+        ierror_c = MPIR_File_iread_all_cdesc(fh_c, buf, count, datatype%MPI_VAL, request%MPI_VAL)
+    else
+        count_c = count
+        datatype_c = datatype%MPI_VAL
+        ierror_c = MPIR_File_iread_all_cdesc(fh_c, buf, count_c, datatype_c, request_c)
+        request%MPI_VAL = request_c
+    end if
+
+    if (present(ierror)) ierror = ierror_c
+
+end subroutine MPIX_File_iread_all_f08ts
diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_all_f08ts.F90
new file mode 100644
index 0000000..fe68cfc
--- /dev/null
+++ b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iread_at_all_f08ts.F90
@@ -0,0 +1,46 @@
+!   -*- Mode: Fortran; -*-
+!
+!   (C) 2014 by Argonne National Laboratory.
+!   See COPYRIGHT in top-level directory.
+!
+subroutine MPIX_File_iread_at_all_f08ts(fh, offset, buf, count, datatype, request, ierror)
+    use, intrinsic :: iso_c_binding, only : c_loc, c_associated
+    use, intrinsic :: iso_c_binding, only : c_int, c_ptr
+    use :: mpi_f08, only : MPI_File, MPI_Datatype, MPI_Request
+    use :: mpi_f08, only : MPI_OFFSET_KIND
+    use :: mpi_f08, only : MPI_File_f2c, MPI_File_c2f
+    use :: mpi_c_interface, only : c_File, c_Datatype
+    use :: mpi_c_interface, only : c_Request
+    use :: mpi_c_interface, only : MPIR_File_iread_at_all_cdesc
+
+    implicit none
+
+    type(MPI_File), intent(in) :: fh
+    integer(MPI_OFFSET_KIND), intent(in) :: offset
+    type(*), dimension(..) :: buf
+    integer, intent(in) :: count
+    type(MPI_Datatype), intent(in) :: datatype
+    type(MPI_Request), intent(out) :: request
+    integer, optional, intent(out) :: ierror
+
+    integer(c_File) :: fh_c
+    integer(MPI_OFFSET_KIND) :: offset_c
+    integer(c_int) :: count_c
+    integer(c_Datatype) :: datatype_c
+    integer(c_Request) :: request_c
+    integer(c_int) :: ierror_c
+
+    fh_c = MPI_File_f2c(fh%MPI_VAL)
+    if (c_int == kind(0)) then
+        ierror_c = MPIR_File_iread_at_all_cdesc(fh_c, offset, buf, count, datatype%MPI_VAL, request%MPI_VAL)
+    else
+        offset_c = offset
+        count_c = count
+        datatype_c = datatype%MPI_VAL
+        ierror_c = MPIR_File_iread_at_all_cdesc(fh_c, offset_c, buf, count_c, datatype_c, request_c)
+        request%MPI_VAL = request_c
+    end if
+
+    if (present(ierror)) ierror = ierror_c
+
+end subroutine MPIX_File_iread_at_all_f08ts
diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_all_f08ts.F90
new file mode 100644
index 0000000..469555a
--- /dev/null
+++ b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_all_f08ts.F90
@@ -0,0 +1,42 @@
+!   -*- Mode: Fortran; -*-
+!
+!   (C) 2014 by Argonne National Laboratory.
+!   See COPYRIGHT in top-level directory.
+!
+subroutine MPIX_File_iwrite_all_f08ts(fh, buf, count, datatype, request, ierror)
+    use, intrinsic :: iso_c_binding, only : c_loc, c_associated
+    use, intrinsic :: iso_c_binding, only : c_int, c_ptr
+    use :: mpi_f08, only : MPI_File, MPI_Datatype, MPI_Request
+    use :: mpi_f08, only : MPI_File_f2c, MPI_File_c2f
+    use :: mpi_c_interface, only : c_File, c_Datatype
+    use :: mpi_c_interface, only : c_Request
+    use :: mpi_c_interface, only : MPIR_File_iwrite_all_cdesc
+
+    implicit none
+
+    type(MPI_File), intent(in) :: fh
+    type(*), dimension(..), intent(in) :: buf
+    integer, intent(in) :: count
+    type(MPI_Datatype), intent(in) :: datatype
+    type(MPI_Request), intent(out) :: request
+    integer, optional, intent(out) :: ierror
+
+    integer(c_File) :: fh_c
+    integer(c_int) :: count_c
+    integer(c_Datatype) :: datatype_c
+    integer(c_Request) :: request_c
+    integer(c_int) :: ierror_c
+
+    fh_c = MPI_File_f2c(fh%MPI_VAL)
+    if (c_int == kind(0)) then
+        ierror_c = MPIR_File_iwrite_all_cdesc(fh_c, buf, count, datatype%MPI_VAL, request%MPI_VAL)
+    else
+        count_c = count
+        datatype_c = datatype%MPI_VAL
+        ierror_c = MPIR_File_iwrite_all_cdesc(fh_c, buf, count_c, datatype_c, request_c)
+        request%MPI_VAL = request_c
+    end if
+
+    if (present(ierror)) ierror = ierror_c
+
+end subroutine MPIX_File_iwrite_all_f08ts
diff --git a/src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_all_f08ts.F90 b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_all_f08ts.F90
new file mode 100644
index 0000000..b5ed93f
--- /dev/null
+++ b/src/binding/fortran/use_mpi_f08/wrappers_f/file_iwrite_at_all_f08ts.F90
@@ -0,0 +1,46 @@
+!   -*- Mode: Fortran; -*-
+!
+!   (C) 2014 by Argonne National Laboratory.
+!   See COPYRIGHT in top-level directory.
+!
+subroutine MPIX_File_iwrite_at_all_f08ts(fh, offset, buf, count, datatype, request, ierror)
+    use, intrinsic :: iso_c_binding, only : c_loc, c_associated
+    use, intrinsic :: iso_c_binding, only : c_int, c_ptr
+    use :: mpi_f08, only : MPI_File, MPI_Datatype, MPI_Request
+    use :: mpi_f08, only : MPI_OFFSET_KIND
+    use :: mpi_f08, only : MPI_File_f2c, MPI_File_c2f
+    use :: mpi_c_interface, only : c_File, c_Datatype
+    use :: mpi_c_interface, only : c_Request
+    use :: mpi_c_interface, only : MPIR_File_iwrite_at_all_cdesc
+
+    implicit none
+
+    type(MPI_File), intent(in) :: fh
+    integer(MPI_OFFSET_KIND), intent(in) :: offset
+    type(*), dimension(..) :: buf
+    integer, intent(in) :: count
+    type(MPI_Datatype), intent(in) :: datatype
+    type(MPI_Request), intent(out) :: request
+    integer, optional, intent(out) :: ierror
+
+    integer(c_File) :: fh_c
+    integer(MPI_OFFSET_KIND) :: offset_c
+    integer(c_int) :: count_c
+    integer(c_Datatype) :: datatype_c
+    integer(c_Request) :: request_c
+    integer(c_int) :: ierror_c
+
+    fh_c = MPI_File_f2c(fh%MPI_VAL)
+    if (c_int == kind(0)) then
+        ierror_c = MPIR_File_iwrite_at_all_cdesc(fh_c, offset, buf, count, datatype%MPI_VAL, request%MPI_VAL)
+    else
+        offset_c = offset
+        count_c = count
+        datatype_c = datatype%MPI_VAL
+        ierror_c = MPIR_File_iwrite_at_all_cdesc(fh_c, offset_c, buf, count_c, datatype_c, request_c)
+        request%MPI_VAL = request_c
+    end if
+
+    if (present(ierror)) ierror = ierror_c
+
+end subroutine MPIX_File_iwrite_at_all_f08ts

http://git.mpich.org/mpich.git/commitdiff/48c38c08fa002e2cd042b141ebacdec1786fbfe7

commit 48c38c08fa002e2cd042b141ebacdec1786fbfe7
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Thu Nov 6 20:21:48 2014 -0600

    Fix: skip #ifdef/#endif lines in input headers
    
    Without doing so, the script wrongly thinks #ifdef etc. are part of
    a subroutine's prototype line.
    
    No review since F08 binding is experimental now.

diff --git a/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface b/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface
index 4b3d1e8..f70e101 100755
--- a/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface
+++ b/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface
@@ -411,6 +411,9 @@ while (<FD>) {
         }
     }
 
+    # Skip lines starting with # such as #ifdef or #endif
+    if (/^\s*#/) { next; }
+
     # If we found a semi-colon at the end, that's the end of the line.
     # This is not perfect (e.g., does not work when a single line has
     # multiple semi-colon separated statements), but should be good

http://git.mpich.org/mpich.git/commitdiff/56fee8ce9b43db1668d5d9dad3acfab1c42e9a33

commit 56fee8ce9b43db1668d5d9dad3acfab1c42e9a33
Author: Junchao Zhang <jczhang at mcs.anl.gov>
Date:   Tue Nov 11 09:45:14 2014 -0600

    Add support for MPIX_ subroutines in cdesc buildiface
    
    No review since F08 binding is experimental now.

diff --git a/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface b/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface
index 214f35b..4b3d1e8 100755
--- a/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface
+++ b/src/binding/fortran/use_mpi_f08/wrappers_c/buildiface
@@ -456,15 +456,17 @@ while (<FD>) {
     if (grep/void\s*\*/, @arglist) {
         $fname = "$routine";
         $fname =~ s/MPI_//g;
+        $fname =~ s/MPIX_//g;
         $fname =~ tr/A-Z/a-z/;
         $fname .= "_cdesc.c";
 
         print MAKEFD "\tsrc/binding/fortran/use_mpi_f08/wrappers_c/$fname \\\n";
         open(CFILE, ">$fname") || die "Could not open $fname\n";
 
-        # replace MPI_Foo with MPIR_Foo_cdesc
+        # replace MPI(X)_Foo with MPIR_Foo_cdesc
         $cdesc_routine = $routine;
         $cdesc_routine =~ s/MPI_/MPIR_/g;
+        $cdesc_routine =~ s/MPIX_/MPIR_/g;
         $cdesc_routine .= "_cdesc";
 
         print CFILE <<EOT;

-----------------------------------------------------------------------

Summary of changes:
 maint/f77tof90.in                                  |    2 +-
 .../fortran/use_mpi_f08/mpi_c_interface_cdesc.F90  |   56 +++++++
 src/binding/fortran/use_mpi_f08/mpi_f08.F90        |   56 +++++++
 .../fortran/use_mpi_f08/wrappers_c/buildiface      |    7 +-
 ...d_shared_f08ts.F90 => file_iread_all_f08ts.F90} |   18 ++-
 ...te_at_f08ts.F90 => file_iread_at_all_f08ts.F90} |   18 ++-
 ...e_iread_f08ts.F90 => file_iwrite_all_f08ts.F90} |   18 ++-
 ...e_at_f08ts.F90 => file_iwrite_at_all_f08ts.F90} |   18 ++-
 test/mpi/.gitignore                                |   12 ++
 test/mpi/configure.ac                              |    3 +
 test/mpi/f08/io/Makefile.am                        |    9 +-
 test/mpi/f08/io/i_fcoll_test.f90                   |  155 ++++++++++++++++++++
 test/mpi/f08/io/ioharness.defn                     |   32 ++++
 test/mpi/f08/io/{testlist => testlist.in}          |    2 +
 test/mpi/f77/io/Makefile.am                        |   10 +-
 test/mpi/f77/io/{setviewcurf.f => i_setviewcurf.f} |   50 ++++---
 test/mpi/f77/io/ioharness.defn                     |   32 ++++
 test/mpi/f77/io/{testlist => testlist.in}          |    2 +
 18 files changed, 441 insertions(+), 59 deletions(-)
 copy src/binding/fortran/use_mpi_f08/wrappers_f/{file_iread_shared_f08ts.F90 => file_iread_all_f08ts.F90} (57%)
 copy src/binding/fortran/use_mpi_f08/wrappers_f/{file_iwrite_at_f08ts.F90 => file_iread_at_all_f08ts.F90} (60%)
 copy src/binding/fortran/use_mpi_f08/wrappers_f/{file_iread_f08ts.F90 => file_iwrite_all_f08ts.F90} (57%)
 copy src/binding/fortran/use_mpi_f08/wrappers_f/{file_iwrite_at_f08ts.F90 => file_iwrite_at_all_f08ts.F90} (60%)
 create mode 100644 test/mpi/f08/io/i_fcoll_test.f90
 rename test/mpi/f08/io/{testlist => testlist.in} (86%)
 copy test/mpi/f77/io/{setviewcurf.f => i_setviewcurf.f} (78%)
 rename test/mpi/f77/io/{testlist => testlist.in} (84%)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list