[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1-295-g0501169
Service Account
noreply at mpich.org
Mon Jun 2 15:26:05 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 050116938f832c9bf135d0df93d1f7232d7f4a83 (commit)
via 76a079c7c0525b336565e700bf9ab55e240c58fe (commit)
from 735e81b2d5ce04c81349f25af0eeaffe8aa8d431 (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/050116938f832c9bf135d0df93d1f7232d7f4a83
commit 050116938f832c9bf135d0df93d1f7232d7f4a83
Author: Rob Latham <robl at mcs.anl.gov>
Date: Mon Jun 2 15:24:48 2014 -0500
fix "used uninitilized" compiler warning
diff --git a/src/mpi/romio/test/types_with_zeros.c b/src/mpi/romio/test/types_with_zeros.c
index a4b0c15..4ec6262 100644
--- a/src/mpi/romio/test/types_with_zeros.c
+++ b/src/mpi/romio/test/types_with_zeros.c
@@ -26,7 +26,7 @@ enum {
int test_indexed_with_zeros(char *filename, int testcase)
{
- int i, rank, np, buflen, num, err, nr_errors;
+ int i, rank, np, buflen, num, err, nr_errors=0;
int nelms[MAXLEN], buf[MAXLEN], indices[MAXLEN], blocklen[MAXLEN];
MPI_File fh;
MPI_Status status;
@@ -127,7 +127,7 @@ int main(int argc, char **argv)
if (rank == 0) fprintf(stderr,"Must run on 2 MPI processes\n");
MPI_Finalize(); return 1;
}
- nr_errors += test_indexed_with_zeros(argv[1], INDEXED);
+ nr_errors = test_indexed_with_zeros(argv[1], INDEXED);
nr_errors += test_indexed_with_zeros(argv[1], HINDEXED);
nr_errors += test_indexed_with_zeros(argv[1], STRUCT);
http://git.mpich.org/mpich.git/commitdiff/76a079c7c0525b336565e700bf9ab55e240c58fe
commit 76a079c7c0525b336565e700bf9ab55e240c58fe
Author: Rob Latham <robl at mcs.anl.gov>
Date: Thu May 29 10:07:26 2014 -0500
revert old "removezeros" optimization
Recent bug reports now have me much less certain about the behavior of
zero-length blocks in the flattened representation. LB and UB markers
could occur anywhere. The recent commits to ignore block counts of zero
should make this optimization pointless anyway.
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/src/mpi/romio/adio/common/flatten.c b/src/mpi/romio/adio/common/flatten.c
index 83e3c1d..bc5f1e2 100644
--- a/src/mpi/romio/adio/common/flatten.c
+++ b/src/mpi/romio/adio/common/flatten.c
@@ -1067,53 +1067,6 @@ MPI_Count ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, MPI_Count *curr_i
return count;
}
-/* removezeros() make a second pass over the
- * flattented type knocking out zero-length blocks, but leave first and last
- * alone (they mark LB and UB) */
-
-static void removezeros(ADIOI_Flatlist_node *flat_type)
-{
- int i,j,opt_blocks;
- ADIO_Offset *opt_blocklens;
- ADIO_Offset *opt_indices;
-
- /* short-circuit: there is nothing to do if there are
- * - 1 block: what can we remove?
- * - 2 blocks: either both blocks are data (and not zero)
- * or one block is the UB or LB */
- if (flat_type->count <= 2) return;
-
- opt_blocks = 2; /* LB and UB */
- for (i=1; i < flat_type->count -1; i++) {
- if(flat_type->blocklens[i] != 0)
- opt_blocks++;
- }
- /* no optimization possible */
- if (opt_blocks == flat_type->count) return;
- opt_blocklens = (ADIO_Offset *) ADIOI_Malloc(opt_blocks * sizeof(ADIO_Offset));
- opt_indices = (ADIO_Offset *)ADIOI_Malloc(opt_blocks*sizeof(ADIO_Offset));
-
- /* fill in new blocklists, keeping first and last no matter what */
- opt_blocklens[0] = flat_type->blocklens[0];
- opt_indices[0] = flat_type->indices[0];
- j = 1; /* always two entries: one for LB and UB ([0] and [j])*/
- for (i=1; i< flat_type->count -1; i++) {
- if( flat_type->blocklens[i] != 0) {
- opt_indices[j] = flat_type->indices[i];
- opt_blocklens[j] = flat_type->blocklens[i];
- j++;
- }
- }
- opt_indices[j] = flat_type->indices[flat_type->count -1];
- opt_blocklens[j] = flat_type->blocklens[flat_type->count -1];
-
- flat_type->count = opt_blocks;
- ADIOI_Free(flat_type->blocklens);
- ADIOI_Free(flat_type->indices);
- flat_type->blocklens = opt_blocklens;
- flat_type->indices = opt_indices;
- return;
-}
/****************************************************************/
@@ -1125,8 +1078,9 @@ static void removezeros(ADIOI_Flatlist_node *flat_type)
*
* NOTE: a further optimization would be to remove zero length blocks. However,
* the first and last blocks must remain as zero length first or last block
- * indicates UB and LB.
- *
+ * indicates UB and LB. Furthermore, once the "zero length blocklen" fix
+ * went in, the flattened representation should no longer have zero-length
+ * blocks except for UB and LB markers.
*/
void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type)
{
@@ -1168,7 +1122,6 @@ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type)
ADIOI_Free(flat_type->indices);
flat_type->blocklens = opt_blocklens;
flat_type->indices = opt_indices;
- removezeros(flat_type);
return;
}
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/common/flatten.c | 53 ++-------------------------------
src/mpi/romio/test/types_with_zeros.c | 4 +-
2 files changed, 5 insertions(+), 52 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list