[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1-235-g97114ec
Service Account
noreply at mpich.org
Thu May 8 15:03:26 CDT 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 97114ec5b135538a43fabb45b0d6be9a830b623e (commit)
via 664ef28d1a106fd9b3ce5775b627cc318d579ad5 (commit)
via c3d0d8973242553c5b2c83570307bb96357b2906 (commit)
via 5948c2b3339756861714e549fe44eb5b0d88d691 (commit)
from 42056d485bd213fbbf0fb3c8ba9ae9b0350d62ea (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/97114ec5b135538a43fabb45b0d6be9a830b623e
commit 97114ec5b135538a43fabb45b0d6be9a830b623e
Author: Rob Latham <robl at mcs.anl.gov>
Date: Thu May 8 14:56:25 2014 -0500
Got a bit carried away zapping zero-length blocks
A partial revert of the portion of commit
50f3d5806e5cf3934ef991eef2d7d238846380d6 : I did not mean to modify
anything in the struct case. I did, though, and that modification
caused a bug in darray datatypes. The zero-length blocklens in the
struct case indicate upper bound and lower bounds and must be respected.
Closes: #2089
No Reviewer
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index b8708af..42e827d 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -665,19 +665,15 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
/* simplest case, current type is basic or contiguous types */
/* By using ADIO_Offset we preserve +/- sign and
avoid >2G integer arithmetic problems */
- if (ints[1+n] > 0) {
- ADIO_Offset blocklength = ints[1+n];
- j = *curr_index;
- flat->indices[j] = st_offset + adds[n];
- MPI_Type_size_x(types[n], &old_size);
- flat->blocklens[j] = blocklength * old_size;
+ ADIO_Offset blocklength = ints[1+n];
+ j = *curr_index;
+ flat->indices[j] = st_offset + adds[n];
+ MPI_Type_size_x(types[n], &old_size);
+ flat->blocklens[j] = blocklength * old_size;
#ifdef FLATTEN_DEBUG
- DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",n,adds[n],j, flat->indices[j], j, flat->blocklens[j]);
+ DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple adds[%#X] "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",n,adds[n],j, flat->indices[j], j, flat->blocklens[j]);
#endif
- (*curr_index)++;
- } else {
- flat->count--;
- }
+ (*curr_index)++;
}
else {
/* current type made up of noncontiguous derived types */
@@ -689,17 +685,13 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat,
MPI_Type_extent(types[n], &old_extent);
for (m=1; m<ints[1+n]; m++) {
for (i=0; i<num; i++) {
- if (flat->blocklens[j-num] > 0) {
- flat->indices[j] =
- flat->indices[j-num] + ADIOI_AINT_CAST_TO_OFFSET old_extent;
- flat->blocklens[j] = flat->blocklens[j-num];
+ flat->indices[j] =
+ flat->indices[j-num] + ADIOI_AINT_CAST_TO_OFFSET old_extent;
+ flat->blocklens[j] = flat->blocklens[j-num];
#ifdef FLATTEN_DEBUG
- DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple old_extent "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",old_extent,j, flat->indices[j], j, flat->blocklens[j]);
+ DBG_FPRINTF(stderr,"ADIOI_Flatten:: simple old_extent "MPI_AINT_FMT_HEX_SPEC", flat->indices[%#llX] %#llX, flat->blocklens[%#llX] %#llX\n",old_extent,j, flat->indices[j], j, flat->blocklens[j]);
#endif
- j++;
- } else {
- flat->count --;
- }
+ j++;
}
}
*curr_index = j;
http://git.mpich.org/mpich.git/commitdiff/664ef28d1a106fd9b3ce5775b627cc318d579ad5
commit 664ef28d1a106fd9b3ce5775b627cc318d579ad5
Author: Rob Latham <robl at mcs.anl.gov>
Date: Thu May 8 11:05:23 2014 -0500
update darray_read for test suite conventions
be less verbose, returning only ' No Error\n' if all is well, and return
a non-zero exit code so i may git-bisect with it.
diff --git a/src/mpi/romio/test/darray_read.c b/src/mpi/romio/test/darray_read.c
index 18f075c..e4eb709 100644
--- a/src/mpi/romio/test/darray_read.c
+++ b/src/mpi/romio/test/darray_read.c
@@ -21,7 +21,7 @@ static void handle_error(int errcode, const char *str)
int main(int argc, char *argv[])
{
- int i, j;
+ int i, j, nerrors=0, total_errors=0;
int rank, size;
int bpos;
@@ -83,6 +83,7 @@ int main(int argc, char *argv[])
CHECK(MPI_File_close(&mpi_fh));
for(i = 0; i < size; i++) {
+#ifdef VERBOSE
MPI_Barrier(MPI_COMM_WORLD);
if(rank == i) {
printf("=== Rank %i === (%i elements) \nPacked: ", rank, nelem);
@@ -98,13 +99,26 @@ int main(int argc, char *argv[])
printf("\n\n");
fflush(stdout);
}
+#endif
+ if(rank == i) {
+ for (j=0; j< nelem; j++) {
+ if (pdata[j] != ldata[j]) {
+ fprintf(stderr, "rank %d at index %d: packbuf %4.1f filebuf %4.1f\n",
+ rank, j, pdata[j], ldata[j]);
+ nerrors++;
+ }
+ }
+ }
}
+ MPI_Allreduce(&nerrors, &total_errors, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
+ if (rank == 0 && total_errors == 0)
+ printf(" No Errors\n");
free(ldata);
free(pdata);
MPI_Type_free(&darray);
MPI_Finalize();
- exit(0);
+ exit(total_errors);
}
http://git.mpich.org/mpich.git/commitdiff/c3d0d8973242553c5b2c83570307bb96357b2906
commit c3d0d8973242553c5b2c83570307bb96357b2906
Author: Rob Latham <robl at mcs.anl.gov>
Date: Thu May 8 09:07:19 2014 -0500
Test case for darray
ROMIO was not handling a particular darray pattern well. Test case
taken from openmpi mailing list.
See ticket #2089
diff --git a/src/mpi/romio/test/Makefile.am b/src/mpi/romio/test/Makefile.am
index 6159361..71bf7b9 100644
--- a/src/mpi/romio/test/Makefile.am
+++ b/src/mpi/romio/test/Makefile.am
@@ -25,7 +25,7 @@ AM_FFLAGS = $(USER_FFLAGS)
CTESTS = simple perf async coll_test coll_perf misc file_info excl large_array \
atomicity noncontig i_noncontig noncontig_coll split_coll shared_fp \
large_file psimple error status noncontig_coll2 aggregation1 aggregation2 \
- async-multiple ordered_fp hindexed external32 indexed_zeros
+ async-multiple ordered_fp hindexed external32 indexed_zeros darray_read
FTESTS = fcoll_test fperf fmisc pfcoll_test
diff --git a/src/mpi/romio/test/darray_read.c b/src/mpi/romio/test/darray_read.c
new file mode 100644
index 0000000..18f075c
--- /dev/null
+++ b/src/mpi/romio/test/darray_read.c
@@ -0,0 +1,110 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <mpi.h>
+
+#define NSIDE 5
+#define NBLOCK 3
+#define NPROC 2
+
+#define CHECK(fn) {int errcode; errcode = (fn); if (errcode != MPI_SUCCESS) handle_error(errcode, #fn);}
+
+static void handle_error(int errcode, const char *str)
+{
+ char msg[MPI_MAX_ERROR_STRING];
+ int resultlen;
+ MPI_Error_string(errcode, msg, &resultlen);
+ fprintf(stderr, "%s: %s\n", str, msg);
+ MPI_Abort(MPI_COMM_WORLD, 1);
+}
+
+
+int main(int argc, char *argv[])
+{
+ int i, j;
+
+ int rank, size;
+ int bpos;
+
+ MPI_Datatype darray;
+ MPI_Status status;
+ MPI_File mpi_fh;
+
+ /* Define array distribution
+ A 2x2 block size works with ROMIO, a 3x3 block size breaks it. */
+ int distrib[2] = { MPI_DISTRIBUTE_CYCLIC, MPI_DISTRIBUTE_CYCLIC };
+ int bsize[2] = { NBLOCK, NBLOCK };
+ int gsize[2] = { NSIDE, NSIDE };
+ int psize[2] = { NPROC, NPROC };
+
+ double data[NSIDE*NSIDE];
+ double *ldata, *pdata;
+
+ int tsize, nelem;
+
+ MPI_File dfile;
+
+ MPI_Init(&argc, &argv);
+
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+
+ /* Set up type */
+ CHECK(MPI_Type_create_darray(size, rank, 2, gsize, distrib,
+ bsize, psize, MPI_ORDER_FORTRAN, MPI_DOUBLE, &darray));
+ CHECK(MPI_Type_commit(&darray));
+ CHECK(MPI_Type_size(darray, &tsize));
+ nelem = tsize / sizeof(double);
+
+ for(i = 0; i < (NSIDE*NSIDE); i++) data[i] = i;
+
+ if (rank == 0) {
+ CHECK(MPI_File_open(MPI_COMM_SELF, argv[1],
+ MPI_MODE_CREATE|MPI_MODE_WRONLY, MPI_INFO_NULL, &dfile));
+ CHECK(MPI_File_write(dfile, data, NSIDE*NSIDE, MPI_DOUBLE, &status));
+ CHECK(MPI_File_close(&dfile));
+ }
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ /* Allocate buffer */
+ ldata = (double *)malloc(tsize);
+ pdata = (double *)malloc(tsize);
+
+ /* Use Pack to pull out array */
+ bpos = 0;
+ CHECK(MPI_Pack(data, 1, darray, pdata, tsize, &bpos, MPI_COMM_WORLD));
+
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ /* Read in array from file. */
+ CHECK(MPI_File_open(MPI_COMM_WORLD, argv[1], MPI_MODE_RDONLY, MPI_INFO_NULL, &mpi_fh));
+ CHECK(MPI_File_set_view(mpi_fh, 0, MPI_DOUBLE, darray, "native", MPI_INFO_NULL));
+ CHECK(MPI_File_read_all(mpi_fh, ldata, nelem, MPI_DOUBLE, &status));
+ CHECK(MPI_File_close(&mpi_fh));
+
+ for(i = 0; i < size; i++) {
+ MPI_Barrier(MPI_COMM_WORLD);
+ if(rank == i) {
+ printf("=== Rank %i === (%i elements) \nPacked: ", rank, nelem);
+ for(j = 0; j < nelem; j++) {
+ printf("%4.1f ", pdata[j]);
+ fflush(stdout);
+ }
+ printf("\nRead: ");
+ for(j = 0; j < nelem; j++) {
+ printf("%4.1f ", ldata[j]);
+ fflush(stdout);
+ }
+ printf("\n\n");
+ fflush(stdout);
+ }
+ }
+
+ free(ldata);
+ free(pdata);
+ MPI_Type_free(&darray);
+ MPI_Finalize();
+
+ exit(0);
+
+}
diff --git a/src/mpi/romio/test/runtests.in b/src/mpi/romio/test/runtests.in
index 1d606f5..2aa2ebb 100644
--- a/src/mpi/romio/test/runtests.in
+++ b/src/mpi/romio/test/runtests.in
@@ -379,6 +379,13 @@ MakeExe indexed_zeros
echo '**** Testing indexed_zeros ****'
$mpirun -np 2 ./indexed_zeros $FILENAME
CleanExe indexed_zeros
+testfiles="$testfiles darray_read.out"
+\rm -f darray_read.out
+MakeExe darra_read
+\rm -f $FILENAME*
+echo '**** Testing darray_read ****'
+$mpirun -np 4 ./darray_read $FILENAME
+CleanExe darray_read
#
if [ @NOF77@ = 0 ] ; then
echo ""
http://git.mpich.org/mpich.git/commitdiff/5948c2b3339756861714e549fe44eb5b0d88d691
commit 5948c2b3339756861714e549fe44eb5b0d88d691
Author: Rob Latham <robl at mcs.anl.gov>
Date: Thu May 8 09:03:33 2014 -0500
Actually initialize debug event logging
ROMIO has DBG_FPRINTF throughout the code, but those DBG_FPRINTF
statements will not do anything unless ROMIO registers itself with the
MPICH debug event logging system.
still todo: the ROMIO logging is way too verbose and needs to implement
TRACE, DEBUG, and VERBOSE levels.
diff --git a/src/mpi/romio/adio/common/ad_init.c b/src/mpi/romio/adio/common/ad_init.c
index ad24f0e..cec6219 100644
--- a/src/mpi/romio/adio/common/ad_init.c
+++ b/src/mpi/romio/adio/common/ad_init.c
@@ -55,6 +55,10 @@ void ADIO_Init(int *argc, char ***argv, int *error_code)
ADIOI_UNREFERENCED_ARG(argc);
ADIOI_UNREFERENCED_ARG(argv);
+
+#ifdef ROMIO_INSIDE_MPICH
+ MPIR_Ext_init();
+#endif
/* initialize the linked list containing flattened datatypes */
ADIOI_Flatlist = (ADIOI_Flatlist_node *) ADIOI_Malloc(sizeof(ADIOI_Flatlist_node));
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/ad_init.c | 4 +
src/mpi/romio/adio/common/flatten.c | 32 ++++------
src/mpi/romio/test/Makefile.am | 2 +-
src/mpi/romio/test/darray_read.c | 124 +++++++++++++++++++++++++++++++++++
src/mpi/romio/test/runtests.in | 7 ++
5 files changed, 148 insertions(+), 21 deletions(-)
create mode 100644 src/mpi/romio/test/darray_read.c
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list