[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b2-37-gb56f5da

Service Account noreply at mpich.org
Tue May 19 22:14:15 CDT 2015


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  b56f5da846530b7f48da5db76c78963b99d004f0 (commit)
       via  cd79f45ff521812e9f582debd52394cec66b667a (commit)
      from  13b72b4d12c61b201a8349c18638e3481668cd7f (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/b56f5da846530b7f48da5db76c78963b99d004f0

commit b56f5da846530b7f48da5db76c78963b99d004f0
Author: Sangmin Seo <sseo at anl.gov>
Date:   Tue May 19 00:08:50 2015 -0500

    ROMIO: fix stack fault in NBC I/O
    
    This is currently a workaround to avoid weird errors, e.g., stack
    fault, occurred in the NBC I/O implementation on Linux. When the host
    OS is Linux and aio-lite is not used, a blocking ADIO function is used
    in the NBC I/O implementation.
    
    Fixes #2201
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/adio/common/ad_iread_coll.c b/src/mpi/romio/adio/common/ad_iread_coll.c
index b1311e6..76eebef 100644
--- a/src/mpi/romio/adio/common/ad_iread_coll.c
+++ b/src/mpi/romio/adio/common/ad_iread_coll.c
@@ -357,6 +357,27 @@ static void ADIOI_GEN_IreadStridedColl_indio(ADIOI_NBC_Request *nbc_req,
         fd->fp_ind = vars->orig_fp;
         ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
 
+#if defined(ROMIO_RUN_ON_LINUX) && !defined(HAVE_AIO_LITE_H)
+        /* NOTE: This is currently a workaround to avoid weird errors, e.g.,
+         * stack fault, occurred on Linux. When the host OS is Linux and
+         * aio-lite is not used, a blocking ADIO function is used here.
+         * See https://trac.mpich.org/projects/mpich/ticket/2201. */
+        MPI_Status status;
+        if (vars->buftype_is_contig && filetype_is_contig) {
+            if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
+                off = fd->disp + (fd->etype_size) * offset;
+                ADIO_ReadContig(fd, buf, count, datatype, ADIO_EXPLICIT_OFFSET,
+                                off, &status, error_code);
+            }
+            else ADIO_ReadContig(fd, buf, count, datatype, ADIO_INDIVIDUAL,
+                                 0, &status, error_code);
+        }
+        else {
+            ADIO_ReadStrided(fd, buf, count, datatype, file_ptr_type,
+                             offset, &status, error_code);
+        }
+        ADIOI_GEN_IreadStridedColl_fini(nbc_req, error_code);
+#else
         if (vars->buftype_is_contig && filetype_is_contig) {
             if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
                 off = fd->disp + (fd->etype_size) * offset;
@@ -372,6 +393,7 @@ static void ADIOI_GEN_IreadStridedColl_indio(ADIOI_NBC_Request *nbc_req,
         }
 
         nbc_req->data.rd.state = ADIOI_IRC_STATE_GEN_IREADSTRIDEDCOLL_INDIO;
+#endif
         return;
     }
 
@@ -834,12 +856,19 @@ static void ADIOI_Iread_and_exch_l1_begin(ADIOI_NBC_Request *nbc_req,
 
     if (flag) {
         ADIOI_Assert(size == (int)size);
+#if defined(ROMIO_RUN_ON_LINUX) && !defined(HAVE_AIO_LITE_H)
+        MPI_Status status;
+        ADIO_ReadContig(fd, read_buf+vars->for_curr_iter, (int)size,
+                        MPI_BYTE, ADIO_EXPLICIT_OFFSET, vars->off,
+                        &status, error_code);
+#else
         ADIO_IreadContig(fd, read_buf+vars->for_curr_iter, (int)size,
                          MPI_BYTE, ADIO_EXPLICIT_OFFSET, vars->off,
                          &vars->req2, error_code);
 
         nbc_req->data.rd.state = ADIOI_IRC_STATE_IREAD_AND_EXCH_L1_BEGIN;
         return;
+#endif
     }
 
     ADIOI_R_Iexchange_data(nbc_req, error_code);
diff --git a/src/mpi/romio/adio/common/ad_iwrite_coll.c b/src/mpi/romio/adio/common/ad_iwrite_coll.c
index b456ec4..7832ab4 100644
--- a/src/mpi/romio/adio/common/ad_iwrite_coll.c
+++ b/src/mpi/romio/adio/common/ad_iwrite_coll.c
@@ -375,6 +375,28 @@ static void ADIOI_GEN_IwriteStridedColl_indio(ADIOI_NBC_Request *nbc_req,
         fd->fp_ind = vars->orig_fp;
         ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
 
+#if defined(ROMIO_RUN_ON_LINUX) && !defined(HAVE_AIO_LITE_H)
+        /* NOTE: This is currently a workaround to avoid weird errors, e.g.,
+         * stack fault, occurred on Linux. When the host OS is Linux and
+         * aio-lite is not used, a blocking ADIO function is used here.
+         * See https://trac.mpich.org/projects/mpich/ticket/2201. */
+        MPI_Status status;
+        if (vars->buftype_is_contig && filetype_is_contig) {
+            if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
+                off = fd->disp + (ADIO_Offset)(fd->etype_size) * offset;
+                ADIO_WriteContig(fd, buf, count, datatype,
+                                 ADIO_EXPLICIT_OFFSET,
+                                 off, &status, error_code);
+            }
+            else ADIO_WriteContig(fd, buf, count, datatype, ADIO_INDIVIDUAL,
+                                  0, &status, error_code);
+        }
+        else {
+            ADIO_WriteStrided(fd, buf, count, datatype, file_ptr_type,
+                              offset, &status, error_code);
+        }
+        ADIOI_GEN_IwriteStridedColl_fini(nbc_req, error_code);
+#else
         if (vars->buftype_is_contig && filetype_is_contig) {
             if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
                 off = fd->disp + (ADIO_Offset)(fd->etype_size) * offset;
@@ -391,6 +413,7 @@ static void ADIOI_GEN_IwriteStridedColl_indio(ADIOI_NBC_Request *nbc_req,
         }
 
         nbc_req->data.wr.state = ADIOI_IWC_STATE_GEN_IWRITESTRIDEDCOLL_INDIO;
+#endif
         return;
     }
 
@@ -893,12 +916,19 @@ static void ADIOI_Iexch_and_write_l1_body(ADIOI_NBC_Request *nbc_req,
 
     if (flag) {
         ADIOI_Assert(size == (int)size);
+#if defined(ROMIO_RUN_ON_LINUX) && !defined(HAVE_AIO_LITE_H)
+        MPI_Status status;
+        ADIO_WriteContig(fd, write_buf, (int)size, MPI_BYTE,
+                         ADIO_EXPLICIT_OFFSET, vars->off, &status,
+                         error_code);
+#else
         ADIO_IwriteContig(fd, write_buf, (int)size, MPI_BYTE,
                           ADIO_EXPLICIT_OFFSET, vars->off, &vars->req3,
                           error_code);
 
         nbc_req->data.wr.state = ADIOI_IWC_STATE_IEXCH_AND_WRITE_L1_BODY;
         return;
+#endif
     }
 
     ADIOI_Iexch_and_write_l1_end(nbc_req, error_code);

http://git.mpich.org/mpich.git/commitdiff/cd79f45ff521812e9f582debd52394cec66b667a

commit cd79f45ff521812e9f582debd52394cec66b667a
Author: Sangmin Seo <sseo at anl.gov>
Date:   Mon May 18 23:58:35 2015 -0500

    ROMIO: check if the host OS is Linux
    
    configure defines ROMIO_RUN_ON_LINUX as 1 when the host OS is Linux.
    
    Signed-off-by: Rob Latham <robl at mcs.anl.gov>

diff --git a/src/mpi/romio/configure.ac b/src/mpi/romio/configure.ac
index 857ddec..5753856 100644
--- a/src/mpi/romio/configure.ac
+++ b/src/mpi/romio/configure.ac
@@ -1155,6 +1155,17 @@ AS_IF([test "x$with_aiolite" == xyes],
      )
 # End of aio-related tests
 
+# Linux aio library seems to have problems when they are used in our NBC I/O
+# implementation. We let the code know when the host OS is Linux so that the
+# NBC I/O implementation uses blocking I/O operations.
+# See http://trac.mpich.org/projects/mpich/ticket/2201.
+
+# compute canonical system types
+AC_CANONICAL_HOST
+AS_CASE([$host_os],
+        [linux*], AC_DEFINE(ROMIO_RUN_ON_LINUX,1,[Define if run on Linux]))
+# End of OS check
+
 #
 # Check for statfs (many) and specifically f_fstypename field (BSD)
 #

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

Summary of changes:
 src/mpi/romio/adio/common/ad_iread_coll.c  |   29 +++++++++++++++++++++++++++
 src/mpi/romio/adio/common/ad_iwrite_coll.c |   30 ++++++++++++++++++++++++++++
 src/mpi/romio/configure.ac                 |   11 ++++++++++
 3 files changed, 70 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list