commits
Threads by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
October 2013
- 1 participants
- 29 discussions
[mpich] MPICH primary repository branch, master, updated. v3.1b1-92-gf1dcc58
by noreply@mpich.org 17 Oct '13
by noreply@mpich.org 17 Oct '13
17 Oct '13
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 f1dcc582269b1b1f600716f900eafbdd2e220e1e (commit)
from da5d55417f26f263d7c94233fce0c25d68e2c26d (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/f1dcc582269b1b1f600716f900eafbdd2…
commit f1dcc582269b1b1f600716f900eafbdd2e220e1e
Author: Jan Bierbaum <jan.bierbaum(a)tudos.org>
Date: Mon Oct 14 10:39:16 2013 +0200
fix check for duplicate KVS entries
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/src/pm/hydra/pm/pmiserv/common.c b/src/pm/hydra/pm/pmiserv/common.c
index 6cb3a20..2fd99ef 100644
--- a/src/pm/hydra/pm/pmiserv/common.c
+++ b/src/pm/hydra/pm/pmiserv/common.c
@@ -155,7 +155,7 @@ void HYD_pmcd_free_pmi_kvs_list(struct HYD_pmcd_pmi_kvs *kvs_list)
HYD_status HYD_pmcd_pmi_add_kvs(const char *key, char *val, struct HYD_pmcd_pmi_kvs *kvs, int *ret)
{
- struct HYD_pmcd_pmi_kvs_pair *key_pair, *run;
+ struct HYD_pmcd_pmi_kvs_pair *key_pair, *run, *last;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
@@ -172,16 +172,16 @@ HYD_status HYD_pmcd_pmi_add_kvs(const char *key, char *val, struct HYD_pmcd_pmi_
kvs->key_pair = key_pair;
}
else {
- run = kvs->key_pair;
- while (run->next) {
+ for (run = kvs->key_pair; run; run = run->next) {
if (!strcmp(run->key, key_pair->key)) {
/* duplicate key found */
*ret = -1;
- break;
+ goto fn_fail;
}
- run = run->next;
+ last = run;
}
- run->next = key_pair;
+ /* Add key_pair to end of list. */
+ last->next = key_pair;
}
fn_exit:
@@ -189,5 +189,6 @@ HYD_status HYD_pmcd_pmi_add_kvs(const char *key, char *val, struct HYD_pmcd_pmi_
return status;
fn_fail:
+ HYDU_FREE(key_pair);
goto fn_exit;
}
-----------------------------------------------------------------------
Summary of changes:
src/pm/hydra/pm/pmiserv/common.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-91-gda5d554
by noreply@mpich.org 13 Oct '13
by noreply@mpich.org 13 Oct '13
13 Oct '13
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 da5d55417f26f263d7c94233fce0c25d68e2c26d (commit)
from 307e5fc6a7fc64cccd6956e18470008df71d2a77 (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/da5d55417f26f263d7c94233fce0c25d6…
commit da5d55417f26f263d7c94233fce0c25d68e2c26d
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Wed Oct 9 14:43:56 2013 -0500
Disable xfail test from running by default
xfails are primarily for our consumption, so we disable them by
default. This will result in cleaner test output for the average
user.
Also note that if the testsuite is configured in strict MPI mode,
all strict tests, regardless of xfail, will run.
Signed-off-by: Pavan Balaji <balaji(a)mcs.anl.gov>
diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac
index 574411d..b63ee20 100644
--- a/test/mpi/configure.ac
+++ b/test/mpi/configure.ac
@@ -172,6 +172,11 @@ AC_ARG_ENABLE(threads,
requiring a specific --enable-threads argument.],,
[enable_threads=default])
+AC_ARG_ENABLE(xfail,
+ [AC_HELP_STRING([--enable-xfail],
+ [Run tests marked for expected failure])],,
+ [enable_xfail=no])
+
AC_ARG_WITH(mpi,
[AC_HELP_STRING([--with-mpi=dir],
[Use the selected MPI; compilation scripts for mpicc,
@@ -351,6 +356,14 @@ if test "$enable_checkpointing" = "yes" ; then
fi
AC_SUBST(ckpointdir)
+#
+# Only run xfail tests if enabled
+RUN_XFAIL=false
+if test "$enable_xfail" = "yes" ; then
+ RUN_XFAIL=true
+fi
+AC_SUBST(RUN_XFAIL)
+
PAC_LOAD_BASE_CACHE
PAC_VPATH_CHECK()
PAC_PROG_MAKE
diff --git a/test/mpi/runtests.in b/test/mpi/runtests.in
index 8f8ea0a..ad15bb5 100644
--- a/test/mpi/runtests.in
+++ b/test/mpi/runtests.in
@@ -45,6 +45,7 @@ $MPIMinorVersion = "@MPI_SUBVERSION@";
$mpiexec = "@MPIEXEC@"; # Name of mpiexec program (including path, if necessary)
$testIsStrict = "@MPI_IS_STRICT@";
$MPIhasMPIX = "@MPI_HAS_MPIX@";
+$runxfail = "@RUN_XFAIL@";
$np_arg = "-n"; # Name of argument to specify the number of processes
$err_count = 0; # Number of programs that failed.
$total_run = 0; # Number of programs tested
@@ -456,6 +457,15 @@ sub RunList {
$xfail = '';
}
+ if ($xfail ne '' && $runxfail eq "false") {
+ # Skip xfail tests if they are not configured. Strict MPI tests that are
+ # marked xfail will still run with --enable-strictmpi.
+ unless (-d $programname) {
+ SkippedTest($programname, $np, $workdir, "xfail tests disabled");
+ }
+ next;
+ }
+
if (lc($requiresMPIX) eq "true" && lc($MPIHasMPIX) eq "no") {
unless (-d $programname) {
SkippedTest($programname, $np, $workdir, "tests MPIX extensions, MPIX testing disabled");
-----------------------------------------------------------------------
Summary of changes:
test/mpi/configure.ac | 13 +++++++++++++
test/mpi/runtests.in | 10 ++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-90-g307e5fc
by noreply@mpich.org 12 Oct '13
by noreply@mpich.org 12 Oct '13
12 Oct '13
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 307e5fc6a7fc64cccd6956e18470008df71d2a77 (commit)
from 0706e96cd741201560bc509615ba03b9b7b99a9d (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/307e5fc6a7fc64cccd6956e18470008df…
commit 307e5fc6a7fc64cccd6956e18470008df71d2a77
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Sat Oct 12 14:12:37 2013 -0500
teach type-dumping code about subarray
MPIDU_Datatype_debug is really helpful when trying to figure out what a
library or someone else's datatype code is feeding to MPICH. For some
reason it didn't know how to dump subarray types. now it does.
diff --git a/src/mpid/common/datatype/mpid_type_debug.c b/src/mpid/common/datatype/mpid_type_debug.c
index 4b0c239..8e895cf 100644
--- a/src/mpid/common/datatype/mpid_type_debug.c
+++ b/src/mpid/common/datatype/mpid_type_debug.c
@@ -635,6 +635,23 @@ void MPIDI_Datatype_contents_printf(MPI_Datatype type,
acount);
}
__mpidi_datatype_free_and_return;
+ case MPI_COMBINER_SUBARRAY:
+ MPIU_DBG_OUT_FMT(DATATYPE, (MPIU_DBG_FDEST,"# %ssubarray ct = %d:",
+ MPIDI_Datatype_depth_spacing(depth),
+ (int) ints[0]));
+ for (i=0; i< acount && i < ints[0]; i++) {
+ MPIU_DBG_OUT_FMT(DATATYPE,(MPIU_DBG_FDEST,
+ "# %s sizes[%d] = %d subsizes[%d] = %d starts[%d] = %d\n",
+ MPIDI_Datatype_depth_spacing(depth),
+ i, (int)ints[i+1],
+ i, (int)ints[i+ ints[0]+1],
+ i, (int)ints[2*ints[0]+1]));
+ }
+ MPIDI_Datatype_contents_printf(*types,
+ depth + 1,
+ acount);
+ __mpidi_datatype_free_and_return;
+
default:
MPIU_DBG_OUT_FMT(DATATYPE,(MPIU_DBG_FDEST,"# %sunhandled combiner",
MPIDI_Datatype_depth_spacing(depth)));
-----------------------------------------------------------------------
Summary of changes:
src/mpid/common/datatype/mpid_type_debug.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-89-g0706e96
by noreply@mpich.org 11 Oct '13
by noreply@mpich.org 11 Oct '13
11 Oct '13
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 0706e96cd741201560bc509615ba03b9b7b99a9d (commit)
via d18633acfccc0b61052e11e7777e4a57debb70aa (commit)
from a1b3657ef7310c0b54eb8cd9ea4eec610cc6d631 (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/0706e96cd741201560bc509615ba03b9b…
commit 0706e96cd741201560bc509615ba03b9b7b99a9d
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Wed Oct 9 17:03:47 2013 -0500
Warning squash.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/test/mpi/datatype/get-elements-pairtype.c b/test/mpi/datatype/get-elements-pairtype.c
index 56afdba..d813b2a 100644
--- a/test/mpi/datatype/get-elements-pairtype.c
+++ b/test/mpi/datatype/get-elements-pairtype.c
@@ -69,8 +69,8 @@ int double_int_test(void)
MPI_Type_create_struct(3, blks, disps, types, &stype);
MPI_Type_commit(&stype);
- err = MPI_Sendrecv(&foo, 1, stype, 0, 0,
- &bar, 2, MPI_DOUBLE_INT, 0, 0,
+ err = MPI_Sendrecv((const void *) &foo, 1, stype, 0, 0,
+ (void *) &bar, 2, MPI_DOUBLE_INT, 0, 0,
MPI_COMM_SELF, &recvstatus);
if (err != MPI_SUCCESS) {
errs++;
http://git.mpich.org/mpich.git/commitdiff/d18633acfccc0b61052e11e7777e4a57d…
commit d18633acfccc0b61052e11e7777e4a57debb70aa
Author: Pavan Balaji <balaji(a)mcs.anl.gov>
Date: Wed Oct 9 12:33:22 2013 -0500
clang compilation fixes.
clang seems to be unhappy when we use "0" instead of "NULL" for buffer
addresses.
Signed-off-by: Ken Raffenetti <raffenet(a)mcs.anl.gov>
diff --git a/test/mpi/comm/cmfree.c b/test/mpi/comm/cmfree.c
index df37772..771a12a 100644
--- a/test/mpi/comm/cmfree.c
+++ b/test/mpi/comm/cmfree.c
@@ -64,8 +64,8 @@ int main( int argc, char *argv[] )
MPI_Comm_split( MPI_COMM_WORLD, 0, size - rank, &tmpComm[i] );
}
- MPI_Sendrecv( 0, 0, MPI_INT, source, 1,
- 0, 0, MPI_INT, source, 1, MPI_COMM_WORLD, &status );
+ MPI_Sendrecv( NULL, 0, MPI_INT, source, 1,
+ NULL, 0, MPI_INT, source, 1, MPI_COMM_WORLD, &status );
MPI_Wait( &req, &status );
for (i=0; i<NELM; i++) {
@@ -89,8 +89,8 @@ int main( int argc, char *argv[] )
MPI_Comm_split( MPI_COMM_WORLD, 0, size - rank, &tmpComm[i] );
}
/* Synchronize with the receiver */
- MPI_Sendrecv( 0, 0, MPI_INT, dest, 1,
- 0, 0, MPI_INT, dest, 1, MPI_COMM_WORLD, &status );
+ MPI_Sendrecv( NULL, 0, MPI_INT, dest, 1,
+ NULL, 0, MPI_INT, dest, 1, MPI_COMM_WORLD, &status );
MPI_Send( buf, NELM, MPI_INT, dest, 0, comm );
free( buf );
}
diff --git a/test/mpi/datatype/tfree.c b/test/mpi/datatype/tfree.c
index d38fb7f..301eca8 100644
--- a/test/mpi/datatype/tfree.c
+++ b/test/mpi/datatype/tfree.c
@@ -65,8 +65,8 @@ int main( int argc, char *argv[] )
MPI_Type_commit( &tmpType[i] );
}
- MPI_Sendrecv( 0, 0, MPI_INT, source, 1,
- 0, 0, MPI_INT, source, 1, comm, &status );
+ MPI_Sendrecv( NULL, 0, MPI_INT, source, 1,
+ NULL, 0, MPI_INT, source, 1, comm, &status );
MPI_Wait( &req, &status );
for (i=0; i<VEC_NELM; i++) {
@@ -87,8 +87,8 @@ int main( int argc, char *argv[] )
buf = (int *)malloc( VEC_NELM * sizeof(int) );
for (i=0; i<VEC_NELM; i++) buf[i] = i;
/* Synchronize with the receiver */
- MPI_Sendrecv( 0, 0, MPI_INT, dest, 1,
- 0, 0, MPI_INT, dest, 1, comm, &status );
+ MPI_Sendrecv( NULL, 0, MPI_INT, dest, 1,
+ NULL, 0, MPI_INT, dest, 1, comm, &status );
MPI_Send( buf, VEC_NELM, MPI_INT, dest, 0, comm );
free( buf );
}
diff --git a/test/mpi/pt2pt/bsendpending.c b/test/mpi/pt2pt/bsendpending.c
index cc7cc5a..ab5a5d2 100644
--- a/test/mpi/pt2pt/bsendpending.c
+++ b/test/mpi/pt2pt/bsendpending.c
@@ -70,8 +70,8 @@ int main( int argc, char *argv[] )
MPI_Bsend( msg3, msgsize, MPI_CHAR, dest, 0, comm );
/* Synchronize with our partner */
- MPI_Sendrecv( 0, 0, MPI_CHAR, dest, 10,
- 0, 0, MPI_CHAR, dest, 10, comm, MPI_STATUS_IGNORE );
+ MPI_Sendrecv( NULL, 0, MPI_CHAR, dest, 10,
+ NULL, 0, MPI_CHAR, dest, 10, comm, MPI_STATUS_IGNORE );
/* Detach the buffers. There should be pending operations */
MPI_Buffer_detach ( &bufp, &outsize );
@@ -95,8 +95,8 @@ int main( int argc, char *argv[] )
}
/* Wait for the synchronize */
- MPI_Sendrecv( 0, 0, MPI_CHAR, source, 10,
- 0, 0, MPI_CHAR, source, 10, comm, MPI_STATUS_IGNORE );
+ MPI_Sendrecv( NULL, 0, MPI_CHAR, source, 10,
+ NULL, 0, MPI_CHAR, source, 10, comm, MPI_STATUS_IGNORE );
/* Wait 2 seconds */
tstart = MPI_Wtime();
diff --git a/test/mpi/pt2pt/isendself.c b/test/mpi/pt2pt/isendself.c
index 2815959..2e6527a 100644
--- a/test/mpi/pt2pt/isendself.c
+++ b/test/mpi/pt2pt/isendself.c
@@ -38,8 +38,8 @@ int main( int argc, char *argv[] )
/* printf( "b[0] = %d\n", b[0] );*/
MPI_Wait( &request, &status );
- MPI_Isend( 0, 0, MPI_INT, rank, 0, MPI_COMM_WORLD, &request );
- MPI_Recv( 0, 0, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD,
+ MPI_Isend( NULL, 0, MPI_INT, rank, 0, MPI_COMM_WORLD, &request );
+ MPI_Recv( NULL, 0, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD,
&status );
MPI_Get_count( &status, MPI_INT, &count );
if (status.MPI_SOURCE != rank ||
-----------------------------------------------------------------------
Summary of changes:
test/mpi/comm/cmfree.c | 8 ++++----
test/mpi/datatype/get-elements-pairtype.c | 4 ++--
test/mpi/datatype/tfree.c | 8 ++++----
test/mpi/pt2pt/bsendpending.c | 8 ++++----
test/mpi/pt2pt/isendself.c | 4 ++--
5 files changed, 16 insertions(+), 16 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-87-ga1b3657
by noreply@mpich.org 09 Oct '13
by noreply@mpich.org 09 Oct '13
09 Oct '13
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 a1b3657ef7310c0b54eb8cd9ea4eec610cc6d631 (commit)
via 7d94f24ca6c91e14ce7e600d7a0faba012b480cb (commit)
from 4a13e98629fd3bd8d2004ab5f5ea7c6e851bce57 (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/a1b3657ef7310c0b54eb8cd9ea4eec610…
commit a1b3657ef7310c0b54eb8cd9ea4eec610cc6d631
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Wed Oct 9 13:58:54 2013 -0500
clang finds an incorrect header guard
bglockless feature file should not define anything pvfs2 related.
diff --git a/src/mpi/romio/adio/ad_bglockless/ad_bglockless.h b/src/mpi/romio/adio/ad_bglockless/ad_bglockless.h
index 594dec2..cf753bc 100644
--- a/src/mpi/romio/adio/ad_bglockless/ad_bglockless.h
+++ b/src/mpi/romio/adio/ad_bglockless/ad_bglockless.h
@@ -6,7 +6,7 @@
*/
#ifndef AD_BGLOCKLESS_INCLUDE
-#define AD_PVFS2_INCLUDE
+#define AD_BGLOCKLESS_INCLUDE
int ADIOI_BGLOCKLESS_Feature(ADIO_File fd, int flag);
http://git.mpich.org/mpich.git/commitdiff/7d94f24ca6c91e14ce7e600d7a0faba01…
commit 7d94f24ca6c91e14ce7e600d7a0faba012b480cb
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Wed Oct 9 13:58:16 2013 -0500
removed unused variable
this guy no longer gets used now that there's common hint processing
code
diff --git a/src/mpi/romio/adio/ad_bg/ad_bg_hints.c b/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
index 1866df5..65aaea7 100644
--- a/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
+++ b/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
@@ -57,7 +57,7 @@ void ADIOI_BG_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
MPI_Info info;
char *value;
- int flag, intval, tmp_val, nprocs=0, nprocs_is_valid = 0;
+ int flag, intval, nprocs=0, nprocs_is_valid = 0;
static char myname[] = "ADIOI_BG_SETINFO";
int did_anything = 0;
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/ad_bg/ad_bg_hints.c | 2 +-
src/mpi/romio/adio/ad_bglockless/ad_bglockless.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-85-g4a13e98
by noreply@mpich.org 07 Oct '13
by noreply@mpich.org 07 Oct '13
07 Oct '13
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 4a13e98629fd3bd8d2004ab5f5ea7c6e851bce57 (commit)
via f8901ffe8923a9a1a9e155593e79a2dc7a6ec209 (commit)
from 0590d5431bb3b5976491f476a07f5533c8e36f5d (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/4a13e98629fd3bd8d2004ab5f5ea7c6e8…
commit 4a13e98629fd3bd8d2004ab5f5ea7c6e851bce57
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Fri Oct 4 16:18:38 2013 -0500
compile error
diff --git a/src/mpi/romio/adio/ad_bg/ad_bg_hints.c b/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
index 47a0e77..1866df5 100644
--- a/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
+++ b/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
@@ -258,7 +258,6 @@ void ADIOI_BG_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
process hints for it. */
ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
&(fd->hints->striping_unit), myname, error_code);
- }
memset( value, 0, MPI_MAX_INFO_VAL+1 );
ADIOI_Info_get(users_info, ADIOI_BG_NAGG_IN_PSET_HINT_NAME, MPI_MAX_INFO_VAL,
http://git.mpich.org/mpich.git/commitdiff/f8901ffe8923a9a1a9e155593e79a2dc7…
commit f8901ffe8923a9a1a9e155593e79a2dc7a6ec209
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Wed Oct 2 16:39:40 2013 -0500
improve comments, formatting on some tricky code
I end up looking at this code only about once every six months. Add
more comments so the next time I'm here, I don't have to re-learn the
teeny-tiny details.
diff --git a/src/mpi/romio/adio/ad_bg/ad_bg_aggrs.c b/src/mpi/romio/adio/ad_bg/ad_bg_aggrs.c
index 0d6ab5b..d8b42ef 100644
--- a/src/mpi/romio/adio/ad_bg/ad_bg_aggrs.c
+++ b/src/mpi/romio/adio/ad_bg/ad_bg_aggrs.c
@@ -520,14 +520,43 @@ void ADIOI_BG_GPFS_Calc_file_domains(ADIO_Offset *st_offsets,
fd_start = *fd_start_ptr;
fd_end = *fd_end_ptr;
+ /* each process will have a file domain of some number of gpfs blocks, but
+ * the division of blocks is not likely to be even. Some file domains will
+ * be "large" and others "small"
+ *
+ * Example: consider 17 blocks distributed over 3 aggregators.
+ * nb_cn_small = 17/3 = 5
+ * naggs_large = 17 - 3*(17/3) = 17 - 15 = 2
+ * naggs_small = 3 - 2 = 1
+ *
+ * and you end up with file domains of {5-blocks, 6-blocks, 6-blocks}
+ *
+ * what about (relatively) small files? say, a file of 1000 blocks
+ * distributed over 2064 aggregators:
+ * nb_cn_small = 1000/2064 = 0
+ * naggs_large = 1000 - 2064*(1000/2064) = 1000
+ * naggs_small = 2064 - 1000 = 1064
+ * and you end up with domains of {0, 0, 0, ... 1, 1, 1 ...}
+ *
+ * it might be a good idea instead of having all the zeros up front, to
+ * "mix" those zeros into the fd_size array. that way, no pset/bridge-set
+ * is left with zero work. In fact, even if the small file domains aren't
+ * zero, it's probably still a good idea to mix the "small" file domains
+ * across the fd_size array to keep the io nodes in balance */
+
+
ADIO_Offset n_gpfs_blk = fd_gpfs_range / blksize;
ADIO_Offset nb_cn_small = n_gpfs_blk/naggs;
ADIO_Offset naggs_large = n_gpfs_blk - naggs * (n_gpfs_blk/naggs);
ADIO_Offset naggs_small = naggs - naggs_large;
- for (i=0; i<naggs; i++)
- if (i < naggs_small) fd_size[i] = nb_cn_small * blksize;
- else fd_size[i] = (nb_cn_small+1) * blksize;
+ for (i=0; i<naggs; i++) {
+ if (i < naggs_small) {
+ fd_size[i] = nb_cn_small * blksize;
+ } else {
+ fd_size[i] = (nb_cn_small+1) * blksize;
+ }
+ }
# if AGG_DEBUG
DBG_FPRINTF(stderr,"%s(%d): "
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/ad_bg/ad_bg_aggrs.c | 35 +++++++++++++++++++++++++++++--
src/mpi/romio/adio/ad_bg/ad_bg_hints.c | 1 -
2 files changed, 32 insertions(+), 4 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-83-g0590d54
by noreply@mpich.org 04 Oct '13
by noreply@mpich.org 04 Oct '13
04 Oct '13
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 0590d5431bb3b5976491f476a07f5533c8e36f5d (commit)
via edaa8396d770222318f771a26bda7057ba864fff (commit)
via b15761fc38ba3e97cabd349aafee48cee7926f9c (commit)
via 3fb810c0662fe0a94fbddb94f5bd809f8f982f4f (commit)
via 270d5115c0cbd7a796da021936e69d8c25e5ed45 (commit)
from 3b3bd0654f69b0415a7a5d07ef3379fac0b6b799 (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/0590d5431bb3b5976491f476a07f5533c…
commit 0590d5431bb3b5976491f476a07f5533c8e36f5d
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Jun 25 17:23:21 2013 -0500
update adio drivers to use common hint processing funcs
drivers updated:
- ad_bgl
- ad_bg
- ad_lustre
- ad_panfs
- ad_pvfs2
Reviewed-by: Rajeev Thakur <thakur(a)mcs.anl.gov>
diff --git a/src/mpi/romio/adio/ad_bg/ad_bg_hints.c b/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
index 22b5e37..47a0e77 100644
--- a/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
+++ b/src/mpi/romio/adio/ad_bg/ad_bg_hints.c
@@ -14,6 +14,7 @@
#include "adio.h"
#include "adio_extern.h"
+#include "hint_fns.h"
#include "ad_bg.h"
#include "ad_bg_pset.h"
@@ -168,317 +169,83 @@ void ADIOI_BG_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
/* add in user's info if supplied */
if (users_info != MPI_INFO_NULL) {
- ADIOI_Info_get(users_info, "cb_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "cb_buffer_size",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "cb_buffer_size", value);
- fd->hints->cb_buffer_size = intval;
-
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size",
+ &(fd->hints->cb_buffer_size), myname, error_code);
#if 0
/* bg is not implementing file realms (ADIOI_IOStridedColl) ... */
/* aligning file realms to certain sizes (e.g. stripe sizes)
* may benefit I/O performance */
- ADIOI_Info_get(users_info, "romio_cb_fr_alignment", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_fr_alignment",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_fr_alignment", value);
- fd->hints->cb_fr_alignment = intval;
-
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_alignment",
+ &(fd->hints->cb_fr_alignment), myname, error_code);
/* for collective I/O, try to be smarter about when to do data sieving
* using a specific threshold for the datatype size/extent
* (percentage 0-100%) */
- ADIOI_Info_get(users_info, "romio_cb_ds_threshold", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_ds_threshold",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_ds_threshold", value);
- fd->hints->cb_ds_threshold = intval;
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_ds_threshold",
+ &(fd->hints->cb_ds_threshold), myname, error_code);
- }
- ADIOI_Info_get(users_info, "romio_cb_alltoall", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_alltoall;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_alltoall) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_alltoall",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_alltoall",
+ &(fd->hints->cb_alltoall), myname, error_code);
#endif
/* new hints for enabling/disabling coll. buffering on
* reads/writes
*/
- ADIOI_Info_get(users_info, "romio_cb_read", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_read", value);
- fd->hints->cb_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- /* romio_cb_read overrides no_indep_rw */
- ADIOI_Info_set(info, "romio_cb_read", value);
- ADIOI_Info_set(info, "romio_no_indep_rw", "false");
- fd->hints->cb_read = ADIOI_HINT_DISABLE;
- fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_read", value);
- fd->hints->cb_read = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_read;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_read) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_read",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_read",
+ &(fd->hints->cb_read), myname, error_code);
+ if (fd->hints->cb_read == ADIOI_HINT_DISABLE) {
+ /* romio_cb_read overrides no_indep_rw */
+ ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+ fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
}
- ADIOI_Info_get(users_info, "romio_cb_write", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_write", value);
- fd->hints->cb_write = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE"))
- {
- /* romio_cb_write overrides no_indep_rw, too */
- ADIOI_Info_set(info, "romio_cb_write", value);
- ADIOI_Info_set(info, "romio_no_indep_rw", "false");
- fd->hints->cb_write = ADIOI_HINT_DISABLE;
- fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") ||
- !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_write", value);
- fd->hints->cb_write = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_write;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_write) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_write",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_write",
+ &(fd->hints->cb_write), myname, error_code);
+ if (fd->hints->cb_write == ADIOI_HINT_DISABLE) {
+ /* romio_cb_write overrides no_indep_rw */
+ ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+ fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
}
-
#if 0
/* bg is not implementing file realms (ADIOI_IOStridedColl) ... */
/* enable/disable persistent file realms for collective I/O */
/* may want to check for no_indep_rdwr hint as well */
- ADIOI_Info_get(users_info, "romio_cb_pfr", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_pfr;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_pfr) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_pfr",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
-
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_pfr",
+ &(fd->hints->cb_pfr), myname, error_code);
+
/* file realm assignment types ADIOI_FR_AAR(0),
ADIOI_FR_FSZ(-1), ADIOI_FR_USR_REALMS(-2), all others specify
a regular fr size in bytes. probably not the best way... */
- ADIOI_Info_get(users_info, "romio_cb_fr_type", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) >= -2)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_fr_type",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_fr_type", value);
- fd->hints->cb_fr_type = intval;
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_type",
+ &(fd->hints->cb_fr_type), myname, error_code);
- }
#endif
- /* new hint for specifying no indep. read/write will be performed */
- ADIOI_Info_get(users_info, "romio_no_indep_rw", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "true") || !strcmp(value, "TRUE")) {
- /* if 'no_indep_rw' set, also hint that we will do
- * collective buffering: if we aren't doing independent io,
- * then we have to do collective */
- ADIOI_Info_set(info, "romio_no_indep_rw", value);
- ADIOI_Info_set(info, "romio_cb_write", "enable");
- ADIOI_Info_set(info, "romio_cb_read", "enable");
- fd->hints->no_indep_rw = 1;
- fd->hints->cb_read = 1;
- fd->hints->cb_write = 1;
- tmp_val = 1;
- }
- else if (!strcmp(value, "false") || !strcmp(value, "FALSE")) {
- ADIOI_Info_set(info, "romio_no_indep_rw", value);
- fd->hints->no_indep_rw = 0;
- tmp_val = 0;
- }
- else {
- /* default is above */
- tmp_val = 0;
- }
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->no_indep_rw) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_no_indep_rw",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ /* Has the user indicated all I/O will be done collectively? */
+ ADIOI_Info_check_and_install_true(fd, users_info, "romio_no_indep_rw",
+ &(fd->hints->no_indep_rw), myname, error_code);
+ if (fd->hints->no_indep_rw == 1) {
+ /* if 'no_indep_rw' set, also hint that we will do
+ * collective buffering: if we aren't doing independent io,
+ * then we have to do collective */
+ ADIOI_Info_set(info, "romio_cb_write", "enable");
+ ADIOI_Info_set(info, "romio_cb_read", "enable");
+ fd->hints->cb_read = 1;
+ fd->hints->cb_write = 1;
+ }
+
/* new hints for enabling/disabling data sieving on
* reads/writes
*/
- ADIOI_Info_get(users_info, "romio_ds_read", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_AUTO;
- }
- /* otherwise ignore */
- }
- ADIOI_Info_get(users_info, "romio_ds_write", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_AUTO;
- }
- /* otherwise ignore */
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_read",
+ &(fd->hints->ds_read), myname, error_code);
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_write",
+ &(fd->hints->ds_write), myname, error_code);
- ADIOI_Info_get(users_info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval = atoi(value)) > 0)) {
- ADIOI_Info_set(info, "ind_wr_buffer_size", value);
- fd->hints->ind_wr_buffer_size = intval;
- }
- ADIOI_Info_get(users_info, "ind_rd_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval = atoi(value)) > 0)) {
- ADIOI_Info_set(info, "ind_rd_buffer_size", value);
- fd->hints->ind_rd_buffer_size = intval;
- }
+
+ ADIOI_Info_check_and_install_int(fd, users_info, "ind_wr_buffer_size",
+ &(fd->hints->ind_wr_buffer_size), myname, error_code);
+ ADIOI_Info_check_and_install_int(fd, users_info, "ind_rd_buffer_size",
+ &(fd->hints->ind_rd_buffer_size), myname, error_code);
+
memset( value, 0, MPI_MAX_INFO_VAL+1 );
ADIOI_Info_get(users_info, "romio_min_fdomain_size", MPI_MAX_INFO_VAL,
@@ -489,11 +256,8 @@ void ADIOI_BG_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
}
/* Now we use striping unit in common code so we should
process hints for it. */
- ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL,
- value, &flag);
- if ( flag && ((intval = atoi(value)) > 0) ) {
- ADIOI_Info_set(info, "striping_unit", value);
- fd->hints->striping_unit = intval;
+ ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
+ &(fd->hints->striping_unit), myname, error_code);
}
memset( value, 0, MPI_MAX_INFO_VAL+1 );
diff --git a/src/mpi/romio/adio/ad_bgl/ad_bgl_hints.c b/src/mpi/romio/adio/ad_bgl/ad_bgl_hints.c
index d106eea..e9f5a31 100644
--- a/src/mpi/romio/adio/ad_bgl/ad_bgl_hints.c
+++ b/src/mpi/romio/adio/ad_bgl/ad_bgl_hints.c
@@ -14,6 +14,7 @@
#include "adio.h"
#include "adio_extern.h"
+#include "hints_fn.h"
#include "ad_bgl.h"
#include "ad_bgl_pset.h"
@@ -56,7 +57,7 @@ void ADIOI_BGL_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
MPI_Info info;
char *value;
- int flag, intval, tmp_val, nprocs=0, nprocs_is_valid = 0;
+ int flag, intval, tmp_val, nprocs=0;
static char myname[] = "ADIOI_BGL_SETINFO";
int did_anything = 0;
@@ -95,7 +96,6 @@ void ADIOI_BGL_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
/* number of processes that perform I/O in collective I/O */
MPI_Comm_size(fd->comm, &nprocs);
- nprocs_is_valid = 1;
ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", nprocs);
ADIOI_Info_set(info, "cb_nodes", value);
fd->hints->cb_nodes = -1;
@@ -167,332 +167,92 @@ void ADIOI_BGL_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
/* add in user's info if supplied */
if (users_info != MPI_INFO_NULL) {
- ADIOI_Info_get(users_info, "cb_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "cb_buffer_size",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "cb_buffer_size", value);
- fd->hints->cb_buffer_size = intval;
-
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size",
+ &(fd->hints->cb_buffer_size), myname, error_code);
#if 0
/* bgl is not implementing file realms (ADIOI_IOStridedColl) ... */
/* aligning file realms to certain sizes (e.g. stripe sizes)
* may benefit I/O performance */
- ADIOI_Info_get(users_info, "romio_cb_fr_alignment", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_fr_alignment",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_fr_alignment", value);
- fd->hints->cb_fr_alignment = intval;
-
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_alignment",
+ &(fd->hints->cb_fr_alignment), myname, error_code);
/* for collective I/O, try to be smarter about when to do data sieving
* using a specific threshold for the datatype size/extent
* (percentage 0-100%) */
- ADIOI_Info_get(users_info, "romio_cb_ds_threshold", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_ds_threshold",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_ds_threshold", value);
- fd->hints->cb_ds_threshold = intval;
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_ds_threshold",
+ &(fd->hints->cb_ds_threshold), myname, error_code);
- }
- ADIOI_Info_get(users_info, "romio_cb_alltoall", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_alltoall;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_alltoall) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_alltoall",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_alltoall",
+ &(fd->hints->cb_alltoall), myname, error_code);
#endif
/* new hints for enabling/disabling coll. buffering on
* reads/writes
*/
- ADIOI_Info_get(users_info, "romio_cb_read", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_read", value);
- fd->hints->cb_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- /* romio_cb_read overrides no_indep_rw */
- ADIOI_Info_set(info, "romio_cb_read", value);
- ADIOI_Info_set(info, "romio_no_indep_rw", "false");
- fd->hints->cb_read = ADIOI_HINT_DISABLE;
- fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_read", value);
- fd->hints->cb_read = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_read;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_read) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_read",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_read",
+ &(fd->hints->cb_read), myname, error_code);
+ if (fd->hints->cb_read == ADIOI_HINT_DISABLE) {
+ /* romio_cb_read overrides no_indep_rw */
+ ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+ fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
}
- ADIOI_Info_get(users_info, "romio_cb_write", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_write", value);
- fd->hints->cb_write = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE"))
- {
- /* romio_cb_write overrides no_indep_rw, too */
- ADIOI_Info_set(info, "romio_cb_write", value);
- ADIOI_Info_set(info, "romio_no_indep_rw", "false");
- fd->hints->cb_write = ADIOI_HINT_DISABLE;
- fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") ||
- !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_write", value);
- fd->hints->cb_write = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_write;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_write) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_write",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
+
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_write",
+ &(fd->hints->cb_write), myname, error_code);
+ if (fd->hints->cb_write == ADIOI_HINT_DISABLE) {
+ /* romio_cb_write overrides no_indep_rw */
+ ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+ fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
}
+
#if 0
/* bgl is not implementing file realms (ADIOI_IOStridedColl) ... */
/* enable/disable persistent file realms for collective I/O */
/* may want to check for no_indep_rdwr hint as well */
- ADIOI_Info_get(users_info, "romio_cb_pfr", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_pfr;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_pfr) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_pfr",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_pfr",
+ &(fd->hints->cb_pfr), myname, error_code);
+
/* file realm assignment types ADIOI_FR_AAR(0),
ADIOI_FR_FSZ(-1), ADIOI_FR_USR_REALMS(-2), all others specify
a regular fr size in bytes. probably not the best way... */
- ADIOI_Info_get(users_info, "romio_cb_fr_type", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) >= -2)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_fr_type",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_fr_type", value);
- fd->hints->cb_fr_type = intval;
-
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_type",
+ &(fd->hints->cb_fr_type), myname, error_code);
#endif
- /* new hint for specifying no indep. read/write will be performed */
- ADIOI_Info_get(users_info, "romio_no_indep_rw", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "true") || !strcmp(value, "TRUE")) {
- /* if 'no_indep_rw' set, also hint that we will do
- * collective buffering: if we aren't doing independent io,
- * then we have to do collective */
- ADIOI_Info_set(info, "romio_no_indep_rw", value);
- ADIOI_Info_set(info, "romio_cb_write", "enable");
- ADIOI_Info_set(info, "romio_cb_read", "enable");
- fd->hints->no_indep_rw = 1;
- fd->hints->cb_read = 1;
- fd->hints->cb_write = 1;
- tmp_val = 1;
- }
- else if (!strcmp(value, "false") || !strcmp(value, "FALSE")) {
- ADIOI_Info_set(info, "romio_no_indep_rw", value);
- fd->hints->no_indep_rw = 0;
- tmp_val = 0;
- }
- else {
- /* default is above */
- tmp_val = 0;
- }
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->no_indep_rw) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_no_indep_rw",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ /* Has the user indicated all I/O will be done collectively? */
+ ADIOI_Info_check_and_install_true(fd, users_info, "romio_no_indep_rw",
+ &(fd->hints->no_indep_rw), myname, error_code);
+ if (fd->hints->no_indep_rw == 1) {
+ /* if 'no_indep_rw' set, also hint that we will do
+ * collective buffering: if we aren't doing independent io,
+ * then we have to do collective */
+ ADIOI_Info_set(info, "romio_cb_write", "enable");
+ ADIOI_Info_set(info, "romio_cb_read", "enable");
+ fd->hints->cb_read = 1;
+ fd->hints->cb_write = 1;
+ }
/* new hints for enabling/disabling data sieving on
* reads/writes
*/
- ADIOI_Info_get(users_info, "romio_ds_read", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_AUTO;
- }
- /* otherwise ignore */
- }
- ADIOI_Info_get(users_info, "romio_ds_write", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_AUTO;
- }
- /* otherwise ignore */
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_read",
+ &(fd->hints->ds_read), myname, error_code);
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_write",
+ &(fd->hints->ds_write), myname, error_code);
}
- ADIOI_Info_get(users_info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval = atoi(value)) > 0)) {
- ADIOI_Info_set(info, "ind_wr_buffer_size", value);
- fd->hints->ind_wr_buffer_size = intval;
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "ind_wr_buffer_size",
+ &(fd->hints->ind_wr_buffer_size), myname, error_code);
+ ADIOI_Info_check_and_install_int(fd, users_info, "ind_rd_buffer_size",
+ &(fd->hints->ind_rd_buffer_size), myname, error_code);
- ADIOI_Info_get(users_info, "ind_rd_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval = atoi(value)) > 0)) {
- ADIOI_Info_set(info, "ind_rd_buffer_size", value);
- fd->hints->ind_rd_buffer_size = intval;
- }
- memset( value, 0, MPI_MAX_INFO_VAL+1 );
- ADIOI_Info_get(users_info, "romio_min_fdomain_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if ( flag && ((intval = atoi(value)) > 0) ) {
- ADIOI_Info_set(info, "romio_min_fdomain_size", value);
- fd->hints->min_fdomain_size = intval;
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_min_fdomain_size",
+ &(fd->hints->min_fdomain_size), myname, error_code);
}
/* Now we use striping unit in common code so we should
process hints for it. */
- ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL,
- value, &flag);
- if ( flag && ((intval = atoi(value)) > 0) ) {
- ADIOI_Info_set(info, "striping_unit", value);
- fd->hints->striping_unit = intval;
+ ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
+ &(fd->hints->striping_unit), myname, error_code);
}
memset( value, 0, MPI_MAX_INFO_VAL+1 );
diff --git a/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c b/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c
index ea2c4ba..8872e01 100644
--- a/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c
+++ b/src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c
@@ -10,6 +10,7 @@
#include "ad_lustre.h"
#include "adio_extern.h"
+#include "hint_fns.h"
void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
{
@@ -138,56 +139,19 @@ void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
if (users_info != MPI_INFO_NULL) {
/* CO: IO Clients/OST,
* to keep the load balancing between clients and OSTs */
- ADIOI_Info_get(users_info, "romio_lustre_co_ratio", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag && (int_val = atoi(value)) > 0) {
- tmp_val = int_val;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != int_val) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_lustre_co_ratio",
- error_code);
- ADIOI_Free(value);
- return;
- }
- ADIOI_Info_set(fd->info, "romio_lustre_co_ratio", value);
- fd->hints->fs_hints.lustre.co_ratio = atoi(value);
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_lustre_co_ratio",
+ &(fd->hints->fs_hints.lustre.co_ratio));
+
/* coll_threshold:
* if the req size is bigger than this, collective IO may not be performed.
*/
- ADIOI_Info_get(users_info, "romio_lustre_coll_threshold", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag && (int_val = atoi(value)) > 0) {
- tmp_val = int_val;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != int_val) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_lustre_coll_threshold",
- error_code);
- ADIOI_Free(value);
- return;
- }
- ADIOI_Info_set(fd->info, "romio_lustre_coll_threshold", value);
- fd->hints->fs_hints.lustre.coll_threshold = atoi(value);
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_lustre_coll_threshold",
+ &(fd->hints->fs_hints.lustre.coll_threshold) );
+
/* ds_in_coll: disable data sieving in collective IO */
- ADIOI_Info_get(users_info, "romio_lustre_ds_in_coll", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && (!strcmp(value, "disable") ||
- !strcmp(value, "DISABLE"))) {
- tmp_val = int_val = 2;
- MPI_Bcast(&tmp_val, 2, MPI_INT, 0, fd->comm);
- if (tmp_val != int_val) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_lustre_ds_in_coll",
- error_code);
- ADIOI_Free(value);
- return;
- }
- ADIOI_Info_set(fd->info, "romio_lustre_ds_in_coll", "disable");
- fd->hints->fs_hints.lustre.ds_in_coll = ADIOI_HINT_DISABLE;
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_lustre_ds_in_coll",
+ &(fd->hints->fs_hints.lustre.ds_in_coll) );
+
}
/* set the values for collective I/O and data sieving parameters */
ADIOI_GEN_SetInfo(fd, users_info, error_code);
diff --git a/src/mpi/romio/adio/ad_panfs/ad_panfs_hints.c b/src/mpi/romio/adio/ad_panfs/ad_panfs_hints.c
index 4931eb8..f6e6615 100644
--- a/src/mpi/romio/adio/ad_panfs/ad_panfs_hints.c
+++ b/src/mpi/romio/adio/ad_panfs/ad_panfs_hints.c
@@ -8,6 +8,7 @@
#include "ad_panfs.h"
#include <pan_fs_client_cw_mode.h>
+#include "hint_fns.h"
void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
{
@@ -36,101 +37,33 @@ void ADIOI_PANFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
/* has user specified striping parameters
and do they have the same value on all processes? */
if (users_info != MPI_INFO_NULL) {
- value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
- ADIOI_Info_get(users_info, "panfs_concurrent_write", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag) {
- concurrent_write = strtoul(value,NULL,10);
- tmp_val = concurrent_write;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != concurrent_write) {
- FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_concurrent_write\" must be the same on all processes\n");
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
- ADIOI_Info_set(fd->info, "panfs_concurrent_write", value);
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "panfs_concurrent_write",
+ NULL, myname, error_code);
- ADIOI_Info_get(users_info, "panfs_layout_type", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag) {
- layout_type = strtoul(value,NULL,10);
- tmp_val = layout_type;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != layout_type) {
- FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_type\" must be the same on all processes\n");
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
- ADIOI_Info_set(fd->info, "panfs_layout_type", value);
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "panfs_layout_type",
+ NULL, myname, error_code);
- ADIOI_Info_get(users_info, "panfs_layout_stripe_unit", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag) {
- layout_stripe_unit = strtoul(value,NULL,10);
- tmp_val = layout_stripe_unit;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != layout_stripe_unit) {
- FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_stripe_unit\" must be the same on all processes\n");
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
- ADIOI_Info_set(fd->info, "panfs_layout_stripe_unit", value);
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "panfs_layout_stripe_unit",
+ NULL, myname, error_code);
- ADIOI_Info_get(users_info, "panfs_layout_parity_stripe_width", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE)) {
- layout_parity_stripe_width = strtoul(value,NULL,10);
- tmp_val = layout_parity_stripe_width;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != layout_parity_stripe_width) {
- FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_parity_stripe_width\" must be the same on all processes\n");
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
- ADIOI_Info_set(fd->info, "panfs_layout_parity_stripe_width", value);
- }
+ /* strange: there was a check "layout_type ==
+ * PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE, but
+ * nothing ever touched layout_type */
+ ADIOI_Info_check_and_install_int(fd, users_info,
+ "panfs_layout_parity_stripe_width", NULL, myname, error_code);
- ADIOI_Info_get(users_info, "panfs_layout_parity_stripe_depth", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE)) {
- layout_parity_stripe_depth = strtoul(value,NULL,10);
- tmp_val = layout_parity_stripe_depth;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != layout_parity_stripe_depth) {
- FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_parity_stripe_depth\" must be the same on all processes\n");
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
- ADIOI_Info_set(fd->info, "panfs_layout_parity_stripe_depth", value);
- }
-
- ADIOI_Info_get(users_info, "panfs_layout_total_num_comps", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag) {
- layout_total_num_comps = strtoul(value,NULL,10);
- tmp_val = layout_total_num_comps;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != layout_total_num_comps) {
- FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_total_num_comps\" must be the same on all processes\n");
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
- ADIOI_Info_set(fd->info, "panfs_layout_total_num_comps", value);
- }
-
- ADIOI_Info_get(users_info, "panfs_layout_visit_policy", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && (layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE || layout_type == PAN_FS_CLIENT_LAYOUT_TYPE__RAID10)) {
- layout_visit_policy = strtoul(value,NULL,10);
- tmp_val = layout_visit_policy;
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- if (tmp_val != layout_visit_policy) {
- FPRINTF(stderr, "ADIOI_PANFS_SetInfo: the value for key \"panfs_layout_visit_policy\" must be the same on all processes\n");
- MPI_Abort(MPI_COMM_WORLD, 1);
- }
- ADIOI_Info_set(fd->info, "panfs_layout_visit_policy", value);
- }
-
- ADIOI_Free(value);
+ ADIOI_Info_check_and_install_int(fd, users_info,
+ "panfs_layout_parity_stripe_depth", NULL, myname, error_code);
+ ADIOI_Info_check_and_install_int(fd, users_info,
+ "panfs_layout_total_num_comps", NULL, myname, error_code);
+ /* this hint used to check for
+ * PAN_FS_CLIENT_LAYOUT_TYPE__RAID1_5_PARITY_STRIPE or
+ * PAN_FS_CLIENT_LAYOUT_TYPE__RAID10, but again, layout_type never
+ * gets updated */
+ ADIOI_Info_check_and_install_int(fd, users_info,
+ "panfs_layout_visit_policy", NULL, myname, error_code);
}
}
diff --git a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_hints.c b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_hints.c
index 9d3aebb..217a223 100644
--- a/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_hints.c
+++ b/src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_hints.c
@@ -8,6 +8,8 @@
#include <stdlib.h>
#include "ad_pvfs2.h"
+#include "hint_fns.h"
+
void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
{
char *value;
@@ -45,8 +47,8 @@ void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
/* any user-provided hints? */
if (users_info != MPI_INFO_NULL) {
- /* pvfs2 debugging */
value = (char *) ADIOI_Malloc( (MPI_MAX_INFO_VAL+1)*sizeof(char));
+ /* pvfs2 debugging */
ADIOI_Info_get(users_info, "romio_pvfs2_debugmask",
MPI_MAX_INFO_VAL, value, &flag);
if (flag) {
@@ -67,41 +69,13 @@ void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
}
/* the striping factor */
- ADIOI_Info_get(users_info, "striping_factor",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- tmp_value = fd->hints->striping_factor = atoi(value);
+ ADIOI_Info_check_and_install_int(fd, users_info, "striping_factor",
+ &(fd->hints->striping_factor), myname, error_code);
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_value != fd->hints->striping_factor) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "striping_factor",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(fd->info, "striping_factor", value);
- }
/* the striping unit */
- ADIOI_Info_get(users_info, "striping_unit",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- tmp_value = fd->hints->striping_unit = atoi(value);
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_value != fd->hints->striping_unit) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "striping_unit",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(fd->info, "striping_unit", value);
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
+ &(fd->hints->striping_unit), myname, error_code);
/* distribution name */
ADIOI_Info_get(users_info, "romio_pvfs2_distribution_name",
@@ -109,158 +83,30 @@ void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
if (flag) {
}
-
/* POSIX read */
- ADIOI_Info_get(users_info, "romio_pvfs2_posix_read",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE"))
- {
- ADIOI_Info_set(fd->info, "romio_pvfs2_posix_read", value);
- fd->hints->fs_hints.pvfs2.posix_read = ADIOI_HINT_ENABLE;
- }
- else if ( !strcmp(value, "disable") ||
- !strcmp(value, "DISABLE"))
- {
- ADIOI_Info_set(fd->info , "romio_pvfs2_posix_read", value);
- fd->hints->fs_hints.pvfs2.posix_read = ADIOI_HINT_DISABLE;
- }
- tmp_value = fd->hints->fs_hints.pvfs2.posix_read;
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- if (tmp_value != fd->hints->fs_hints.pvfs2.posix_read) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "posix_read",
- error_code);
- return;
- }
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_posix_read",
+ &(fd->hints->pvfs2.posix_read), myname, error_code);
/* POSIX write */
- ADIOI_Info_get(users_info, "romio_pvfs2_posix_write",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE"))
- {
- ADIOI_Info_set(fd->info, "romio_pvfs2_posix_write", value);
- fd->hints->fs_hints.pvfs2.posix_write = ADIOI_HINT_ENABLE;
- }
- else if ( !strcmp(value, "disable") ||
- !strcmp(value, "DISABLE"))
- {
- ADIOI_Info_set(fd->info , "romio_pvfs2_posix_write", value);
- fd->hints->fs_hints.pvfs2.posix_write = ADIOI_HINT_DISABLE;
- }
- tmp_value = fd->hints->fs_hints.pvfs2.posix_write;
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- if (tmp_value != fd->hints->fs_hints.pvfs2.posix_write) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "posix_write",
- error_code);
- return;
- }
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_posix_write",
+ &(fd->hints->pvfs2.posix_write), myname, error_code);
/* Datatype read */
- ADIOI_Info_get(users_info, "romio_pvfs2_dtype_read",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE"))
- {
- ADIOI_Info_set(fd->info, "romio_pvfs2_dtype_read", value);
- fd->hints->fs_hints.pvfs2.dtype_read = ADIOI_HINT_ENABLE;
- }
- else if ( !strcmp(value, "disable") ||
- !strcmp(value, "DISABLE"))
- {
- ADIOI_Info_set(fd->info , "romio_pvfs2_dtype_read", value);
- fd->hints->fs_hints.pvfs2.dtype_read = ADIOI_HINT_DISABLE;
- }
- tmp_value = fd->hints->fs_hints.pvfs2.dtype_read;
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- if (tmp_value != fd->hints->fs_hints.pvfs2.dtype_read) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "dtype_read",
- error_code);
- return;
- }
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_dtype_read",
+ &(fd->hints->pvfs2.dtype_read), myname, error_code);
/* Datatype write */
- ADIOI_Info_get(users_info, "romio_pvfs2_dtype_write",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE"))
- {
- ADIOI_Info_set(fd->info, "romio_pvfs2_dtype_write", value);
- fd->hints->fs_hints.pvfs2.dtype_write = ADIOI_HINT_ENABLE;
- }
- else if ( !strcmp(value, "disable") ||
- !strcmp(value, "DISABLE"))
- {
- ADIOI_Info_set(fd->info , "romio_pvfs2_dtype_write", value);
- fd->hints->fs_hints.pvfs2.dtype_write = ADIOI_HINT_DISABLE;
- }
- tmp_value = fd->hints->fs_hints.pvfs2.dtype_write;
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- if (tmp_value != fd->hints->fs_hints.pvfs2.dtype_write) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "dtype_write",
- error_code);
- return;
- }
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_dtype_write",
+ &(fd->hints->pvfs2.dtype_write), myname, error_code);
/* Listio read */
- ADIOI_Info_get(users_info, "romio_pvfs2_listio_read",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE"))
- {
- ADIOI_Info_set(fd->info, "romio_pvfs2_listio_read", value);
- fd->hints->fs_hints.pvfs2.listio_read = ADIOI_HINT_ENABLE;
- }
- else if ( !strcmp(value, "disable") ||
- !strcmp(value, "DISABLE"))
- {
- ADIOI_Info_set(fd->info , "romio_pvfs2_listio_read", value);
- fd->hints->fs_hints.pvfs2.listio_read = ADIOI_HINT_DISABLE;
- }
- tmp_value = fd->hints->fs_hints.pvfs2.listio_read;
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- if (tmp_value != fd->hints->fs_hints.pvfs2.listio_read) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "listio_read",
- error_code);
- return;
- }
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_listio_read",
+ &(fd->hints->pvfs2.listio_read), myname, error_code);
/* Datatype write */
- ADIOI_Info_get(users_info, "romio_pvfs2_listio_write",
- MPI_MAX_INFO_VAL, value, &flag);
- if (flag) {
- if ( !strcmp(value, "enable") || !strcmp(value, "ENABLE"))
- {
- ADIOI_Info_set(fd->info, "romio_pvfs2_listio_write", value);
- fd->hints->fs_hints.pvfs2.listio_write = ADIOI_HINT_ENABLE;
- }
- else if ( !strcmp(value, "disable") ||
- !strcmp(value, "DISABLE"))
- {
- ADIOI_Info_set(fd->info , "romio_pvfs2_listio_write", value);
- fd->hints->fs_hints.pvfs2.listio_write = ADIOI_HINT_DISABLE;
- }
- tmp_value = fd->hints->fs_hints.pvfs2.listio_write;
- MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm);
- if (tmp_value != fd->hints->fs_hints.pvfs2.listio_write) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "listio_write",
- error_code);
- return;
- }
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_pvfs2_listio_write",
+ &(fd->hints->pvfs2.listio_write), myname, error_code);
ADIOI_Free(value);
-
}
}
/* set the values for collective I/O and data sieving parameters */
http://git.mpich.org/mpich.git/commitdiff/edaa8396d770222318f771a26bda7057b…
commit edaa8396d770222318f771a26bda7057ba864fff
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Jun 24 19:05:31 2013 -0500
unused variable warning
diff --git a/src/mpi/romio/mpi-io/mpiu_external32.c b/src/mpi/romio/mpi-io/mpiu_external32.c
index 75b4c27..ba22df2 100644
--- a/src/mpi/romio/mpi-io/mpiu_external32.c
+++ b/src/mpi/romio/mpi-io/mpiu_external32.c
@@ -120,7 +120,6 @@ fn_exit:
int MPIU_datatype_full_size(MPI_Datatype datatype, MPI_Aint *size)
{
int error_code = MPI_SUCCESS;
- MPI_Aint extent = 0;
MPI_Aint true_extent = 0;
MPI_Aint true_lb = 0;
http://git.mpich.org/mpich.git/commitdiff/b15761fc38ba3e97cabd349aafee48cee…
commit b15761fc38ba3e97cabd349aafee48cee7926f9c
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Jun 24 23:50:21 2013 -0500
improved error handling for test/file_info
continue the slow and intermittent process of adding error checking to
romio test cases
diff --git a/src/mpi/romio/test/file_info.c b/src/mpi/romio/test/file_info.c
index 7f2a779..fba6189 100644
--- a/src/mpi/romio/test/file_info.c
+++ b/src/mpi/romio/test/file_info.c
@@ -12,6 +12,14 @@
#include <string.h>
#include <stdlib.h>
+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);
+}
/* this test wants to compare the hints it gets from a file with a set of
* default hints. These hints are specific to the MPI-IO implementation, so if
* you want to test something besides the default you'll have to use a command
@@ -43,7 +51,6 @@ hint_defaults BLUEGENE_DEFAULTS = {
.romio_cb_write = "enable",
.cb_config_list = NULL};
-
/* #undef INFO_DEBUG */
/* Test will print out information about unexpected hint keys or values that
@@ -62,6 +69,7 @@ int main(int argc, char **argv)
MPI_Info info, info_used;
char *filename, key[MPI_MAX_INFO_KEY], value[MPI_MAX_INFO_VAL];
hint_defaults *defaults;
+ int ret;
MPI_Init(&argc,&argv);
@@ -111,8 +119,9 @@ int main(int argc, char **argv)
/* open the file with MPI_INFO_NULL */
- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR,
+ ret = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR,
MPI_INFO_NULL, &fh);
+ if (ret != MPI_SUCCESS) handle_error(ret, "MPI_File_open");
/* check the default values set by ROMIO */
MPI_File_get_info(fh, &info_used);
@@ -277,11 +286,13 @@ int main(int argc, char **argv)
MPI_Info_set(info, "pfs_svr_buf", "true");
/* open the file and set new info */
- MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR,
+ ret = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR,
info, &fh);
+ if (ret != MPI_SUCCESS) handle_error(ret, "MPI_File_open");
/* check the values set */
- MPI_File_get_info(fh, &info_used);
+ ret = MPI_File_get_info(fh, &info_used);
+ if (ret != MPI_SUCCESS) handle_error(ret, "MPI_File_get_info");
MPI_Info_get_nkeys(info_used, &nkeys);
for (i=0; i<nkeys; i++) {
http://git.mpich.org/mpich.git/commitdiff/3fb810c0662fe0a94fbddb94f5bd809f8…
commit 3fb810c0662fe0a94fbddb94f5bd809f8f982f4f
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Tue Jun 25 00:13:06 2013 -0500
clean up tests with enable-strict
ROMIO tests were not cleanly buildig with --enable-strict, mostly due to
missing 'const' for strings. One test uses strdup, which is
incompatible with strict ansi.
diff --git a/src/mpi/romio/test/aggregation1.c b/src/mpi/romio/test/aggregation1.c
index f12e305..5331639 100644
--- a/src/mpi/romio/test/aggregation1.c
+++ b/src/mpi/romio/test/aggregation1.c
@@ -7,6 +7,7 @@
/* Test case from John Bent (ROMIO req #835)
* Aggregation code was not handling certain access patterns when collective
* buffering forced */
+#define _XOPEN_SOURCE 500 /* strdup not in string.h otherwsie */
#include <unistd.h>
#include <stdlib.h>
#include <mpi.h>
@@ -38,7 +39,7 @@ Usage( int line ) {
}
static void
-fatal_error( int mpi_ret, MPI_Status *mpi_stat, char *msg ) {
+fatal_error( int mpi_ret, MPI_Status *mpi_stat, const char *msg ) {
fprintf( stderr, "Fatal error %s: %d\n", msg, mpi_ret );
MPI_Abort( MPI_COMM_WORLD, -1 );
}
diff --git a/src/mpi/romio/test/aggregation2.c b/src/mpi/romio/test/aggregation2.c
index 02d2629..a35ebe0 100644
--- a/src/mpi/romio/test/aggregation2.c
+++ b/src/mpi/romio/test/aggregation2.c
@@ -20,7 +20,7 @@
#define BUFSIZE 512
-static void handle_error(int errcode, char *str)
+static void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
diff --git a/src/mpi/romio/test/async-multiple.c b/src/mpi/romio/test/async-multiple.c
index 57e8104..ec9726c 100644
--- a/src/mpi/romio/test/async-multiple.c
+++ b/src/mpi/romio/test/async-multiple.c
@@ -16,9 +16,9 @@
reads them back. The file name is taken as a command-line argument,
and the process rank is appended to it.*/
-void handle_error(int errcode, char *str);
+void handle_error(int errcode, const char *str);
-void handle_error(int errcode, char *str)
+void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
diff --git a/src/mpi/romio/test/async.c b/src/mpi/romio/test/async.c
index 6bfd04f..8882716 100644
--- a/src/mpi/romio/test/async.c
+++ b/src/mpi/romio/test/async.c
@@ -14,9 +14,9 @@
reads them back. The file name is taken as a command-line argument,
and the process rank is appended to it.*/
-void handle_error(int errcode, char *str);
+void handle_error(int errcode, const char *str);
-void handle_error(int errcode, char *str)
+void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
diff --git a/src/mpi/romio/test/coll_test.c b/src/mpi/romio/test/coll_test.c
index d37b757..cbea6cf 100644
--- a/src/mpi/romio/test/coll_test.c
+++ b/src/mpi/romio/test/coll_test.c
@@ -18,9 +18,9 @@
/* Note that the file access pattern is noncontiguous. */
-void handle_error(int errcode, char *str);
+void handle_error(int errcode, const char *str);
-void handle_error(int errcode, char *str)
+void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
diff --git a/src/mpi/romio/test/external32.c b/src/mpi/romio/test/external32.c
index 9b0d116..bca3555 100644
--- a/src/mpi/romio/test/external32.c
+++ b/src/mpi/romio/test/external32.c
@@ -27,7 +27,7 @@ static void handle_error(int errcode, char *str)
-void is_little_or_big_endian( char* datarep, char* c, char* c_le, int len ) {
+static void is_little_or_big_endian( const char* datarep, char* c, char* c_le, int len ) {
int i, is_le = 1, is_be = 1;
for( i = 0; i < len; i++ ) {
is_le = is_le && ( c[i] == c_le[i] );
@@ -46,7 +46,7 @@ void is_little_or_big_endian( char* datarep, char* c, char* c_le, int len ) {
int main( int argc, char* argv[] ) {
int sample_i = 123456789, i, j;
char sample_i_le[4] = {0x15,0xcd,0x5b,0x07}, c[4];
- char* datarep[3] = { "native", "external32", "internal" };
+ const char* datarep[3] = { "native", "external32", "internal" };
MPI_File fileh;
int rank;
FILE* fileh_std;
diff --git a/src/mpi/romio/test/noncontig_coll2.c b/src/mpi/romio/test/noncontig_coll2.c
index 10ad4ab..4699da8 100644
--- a/src/mpi/romio/test/noncontig_coll2.c
+++ b/src/mpi/romio/test/noncontig_coll2.c
@@ -23,7 +23,7 @@
#define STARTING_SIZE 5000
int test_file(char *filename, int mynod, int nprocs, char * cb_hosts,
- char *msg, int verbose);
+ const char *msg, int verbose);
#define ADIOI_Free free
#define ADIOI_Malloc malloc
@@ -37,7 +37,7 @@ struct ADIO_cb_name_arrayD {
};
typedef struct ADIO_cb_name_arrayD *ADIO_cb_name_array;
-void handle_error(int errcode, char *str);
+void handle_error(int errcode, const char *str);
int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array *arrayp);
void default_str(int mynod, int len, ADIO_cb_name_array array, char *dest);
void reverse_str(int mynod, int len, ADIO_cb_name_array array, char *dest);
@@ -45,7 +45,7 @@ void reverse_alternating_str(int mynod, int len, ADIO_cb_name_array array, char
void simple_shuffle_str(int mynod, int len, ADIO_cb_name_array array, char *dest);
-void handle_error(int errcode, char *str)
+void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
@@ -348,7 +348,7 @@ int main(int argc, char **argv)
#define SEEDER(x,y,z) ((x)*1000000 + (y) + (x)*(z))
-int test_file(char *filename, int mynod, int nprocs, char * cb_hosts, char *msg, int verbose)
+int test_file(char *filename, int mynod, int nprocs, char * cb_hosts, const char *msg, int verbose)
{
MPI_Datatype typevec, newtype, t[3];
int *buf, i, b[3], errcode, errors=0;
diff --git a/src/mpi/romio/test/ordered_fp.c b/src/mpi/romio/test/ordered_fp.c
index b2e0e92..8090e1f 100644
--- a/src/mpi/romio/test/ordered_fp.c
+++ b/src/mpi/romio/test/ordered_fp.c
@@ -11,9 +11,9 @@
#define COUNT (200)
#undef TIMING
-void handle_error(int errcode, char *str);
+void handle_error(int errcode, const char *str);
-void handle_error(int errcode, char *str)
+void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
diff --git a/src/mpi/romio/test/shared_fp.c b/src/mpi/romio/test/shared_fp.c
index 12dd7db..df41bdd 100644
--- a/src/mpi/romio/test/shared_fp.c
+++ b/src/mpi/romio/test/shared_fp.c
@@ -10,9 +10,9 @@
#define COUNT 1024
-void handle_error(int errcode, char *str);
+void handle_error(int errcode, const char *str);
-void handle_error(int errcode, char *str)
+void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
diff --git a/src/mpi/romio/test/simple.c b/src/mpi/romio/test/simple.c
index 0480552..2e90c9d 100644
--- a/src/mpi/romio/test/simple.c
+++ b/src/mpi/romio/test/simple.c
@@ -10,7 +10,7 @@
#define SIZE (65536)
-static void handle_error(int errcode, char *str)
+static void handle_error(int errcode, const char *str)
{
char msg[MPI_MAX_ERROR_STRING];
int resultlen;
http://git.mpich.org/mpich.git/commitdiff/270d5115c0cbd7a796da021936e69d8c2…
commit 270d5115c0cbd7a796da021936e69d8c25e5ed45
Author: Rob Latham <robl(a)mcs.anl.gov>
Date: Mon Jun 24 08:45:38 2013 -0500
reduce duplcated code in hint processing
for years we've added hints by cutting and pasting. Turn all this
dupilcated code into common hint processing funcitons. Still need to
do this for all drivers, too
diff --git a/src/mpi/romio/adio/common/Makefile.mk b/src/mpi/romio/adio/common/Makefile.mk
index 1bed978..0acb27d 100644
--- a/src/mpi/romio/adio/common/Makefile.mk
+++ b/src/mpi/romio/adio/common/Makefile.mk
@@ -65,5 +65,6 @@ romio_other_sources += \
adio/common/shfp_fname.c \
adio/common/status_setb.c \
adio/common/strfns.c \
- adio/common/system_hints.c
+ adio/common/system_hints.c \
+ adio/common/hint_fns.c
diff --git a/src/mpi/romio/adio/common/ad_hints.c b/src/mpi/romio/adio/common/ad_hints.c
index a7a6f6d..1bc74f1 100644
--- a/src/mpi/romio/adio/common/ad_hints.c
+++ b/src/mpi/romio/adio/common/ad_hints.c
@@ -7,6 +7,7 @@
#include "adio.h"
#include "adio_extern.h"
+#include "hint_fns.h"
void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
{
@@ -18,7 +19,7 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
MPI_Info info;
char *value;
- int flag, intval, tmp_val, nprocs=0, nprocs_is_valid = 0, len;
+ int flag, nprocs=0, len;
int ok_to_override_cb_nodes=0;
static char myname[] = "ADIOI_GEN_SETINFO";
@@ -34,6 +35,8 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
if (fd->info == MPI_INFO_NULL) MPI_Info_create(&(fd->info));
info = fd->info;
+ MPI_Comm_size(fd->comm, &nprocs);
+
/* Note that fd->hints is allocated at file open time; thus it is
* not necessary to allocate it, or check for allocation, here.
*/
@@ -69,8 +72,6 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
fd->hints->cb_config_list = NULL;
/* number of processes that perform I/O in collective I/O */
- MPI_Comm_size(fd->comm, &nprocs);
- nprocs_is_valid = 1;
ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", nprocs);
ADIOI_Info_set(info, "cb_nodes", value);
fd->hints->cb_nodes = nprocs;
@@ -136,391 +137,120 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
/* add in user's info if supplied */
if (users_info != MPI_INFO_NULL) {
- ADIOI_Info_get(users_info, "cb_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "cb_buffer_size",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
+ ADIOI_Info_check_and_install_int(fd, users_info, "cb_buffer_size",
+ &(fd->hints->cb_buffer_size), myname, error_code);
- ADIOI_Info_set(info, "cb_buffer_size", value);
- fd->hints->cb_buffer_size = intval;
-
- }
/* aligning file realms to certain sizes (e.g. stripe sizes)
* may benefit I/O performance */
- ADIOI_Info_get(users_info, "romio_cb_fr_alignment", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_fr_alignment",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_fr_alignment", value);
- fd->hints->cb_fr_alignment = intval;
-
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_alignment",
+ &(fd->hints->cb_fr_alignment), myname, error_code);
/* for collective I/O, try to be smarter about when to do data sieving
* using a specific threshold for the datatype size/extent
* (percentage 0-100%) */
- ADIOI_Info_get(users_info, "romio_cb_ds_threshold", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_ds_threshold",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_ds_threshold", value);
- fd->hints->cb_ds_threshold = intval;
-
- }
- ADIOI_Info_get(users_info, "romio_cb_alltoall", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_alltoall", value);
- fd->hints->cb_read = ADIOI_HINT_AUTO;
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_ds_threshold",
+ &(fd->hints->cb_ds_threshold), myname, error_code);
- tmp_val = fd->hints->cb_alltoall;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_alltoall) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_alltoall",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_alltoall",
+ &(fd->hints->cb_alltoall), myname, error_code);
/* new hints for enabling/disabling coll. buffering on
* reads/writes
*/
- ADIOI_Info_get(users_info, "romio_cb_read", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_read", value);
- fd->hints->cb_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- /* romio_cb_read overrides no_indep_rw */
- ADIOI_Info_set(info, "romio_cb_read", value);
- ADIOI_Info_set(info, "romio_no_indep_rw", "false");
- fd->hints->cb_read = ADIOI_HINT_DISABLE;
- fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_read", value);
- fd->hints->cb_read = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_read;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_read) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_read",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_read",
+ &(fd->hints->cb_read), myname, error_code);
+ if (fd->hints->cb_read == ADIOI_HINT_DISABLE) {
+ /* romio_cb_read overrides no_indep_rw */
+ ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+ fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
}
- ADIOI_Info_get(users_info, "romio_cb_write", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_write", value);
- fd->hints->cb_write = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE"))
- {
- /* romio_cb_write overrides no_indep_rw, too */
- ADIOI_Info_set(info, "romio_cb_write", value);
- ADIOI_Info_set(info, "romio_no_indep_rw", "false");
- fd->hints->cb_write = ADIOI_HINT_DISABLE;
- fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") ||
- !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_write", value);
- fd->hints->cb_write = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_write;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_write) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_write",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
+
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_write",
+ &(fd->hints->cb_write), myname, error_code);
+ if (fd->hints->cb_write == ADIOI_HINT_DISABLE) {
+ /* romio_cb_write overrides no_indep_rw */
+ ADIOI_Info_set(info, "romio_no_indep_rw", "false");
+ fd->hints->no_indep_rw = ADIOI_HINT_DISABLE;
}
/* enable/disable persistent file realms for collective I/O */
/* may want to check for no_indep_rdwr hint as well */
- ADIOI_Info_get(users_info, "romio_cb_pfr", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_cb_pfr", value);
- fd->hints->cb_pfr = ADIOI_HINT_AUTO;
- }
-
- tmp_val = fd->hints->cb_pfr;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->cb_pfr) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_pfr",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_cb_pfr",
+ &(fd->hints->cb_pfr), myname, error_code);
+
/* file realm assignment types ADIOI_FR_AAR(0),
ADIOI_FR_FSZ(-1), ADIOI_FR_USR_REALMS(-2), all others specify
a regular fr size in bytes. probably not the best way... */
- ADIOI_Info_get(users_info, "romio_cb_fr_type", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) >= -2)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_cb_fr_type",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- ADIOI_Info_set(info, "romio_cb_fr_type", value);
- fd->hints->cb_fr_type = intval;
-
- }
-
- /* new hint for specifying no indep. read/write will be performed */
- ADIOI_Info_get(users_info, "romio_no_indep_rw", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "true") || !strcmp(value, "TRUE")) {
- /* if 'no_indep_rw' set, also hint that we will do
- * collective buffering: if we aren't doing independent io,
- * then we have to do collective */
- ADIOI_Info_set(info, "romio_no_indep_rw", value);
- ADIOI_Info_set(info, "romio_cb_write", "enable");
- ADIOI_Info_set(info, "romio_cb_read", "enable");
- fd->hints->no_indep_rw = 1;
- fd->hints->cb_read = 1;
- fd->hints->cb_write = 1;
- tmp_val = 1;
- }
- else if (!strcmp(value, "false") || !strcmp(value, "FALSE")) {
- ADIOI_Info_set(info, "romio_no_indep_rw", value);
- fd->hints->no_indep_rw = 0;
- tmp_val = 0;
- }
- else {
- /* default is above */
- tmp_val = 0;
- }
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != fd->hints->no_indep_rw) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "romio_no_indep_rw",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_cb_fr_type",
+ &(fd->hints->cb_fr_type), myname, error_code);
+
+ /* Has the user indicated all I/O will be done collectively? */
+ ADIOI_Info_check_and_install_true(fd, users_info, "romio_no_indep_rw",
+ &(fd->hints->no_indep_rw), myname, error_code);
+ if (fd->hints->no_indep_rw == 1) {
+ /* if 'no_indep_rw' set, also hint that we will do
+ * collective buffering: if we aren't doing independent io,
+ * then we have to do collective */
+ ADIOI_Info_set(info, "romio_cb_write", "enable");
+ ADIOI_Info_set(info, "romio_cb_read", "enable");
+ fd->hints->cb_read = 1;
+ fd->hints->cb_write = 1;
+ }
/* new hints for enabling/disabling data sieving on
* reads/writes
*/
- ADIOI_Info_get(users_info, "romio_ds_read", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_ds_read", value);
- fd->hints->ds_read = ADIOI_HINT_AUTO;
- }
- /* otherwise ignore */
- }
- ADIOI_Info_get(users_info, "romio_ds_write", MPI_MAX_INFO_VAL, value,
- &flag);
- if (flag) {
- if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_ENABLE;
- }
- else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_DISABLE;
- }
- else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
- {
- ADIOI_Info_set(info, "romio_ds_write", value);
- fd->hints->ds_write = ADIOI_HINT_AUTO;
- }
- /* otherwise ignore */
- }
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_read",
+ &(fd->hints->ds_read), myname, error_code);
+ ADIOI_Info_check_and_install_enabled(fd, users_info, "romio_ds_write",
+ &(fd->hints->ds_write), myname, error_code);
if (ok_to_override_cb_nodes) {
/* MPI_File_open path sets up some data structrues that don't
* get resized in the MPI_File_set_view path, so ignore
* cb_nodes in the set_view case */
- ADIOI_Info_get(users_info, "cb_nodes", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval=atoi(value)) > 0)) {
- tmp_val = intval;
-
- MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
- /* --BEGIN ERROR HANDLING-- */
- if (tmp_val != intval) {
- MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname,
- "cb_nodes",
- error_code);
- return;
- }
- /* --END ERROR HANDLING-- */
-
- if (!nprocs_is_valid) {
- /* if hints were already initialized, we might not
- * have already gotten this?
- */
- MPI_Comm_size(fd->comm, &nprocs);
- nprocs_is_valid = 1;
- }
- if (intval <= nprocs) {
- ADIOI_Info_set(info, "cb_nodes", value);
- fd->hints->cb_nodes = intval;
- }
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "cb_nodes",
+ &(fd->hints->cb_nodes), myname, error_code);
+ if ((fd->hints->cb_nodes <= 0) || (fd->hints->cb_nodes > nprocs)) {
+ /* can't ask for more aggregators than mpi processes, though it
+ * might be interesting to think what such oversubscription
+ * might mean... someday */
+ ADIOI_Snprintf(value, MPI_MAX_INFO_VAL+1, "%d", nprocs);
+ ADIOI_Info_set(info, "cb_nodes", value);
+ fd->hints->cb_nodes = nprocs;
+ }
} /* if (ok_to_override_cb_nodes) */
- ADIOI_Info_get(users_info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval = atoi(value)) > 0)) {
- ADIOI_Info_set(info, "ind_wr_buffer_size", value);
- fd->hints->ind_wr_buffer_size = intval;
- }
+ ADIOI_Info_check_and_install_int(fd, users_info, "ind_wr_buffer_size",
+ &(fd->hints->ind_wr_buffer_size), myname, error_code);
+ ADIOI_Info_check_and_install_int(fd, users_info, "ind_rd_buffer_size",
+ &(fd->hints->ind_rd_buffer_size), myname, error_code);
- ADIOI_Info_get(users_info, "ind_rd_buffer_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag && ((intval = atoi(value)) > 0)) {
- ADIOI_Info_set(info, "ind_rd_buffer_size", value);
- fd->hints->ind_rd_buffer_size = intval;
- }
+ if (fd->hints->cb_config_list == NULL) {
+ /* only set cb_config_list if it isn't already set. Note that
+ * since we set it below, this ensures that the cb_config_list hint
+ * will be set at file open time either by the user or to the
+ * default */
+ /* if it has been set already, we ignore it the second time.
+ * otherwise we would get an error if someone used the same info
+ * value with a cb_config_list value in it in a couple of calls,
+ * which would be irritating. */
+ ADIOI_Info_check_and_install_str(fd, users_info, "cb_config_list",
+ &(fd->hints->cb_config_list), myname, error_code);
- ADIOI_Info_get(users_info, "cb_config_list", MPI_MAX_INFO_VAL,
- value, &flag);
- if (flag) {
- if (fd->hints->cb_config_list == NULL) {
- /* only set cb_config_list if it isn't already set.
- * Note that since we set it below, this ensures that
- * the cb_config_list hint will be set at file open time
- * either by the user or to the default
- */
- ADIOI_Info_set(info, "cb_config_list", value);
- len = (strlen(value)+1) * sizeof(char);
- fd->hints->cb_config_list = ADIOI_Malloc(len);
- if (fd->hints->cb_config_list == NULL) {
- *error_code = MPIO_Err_create_code(*error_code,
- MPIR_ERR_RECOVERABLE,
- myname,
- __LINE__,
- MPI_ERR_OTHER,
- "**nomem2",0);
- return;
- }
- ADIOI_Strncpy(fd->hints->cb_config_list, value, len);
- }
- /* if it has been set already, we ignore it the second time.
- * otherwise we would get an error if someone used the same
- * info value with a cb_config_list value in it in a couple
- * of calls, which would be irritating. */
- }
- ADIOI_Info_get(users_info, "romio_min_fdomain_size", MPI_MAX_INFO_VAL,
- value, &flag);
- if ( flag && ((intval = atoi(value)) > 0) ) {
- ADIOI_Info_set(info, "romio_min_fdomain_size", value);
- fd->hints->min_fdomain_size = intval;
- }
- /* Now we use striping unit in common code so we should
- process hints for it. */
- ADIOI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL,
- value, &flag);
- if ( flag && ((intval = atoi(value)) > 0) ) {
- ADIOI_Info_set(info, "striping_unit", value);
- fd->hints->striping_unit = intval;
}
+ ADIOI_Info_check_and_install_int(fd, users_info, "romio_min_fdomain_size",
+ &(fd->hints->min_fdomain_size), myname, error_code);
+
+ /* Now we use striping unit in common code so we should
+ process hints for it. */
+ ADIOI_Info_check_and_install_int(fd, users_info, "striping_unit",
+ &(fd->hints->striping_unit), myname, error_code);
}
+ /* Begin hint post-processig: some hints take precidence over or conflict
+ * with others, or aren't supported by some file systems */
+
/* handle cb_config_list default value here; avoids an extra
* free/alloc and insures it is always set
*/
diff --git a/src/mpi/romio/adio/common/hint_fns.c b/src/mpi/romio/adio/common/hint_fns.c
new file mode 100644
index 0000000..560b614
--- /dev/null
+++ b/src/mpi/romio/adio/common/hint_fns.c
@@ -0,0 +1,183 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * Copyright (C) 2013 UChicago/Argonne, LLC
+ * See COPYRIGHT notice in top-level directory.
+ */
+
+#include "adio.h"
+#include "hint_fns.h"
+
+
+int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *key,
+ int *local_cache, char *funcname, int *error_code)
+{
+ int intval, tmp_val, flag;
+ char *value;
+
+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
+ if (value == NULL) {
+ *error_code = MPIO_Err_create_code(*error_code,
+ MPIR_ERR_RECOVERABLE,
+ funcname,
+ __LINE__,
+ MPI_ERR_OTHER,
+ "**nomem2",0);
+ return -1;
+ }
+
+ ADIOI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
+ if (flag) {
+ intval = atoi(value);
+ tmp_val = intval;
+
+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
+ /* --BEGIN ERROR HANDLING-- */
+ if (tmp_val != intval) {
+ MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(funcname,
+ key,
+ error_code);
+ return -1;
+ }
+ /* --END ERROR HANDLING-- */
+
+ ADIOI_Info_set(fd->info, key, value);
+ /* some file systems do not cache hints in the fd struct */
+ if (local_cache != NULL) *local_cache = intval;
+ }
+ ADIOI_Free(value);
+ return 0;
+}
+
+int ADIOI_Info_check_and_install_enabled(ADIO_File fd, MPI_Info info, const char *key,
+ int *local_cache, char *funcname, int *error_code)
+{
+ int tmp_val, flag;
+ char *value;
+
+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
+ if (value == NULL) {
+ *error_code = MPIO_Err_create_code(*error_code,
+ MPIR_ERR_RECOVERABLE,
+ funcname,
+ __LINE__,
+ MPI_ERR_OTHER,
+ "**nomem2",0);
+ return -1;
+ }
+
+ ADIOI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
+ if (flag) {
+ if (!strcmp(value, "enable") || !strcmp(value, "ENABLE")) {
+ ADIOI_Info_set(fd->info, key, value);
+ *local_cache = ADIOI_HINT_ENABLE;
+ }
+ else if (!strcmp(value, "disable") || !strcmp(value, "DISABLE")) {
+ ADIOI_Info_set(fd->info, key, value);
+ *local_cache = ADIOI_HINT_DISABLE;
+ }
+ else if (!strcmp(value, "automatic") || !strcmp(value, "AUTOMATIC"))
+ {
+ ADIOI_Info_set(fd->info, key, value);
+ *local_cache = ADIOI_HINT_AUTO;
+ }
+
+ tmp_val = *local_cache;
+
+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
+ /* --BEGIN ERROR HANDLING-- */
+ if (tmp_val != *local_cache) {
+ MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(funcname,
+ key,
+ error_code);
+ return -1;
+ }
+ /* --END ERROR HANDLING-- */
+ }
+ ADIOI_Free(value);
+ return 0;
+}
+int ADIOI_Info_check_and_install_true(ADIO_File fd, MPI_Info info, const char *key,
+ int *local_cache, char *funcname, int *error_code)
+{
+ int flag, tmp_val;
+ char *value;
+
+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
+ if (value == NULL) {
+ *error_code = MPIO_Err_create_code(*error_code,
+ MPIR_ERR_RECOVERABLE,
+ funcname,
+ __LINE__,
+ MPI_ERR_OTHER,
+ "**nomem2",0);
+ return -1;
+ }
+
+ ADIOI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
+ if (flag) {
+ if (!strcmp(value, "true") || !strcmp(value, "TRUE")) {
+ ADIOI_Info_set(fd->info, key, value);
+ *local_cache = 1;
+ }
+ else if (!strcmp(value, "false") || !strcmp(value, "FALSE")) {
+ ADIOI_Info_set(fd->info, key, value);
+ *local_cache = 0;
+ }
+ tmp_val = *local_cache;
+
+ MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
+ /* --BEGIN ERROR HANDLING-- */
+ if (tmp_val != *local_cache) {
+ MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(funcname,
+ key,
+ error_code);
+ return -1;
+ }
+ /* --END ERROR HANDLING-- */
+ }
+
+ ADIOI_Free(value);
+ return 0;
+}
+int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *key,
+ char **local_cache, char *funcname, int *error_code)
+{
+ int flag, len;
+ char *value;
+
+ value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
+ if (value == NULL) {
+ *error_code = MPIO_Err_create_code(*error_code,
+ MPIR_ERR_RECOVERABLE,
+ funcname,
+ __LINE__,
+ MPI_ERR_OTHER,
+ "**nomem2",0);
+ return -1;
+ }
+
+ ADIOI_Info_get(info, key, MPI_MAX_INFO_VAL,
+ value, &flag);
+ if (flag) {
+ ADIOI_Info_set(fd->info, "cb_config_list", value);
+ len = (strlen(value)+1) * sizeof(char);
+ *local_cache = ADIOI_Malloc(len);
+ if (*local_cache == NULL) {
+ *error_code = MPIO_Err_create_code(*error_code,
+ MPIR_ERR_RECOVERABLE,
+ funcname,
+ __LINE__,
+ MPI_ERR_OTHER,
+ "**nomem2",0);
+ return -1;
+ }
+ ADIOI_Strncpy(*local_cache, value, len);
+ }
+ /* if it has been set already, we ignore it the second time.
+ * otherwise we would get an error if someone used the same
+ * info value with a cb_config_list value in it in a couple
+ * of calls, which would be irritating. */
+ ADIOI_Free(value);
+ return 0;
+}
diff --git a/src/mpi/romio/adio/include/hint_fns.h b/src/mpi/romio/adio/include/hint_fns.h
new file mode 100644
index 0000000..7c20177
--- /dev/null
+++ b/src/mpi/romio/adio/include/hint_fns.h
@@ -0,0 +1,23 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2013 UChicago/Argonne LLC
+ * See COPYRIGHT in top-level directory.
+ */
+
+#ifndef _HINT_FNS_H
+#define _HINT_FNS_H
+
+int ADIOI_Info_check_and_install_int(ADIO_File fd, MPI_Info info, const char *key,
+ int *local_cache, char *funcname, int *error_code);
+
+int ADIOI_Info_check_and_install_enabled(ADIO_File fd, MPI_Info info, const char *key,
+ int *local_cache, char *funcname, int *error_code);
+
+int ADIOI_Info_check_and_install_true(ADIO_File fd, MPI_Info info, const char *key,
+ int *local_cache, char *funcname, int *error_code);
+
+int ADIOI_Info_check_and_install_str(ADIO_File fd, MPI_Info info, const char *key,
+ char **local_cache, char *funcname, int *error_code);
+
+#endif
-----------------------------------------------------------------------
Summary of changes:
src/mpi/romio/adio/ad_bg/ad_bg_hints.c | 338 +++----------------
src/mpi/romio/adio/ad_bgl/ad_bgl_hints.c | 346 +++----------------
src/mpi/romio/adio/ad_lustre/ad_lustre_hints.c | 56 +---
src/mpi/romio/adio/ad_panfs/ad_panfs_hints.c | 111 ++-----
src/mpi/romio/adio/ad_pvfs2/ad_pvfs2_hints.c | 192 +----------
src/mpi/romio/adio/common/Makefile.mk | 3 +-
src/mpi/romio/adio/common/ad_hints.c | 434 +++++-------------------
src/mpi/romio/adio/common/hint_fns.c | 183 ++++++++++
src/mpi/romio/adio/include/hint_fns.h | 23 ++
src/mpi/romio/mpi-io/mpiu_external32.c | 1 -
src/mpi/romio/test/aggregation1.c | 3 +-
src/mpi/romio/test/aggregation2.c | 2 +-
src/mpi/romio/test/async-multiple.c | 4 +-
src/mpi/romio/test/async.c | 4 +-
src/mpi/romio/test/coll_test.c | 4 +-
src/mpi/romio/test/external32.c | 4 +-
src/mpi/romio/test/file_info.c | 19 +-
src/mpi/romio/test/noncontig_coll2.c | 8 +-
src/mpi/romio/test/ordered_fp.c | 4 +-
src/mpi/romio/test/shared_fp.c | 4 +-
src/mpi/romio/test/simple.c | 2 +-
21 files changed, 480 insertions(+), 1265 deletions(-)
create mode 100644 src/mpi/romio/adio/common/hint_fns.c
create mode 100644 src/mpi/romio/adio/include/hint_fns.h
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-78-g3b3bd06
by noreply@mpich.org 02 Oct '13
by noreply@mpich.org 02 Oct '13
02 Oct '13
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 3b3bd0654f69b0415a7a5d07ef3379fac0b6b799 (commit)
via 3e078e34d87f0ee664329cdd4515e6b1acd09906 (commit)
via 49fa4d51d40d8d98a912cd158714cc03d5ed1e67 (commit)
from 8c53c3c2b0879309a635822a4d6d4dd46dd6fff5 (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/3b3bd0654f69b0415a7a5d07ef3379fac…
commit 3b3bd0654f69b0415a7a5d07ef3379fac0b6b799
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Sep 3 13:27:46 2013 -0500
Fault tolerance tests for some collectives
All functions in these tests return errors to all processes when
there is a failure in the communicator. Mark failing tests as xfail.
Signed-off-by: Wesley Bland <wbland(a)mcs.anl.gov>
diff --git a/test/mpi/ft/Makefile.am b/test/mpi/ft/Makefile.am
index ccd6270..4b70c96 100644
--- a/test/mpi/ft/Makefile.am
+++ b/test/mpi/ft/Makefile.am
@@ -10,4 +10,4 @@ include $(top_srcdir)/Makefile.mtest
## for all programs that are just built from the single corresponding source
## file, we don't need per-target _SOURCES rules, automake will infer them
## correctly
-noinst_PROGRAMS = die abort sendalive isendalive senddead recvdead isenddead irecvdead
+noinst_PROGRAMS = die abort sendalive isendalive senddead recvdead isenddead irecvdead barrier gather reduce
diff --git a/test/mpi/ft/barrier.c b/test/mpi/ft/barrier.c
new file mode 100644
index 0000000..2072698
--- /dev/null
+++ b/test/mpi/ft/barrier.c
@@ -0,0 +1,59 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts collective communication after a process in
+ * the communicator has failed. Since all processes contribute to
+ * the result of the operation, all process will receive an error.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size;
+ int err, errclass;
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+
+ if (size < 2) {
+ fprintf( stderr, "Must run with at least 2 processes\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ err = MPI_Barrier(MPI_COMM_WORLD);
+
+ if (rank == 0) {
+#if defined (MPICH) && (MPICH_NUMVERSION >= 30100102)
+ MPI_Error_class(err, &errclass);
+ if (errclass == MPIX_ERR_PROC_FAIL_STOP) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Wrong error code (%d) returned. Expected MPIX_ERR_PROC_FAIL_STOP\n", errclass);
+ }
+#else
+ if (err) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Program reported MPI_SUCCESS, but an error code was expected.\n");
+ }
+#endif
+ }
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/gather.c b/test/mpi/ft/gather.c
new file mode 100644
index 0000000..6ac2a6e
--- /dev/null
+++ b/test/mpi/ft/gather.c
@@ -0,0 +1,64 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts collective communication after a process in
+ * the communicator has failed. Since all processes contribute to
+ * the result of the operation, all process will receive an error.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size, err, errclass;
+ int sendbuf[1] = { 42 };
+ int *recvbuf;
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+
+ if (size < 3) {
+ fprintf( stderr, "Must run with at least 3 processes\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ recvbuf = (int *)malloc(size*sizeof(int));
+
+ err = MPI_Gather(sendbuf, 1, MPI_INT, recvbuf, size, MPI_INT, 0, MPI_COMM_WORLD);
+
+ if (rank == 0) {
+#if defined (MPICH) && (MPICH_NUMVERSION >= 30100102)
+ MPI_Error_class(err, &errclass);
+ if (errclass == MPIX_ERR_PROC_FAIL_STOP) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Wrong error code (%d) returned. Expected MPIX_ERR_PROC_FAIL_STOP\n", errclass);
+ }
+#else
+ if (err) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Program reported MPI_SUCCESS, but an error code was expected.\n");
+ }
+#endif
+ }
+
+ free(recvbuf);
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/reduce.c b/test/mpi/ft/reduce.c
new file mode 100644
index 0000000..30664b5
--- /dev/null
+++ b/test/mpi/ft/reduce.c
@@ -0,0 +1,60 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts collective communication after a process in
+ * the communicator has failed. Since all processes contribute to
+ * the result of the operation, all process will receive an error.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size, err, errclass;
+ int sendbuf[1] = { 42 };
+ int recvbuf[1];
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+
+ if (size < 3) {
+ fprintf( stderr, "Must run with at least 3 processes\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ err = MPI_Reduce(sendbuf, recvbuf, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
+
+ if (rank == 0) {
+#if defined (MPICH) && (MPICH_NUMVERSION >= 30100102)
+ MPI_Error_class(err, &errclass);
+ if (errclass == MPIX_ERR_PROC_FAIL_STOP) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Wrong error code (%d) returned. Expected MPIX_ERR_PROC_FAIL_STOP\n", errclass);
+ }
+#else
+ if (err) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Program reported MPI_SUCCESS, but an error code was expected.\n");
+ }
+#endif
+ }
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 905aa6d..3bb71a0 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -6,3 +6,6 @@ senddead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict
recvdead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
isenddead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
irecvdead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+barrier 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+gather 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+reduce 4 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
http://git.mpich.org/mpich.git/commitdiff/3e078e34d87f0ee664329cdd4515e6b1a…
commit 3e078e34d87f0ee664329cdd4515e6b1acd09906
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Fri Aug 23 11:18:02 2013 -0500
Fixup and add pt2pt fault tolerance tests
pt2pt tests for blocking and non-blocking sends and recvs within
a communicator with a failed process. Mark failing tests as xfail.
Signed-off-by: Wesley Bland <wbland(a)mcs.anl.gov>
diff --git a/test/mpi/ft/Makefile.am b/test/mpi/ft/Makefile.am
index 03e7578..ccd6270 100644
--- a/test/mpi/ft/Makefile.am
+++ b/test/mpi/ft/Makefile.am
@@ -10,4 +10,4 @@ include $(top_srcdir)/Makefile.mtest
## for all programs that are just built from the single corresponding source
## file, we don't need per-target _SOURCES rules, automake will infer them
## correctly
-noinst_PROGRAMS = die abort send
+noinst_PROGRAMS = die abort sendalive isendalive senddead recvdead isenddead irecvdead
diff --git a/test/mpi/ft/irecvdead.c b/test/mpi/ft/irecvdead.c
new file mode 100644
index 0000000..bf20dc1
--- /dev/null
+++ b/test/mpi/ft/irecvdead.c
@@ -0,0 +1,63 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts MPI_Irecv with the source being a dead process. It should fail
+ * and return an error at completion. If we are testing sufficiently new MPICH, we
+ * look for the MPIX_ERR_PROC_FAIL_STOP error code. These should be converted to look
+ * for the standarized error code once it is finalized.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size, err, errclass;
+ MPI_Request request;
+ char buf[10];
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ if (size < 2) {
+ fprintf( stderr, "Must run with at least 2 processes\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ if (rank == 0) {
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+ err = MPI_Irecv(buf, 1, MPI_CHAR, 1, 0, MPI_COMM_WORLD, &request);
+ if (err)
+ fprintf(stderr, "MPI_Irecv returned an error");
+
+ err = MPI_Wait(&request, MPI_STATUS_IGNORE);
+#if defined (MPICH) && (MPICH_NUMVERSION >= 30100102)
+ MPI_Error_class(err, &errclass);
+ if (errclass == MPIX_ERR_PROC_FAIL_STOP) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Wrong error code (%d) returned. Expected MPIX_ERR_PROC_FAIL_STOP\n", errclass);
+ }
+#else
+ if (err) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Program reported MPI_SUCCESS, but an error code was expected.\n");
+ }
+#endif
+ }
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/isendalive.c b/test/mpi/ft/isendalive.c
new file mode 100644
index 0000000..e705e2b
--- /dev/null
+++ b/test/mpi/ft/isendalive.c
@@ -0,0 +1,56 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include <mpi.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts communication between 2 running processes
+ * after another process has failed. The communication should complete
+ * successfully.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size, err;
+ char buf[10];
+ MPI_Request request;
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ if (size < 3) {
+ fprintf( stderr, "Must run with at least 3 processes\n" );
+ MPI_Abort(MPI_COMM_WORLD, 1);
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ if (rank == 0) {
+ err = MPI_Isend("No Errors", 10, MPI_CHAR, 2, 0, MPI_COMM_WORLD, &request);
+ err += MPI_Wait(&request, MPI_STATUS_IGNORE);
+ if (err) {
+ fprintf(stderr, "An error occurred during the send operation\n");
+ }
+ }
+
+ if (rank == 2) {
+ err = MPI_Irecv(buf, 10, MPI_CHAR, 0, 0, MPI_COMM_WORLD, &request);
+ err += MPI_Wait(&request, MPI_STATUS_IGNORE);
+ if (err) {
+ fprintf(stderr, "An error occurred during the recv operation\n");
+ } else {
+ printf(" %s\n", buf);
+ fflush(stdout);
+ }
+ }
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/isenddead.c b/test/mpi/ft/isenddead.c
new file mode 100644
index 0000000..3440b57
--- /dev/null
+++ b/test/mpi/ft/isenddead.c
@@ -0,0 +1,58 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts to MPI_Isend with the destination being a dead process.
+ * The communication should succeed or report an error. It must not block
+ * indefinitely.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size, err, errclass;
+ char buf[100000];
+ MPI_Request request;
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ if (size < 2) {
+ fprintf( stderr, "Must run with at least 2 processes\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ if (rank == 0) {
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+ err = MPI_Isend(buf, 100000, MPI_CHAR, 1, 0, MPI_COMM_WORLD, &request);
+ if (err)
+ fprintf(stderr, "MPI_Isend returned error\n");
+
+ err = MPI_Wait(&request, MPI_STATUS_IGNORE);
+#if defined (MPICH) && (MPICH_NUMVERSION >= 30100102)
+ MPI_Error_class(err, &errclass);
+ if ((err) && (errclass != MPIX_ERR_PROC_FAIL_STOP)) {
+ fprintf(stderr, "Wrong error code (%d) returned. Expected MPIX_ERR_PROC_FAIL_STOP\n", errclass);
+ } else {
+ printf(" No Errors\n");
+ fflush(stdout);
+ }
+#else
+ printf(" No Errors\n");
+ fflush(stdout);
+#endif
+ }
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/recvdead.c b/test/mpi/ft/recvdead.c
new file mode 100644
index 0000000..5b194ca
--- /dev/null
+++ b/test/mpi/ft/recvdead.c
@@ -0,0 +1,58 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts MPI_Recv with the source being a dead process. It should fail
+ * and return an error. If we are testing sufficiently new MPICH, we look for the
+ * MPIX_ERR_PROC_FAIL_STOP error code. These should be converted to look for the
+ * standarized error code once it is finalized.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size, err, errclass;
+ char buf[10];
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ if (size < 2) {
+ fprintf( stderr, "Must run with at least 2 processes\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ if (rank == 0) {
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+ err = MPI_Recv(buf, 1, MPI_CHAR, 1, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
+#if defined (MPICH) && (MPICH_NUMVERSION >= 30100102)
+ MPI_Error_class(err, &errclass);
+ if (errclass == MPIX_ERR_PROC_FAIL_STOP) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Wrong error code (%d) returned. Expected MPIX_ERR_PROC_FAIL_STOP\n", errclass);
+ }
+#else
+ if (err) {
+ printf(" No Errors\n");
+ fflush(stdout);
+ } else {
+ fprintf(stderr, "Program reported MPI_SUCCESS, but an error code was expected.\n");
+ }
+#endif
+ }
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/send.c b/test/mpi/ft/sendalive.c
similarity index 64%
rename from test/mpi/ft/send.c
rename to test/mpi/ft/sendalive.c
index 6425bc2..4be21ff 100644
--- a/test/mpi/ft/send.c
+++ b/test/mpi/ft/sendalive.c
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
-/*
+/*
* This test attempts communication between 2 running processes
* after another process has failed.
*/
@@ -26,12 +26,19 @@ int main(int argc, char **argv)
if (rank == 0) {
err = MPI_Send("No Errors", 10, MPI_CHAR, 2, 0, MPI_COMM_WORLD);
+ if (err) {
+ fprintf(stderr, "An error occurred during the send operation\n");
+ }
}
if (rank == 2) {
- MPI_Recv(buf, 10, MPI_CHAR, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
- printf(" %s\n", buf);
- fflush( stdout );
+ err = MPI_Recv(buf, 10, MPI_CHAR, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
+ if (err) {
+ fprintf(stderr, "An error occurred during the recv operation\n");
+ } else {
+ printf(" %s\n", buf);
+ fflush(stdout);
+ }
}
MPI_Finalize();
diff --git a/test/mpi/ft/senddead.c b/test/mpi/ft/senddead.c
new file mode 100644
index 0000000..6df36f1
--- /dev/null
+++ b/test/mpi/ft/senddead.c
@@ -0,0 +1,53 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ * (C) 2003 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * This test attempts to MPI_Send with the destination being a dead process.
+ * The communication should succeed or report an error. It must not block
+ * indefinitely.
+ */
+int main(int argc, char **argv)
+{
+ int rank, size, err, errclass;
+ char buf[100000];
+
+ MPI_Init(&argc, &argv);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
+ if (size < 2) {
+ fprintf( stderr, "Must run with at least 2 processes\n" );
+ MPI_Abort( MPI_COMM_WORLD, 1 );
+ }
+
+ if (rank == 1) {
+ exit(EXIT_FAILURE);
+ }
+
+ if (rank == 0) {
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+ err = MPI_Send(buf, 100000, MPI_CHAR, 1, 0, MPI_COMM_WORLD);
+#if defined (MPICH) && (MPICH_NUMVERSION >= 30100102)
+ MPI_Error_class(err, &errclass);
+ if ((err) && (errclass != MPIX_ERR_PROC_FAIL_STOP)) {
+ fprintf(stderr, "Wrong error code (%d) returned. Expected MPIX_ERR_PROC_FAIL_STOP\n", errclass);
+ } else {
+ printf(" No Errors\n");
+ fflush(stdout);
+ }
+#else
+ printf(" No Errors\n");
+ fflush(stdout);
+#endif
+ }
+
+ MPI_Finalize();
+
+ return 0;
+}
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 560ada5..905aa6d 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -1,3 +1,8 @@
die 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
abort 2 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false xfail=ticket1537
-send 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
+sendalive 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
+isendalive 3 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false
+senddead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+recvdead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+isenddead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=ticket1945
+irecvdead 2 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
http://git.mpich.org/mpich.git/commitdiff/49fa4d51d40d8d98a912cd158714cc03d…
commit 49fa4d51d40d8d98a912cd158714cc03d5ed1e67
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Tue Aug 20 12:55:56 2013 -0500
Add resultTest routine to test suite.
Fault tolerance tests should test for program correctness even in
cases where mpiexec returns a non-zero exit code.
Signed-off-by: Wesley Bland <wbland(a)mcs.anl.gov>
diff --git a/test/mpi/ft/die.c b/test/mpi/ft/die.c
index 3c5c6d7..990d274 100644
--- a/test/mpi/ft/die.c
+++ b/test/mpi/ft/die.c
@@ -16,7 +16,7 @@ int main(int argc, char **argv)
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 1) {
- exit(0);
+ exit(EXIT_FAILURE);
}
if (rank == 0) {
diff --git a/test/mpi/ft/send.c b/test/mpi/ft/send.c
index 963a066..6425bc2 100644
--- a/test/mpi/ft/send.c
+++ b/test/mpi/ft/send.c
@@ -21,7 +21,7 @@ int main(int argc, char **argv)
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (rank == 1) {
- exit(0);
+ exit(EXIT_FAILURE);
}
if (rank == 0) {
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 584e20e..560ada5 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -1,3 +1,3 @@
-die 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false
+die 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
abort 2 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false xfail=ticket1537
-send 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false
+send 4 mpiexecarg=-disable-auto-cleanup timeLimit=10 strict=false resultTest=TestStatusNoErrors
diff --git a/test/mpi/runtests.in b/test/mpi/runtests.in
index b318980..8f8ea0a 100644
--- a/test/mpi/runtests.in
+++ b/test/mpi/runtests.in
@@ -874,6 +874,58 @@ sub TestStatus {
}
return ($found_error,$inline);
}
+# ----------------------------------------------------------------------------
+#
+# TestStatusNoErrors is like TestStatus except that it also checks for " No Errors"
+# This is useful for fault tolerance tests where mpiexec returns a non-zero status
+# because of a failed process, but still outputs " No Errors" when the correct
+# behavior is detected.
+sub TestStatusNoErrors {
+ my $MPIOUT = $_[0];
+ my $programname = $_[1];
+ my $found_error = 0;
+ my $found_noerror = 0;
+
+ my $inline = "";
+ while (<MPIOUT>) {
+ print STDOUT $_ if $verbose;
+ # Skip FORTRAN STOP
+ if (/FORTRAN STOP/) { next; }
+ $inline .= $_;
+ if (/^\s*No [Ee]rrors\s*$/ && $found_noerror == 0) {
+ $found_noerror = 1;
+ }
+ if (! /^\s*No [Ee]rrors\s*$/ && !/^\s*Test Passed\s*$/) {
+ print STDERR "Unexpected output in $programname: $_";
+ if (!$found_error) {
+ $found_error = 1;
+ $err_count ++;
+ }
+ }
+ }
+ if ($found_noerror == 0) {
+ print STDERR "Program $programname exited without No Errors\n";
+ if (!$found_error) {
+ $found_error = 1;
+ $err_count ++;
+ }
+ }
+ $rc = close ( MPIOUT );
+ if ($rc == 0) {
+ $run_status = $?;
+ $signal_num = $run_status & 127;
+ if ($run_status > 255) { $run_status >>= 8; }
+ }
+ else {
+ # This test *requires* non-zero return codes
+ if (!$found_error) {
+ $found_error = 1;
+ $err_count ++;
+ }
+ $inline .= "$mpiexec returned a zero status but the program required a non-zero status\n";
+ }
+ return ($found_error,$inline);
+}
#
# TestTimeout is a special test that reports success *only* when the
# status return is NONZERO and there are no processes left over.
-----------------------------------------------------------------------
Summary of changes:
test/mpi/ft/Makefile.am | 2 +-
test/mpi/ft/barrier.c | 59 ++++++++++++++++++++++++++++++++
test/mpi/ft/die.c | 2 +-
test/mpi/ft/gather.c | 64 +++++++++++++++++++++++++++++++++++
test/mpi/ft/irecvdead.c | 63 ++++++++++++++++++++++++++++++++++
test/mpi/ft/isendalive.c | 56 ++++++++++++++++++++++++++++++
test/mpi/ft/isenddead.c | 58 +++++++++++++++++++++++++++++++
test/mpi/ft/recvdead.c | 58 +++++++++++++++++++++++++++++++
test/mpi/ft/reduce.c | 60 ++++++++++++++++++++++++++++++++
test/mpi/ft/{send.c => sendalive.c} | 17 ++++++---
test/mpi/ft/senddead.c | 53 +++++++++++++++++++++++++++++
test/mpi/ft/testlist | 12 +++++-
test/mpi/runtests.in | 52 ++++++++++++++++++++++++++++
13 files changed, 547 insertions(+), 9 deletions(-)
create mode 100644 test/mpi/ft/barrier.c
create mode 100644 test/mpi/ft/gather.c
create mode 100644 test/mpi/ft/irecvdead.c
create mode 100644 test/mpi/ft/isendalive.c
create mode 100644 test/mpi/ft/isenddead.c
create mode 100644 test/mpi/ft/recvdead.c
create mode 100644 test/mpi/ft/reduce.c
rename test/mpi/ft/{send.c => sendalive.c} (62%)
create mode 100644 test/mpi/ft/senddead.c
hooks/post-receive
--
MPICH primary repository
1
0
[mpich] MPICH primary repository branch, master, updated. v3.1b1-75-g8c53c3c
by noreply@mpich.org 01 Oct '13
by noreply@mpich.org 01 Oct '13
01 Oct '13
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 8c53c3c2b0879309a635822a4d6d4dd46dd6fff5 (commit)
from 2c27bbf509fcd03c6bc4ab864442f9e3d337f713 (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/8c53c3c2b0879309a635822a4d6d4dd46…
commit 8c53c3c2b0879309a635822a4d6d4dd46dd6fff5
Author: Ken Raffenetti <raffenet(a)mcs.anl.gov>
Date: Fri Sep 27 14:15:15 2013 -0500
turn off TAP xfail info for passing tests
Jenkins counts a passing test with a TODO as an error.
No reviewer.
diff --git a/test/mpi/runtests.in b/test/mpi/runtests.in
index 67ab8ce..b318980 100644
--- a/test/mpi/runtests.in
+++ b/test/mpi/runtests.in
@@ -987,11 +987,7 @@ sub RunTestPassed {
print XMLOUT "<STATUS>pass</STATUS>$newline";
}
if ($tapoutput) {
- my $xfailstr = '';
- if ($xfail ne '') {
- $xfailstr = " # TODO $xfail";
- }
- print TAPOUT "ok ${total_run} - $workdir/$programname ${np}${xfailstr}\n";
+ print TAPOUT "ok ${total_run} - $workdir/$programname ${np}\n";
}
}
sub RunTestFailed {
-----------------------------------------------------------------------
Summary of changes:
test/mpi/runtests.in | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
hooks/post-receive
--
MPICH primary repository
1
0