[mpich-commits] r10635 - in mpich2/trunk/src: include mpi/datatype mpi/spawn mpi/topo
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Tue Nov 20 16:20:54 CST 2012
Author: goodell
Date: 2012-11-20 16:20:54 -0600 (Tue, 20 Nov 2012)
New Revision: 10635
Modified:
mpich2/trunk/src/include/mpierrs.h
mpich2/trunk/src/mpi/datatype/type_create_darray.c
mpich2/trunk/src/mpi/datatype/type_create_subarray.c
mpich2/trunk/src/mpi/spawn/comm_spawn_multiple.c
mpich2/trunk/src/mpi/topo/graph_map.c
Log:
Added a parameter err_class to macro MPIR_ERRTEST_ARGNONPOS
Subtle: also converts two error checks to use different classes at the
same time.
Contributed by IBM. Based on patch 0005 from code discussions.
Modified: mpich2/trunk/src/include/mpierrs.h
===================================================================
--- mpich2/trunk/src/include/mpierrs.h 2012-11-20 22:20:54 UTC (rev 10634)
+++ mpich2/trunk/src/include/mpierrs.h 2012-11-20 22:20:54 UTC (rev 10635)
@@ -143,12 +143,12 @@
goto fn_fail; \
}
-#define MPIR_ERRTEST_ARGNONPOS(arg,arg_name,err) \
+#define MPIR_ERRTEST_ARGNONPOS(arg,arg_name,err,err_class) \
if ((arg) <= 0) { \
err = MPIR_Err_create_code(MPI_SUCCESS, \
MPIR_ERR_RECOVERABLE, \
FCNAME, __LINE__, \
- MPI_ERR_ARG, \
+ err_class, \
"**argnonpos", \
"**argnonpos %s %d", \
arg_name, arg ); \
Modified: mpich2/trunk/src/mpi/datatype/type_create_darray.c
===================================================================
--- mpich2/trunk/src/mpi/datatype/type_create_darray.c 2012-11-20 22:20:54 UTC (rev 10634)
+++ mpich2/trunk/src/mpi/datatype/type_create_darray.c 2012-11-20 22:20:54 UTC (rev 10635)
@@ -427,8 +427,8 @@
tmp_size = 1;
for (i=0; mpi_errno == MPI_SUCCESS && i < ndims; i++) {
- MPIR_ERRTEST_ARGNONPOS(array_of_gsizes[i], "gsize", mpi_errno);
- MPIR_ERRTEST_ARGNONPOS(array_of_psizes[i], "psize", mpi_errno);
+ MPIR_ERRTEST_ARGNONPOS(array_of_gsizes[i], "gsize", mpi_errno, MPI_ERR_ARG);
+ MPIR_ERRTEST_ARGNONPOS(array_of_psizes[i], "psize", mpi_errno, MPI_ERR_ARG);
if ((array_of_distribs[i] != MPI_DISTRIBUTE_NONE) &&
(array_of_distribs[i] != MPI_DISTRIBUTE_BLOCK) &&
Modified: mpich2/trunk/src/mpi/datatype/type_create_subarray.c
===================================================================
--- mpich2/trunk/src/mpi/datatype/type_create_subarray.c 2012-11-20 22:20:54 UTC (rev 10634)
+++ mpich2/trunk/src/mpi/datatype/type_create_subarray.c 2012-11-20 22:20:54 UTC (rev 10635)
@@ -96,13 +96,13 @@
MPID_BEGIN_ERROR_CHECKS;
{
/* Check parameters */
- MPIR_ERRTEST_ARGNONPOS(ndims, "ndims", mpi_errno);
+ MPIR_ERRTEST_ARGNONPOS(ndims, "ndims", mpi_errno, MPI_ERR_DIMS);
MPIR_ERRTEST_ARGNULL(array_of_sizes, "array_of_sizes", mpi_errno);
MPIR_ERRTEST_ARGNULL(array_of_subsizes, "array_of_subsizes", mpi_errno);
MPIR_ERRTEST_ARGNULL(array_of_starts, "array_of_starts", mpi_errno);
for (i=0; mpi_errno == MPI_SUCCESS && i < ndims; i++) {
- MPIR_ERRTEST_ARGNONPOS(array_of_sizes[i], "size", mpi_errno);
- MPIR_ERRTEST_ARGNONPOS(array_of_subsizes[i], "subsize", mpi_errno);
+ MPIR_ERRTEST_ARGNONPOS(array_of_sizes[i], "size", mpi_errno, MPI_ERR_ARG);
+ MPIR_ERRTEST_ARGNONPOS(array_of_subsizes[i], "subsize", mpi_errno, MPI_ERR_ARG);
MPIR_ERRTEST_ARGNEG(array_of_starts[i], "start", mpi_errno);
if (array_of_subsizes[i] > array_of_sizes[i]) {
mpi_errno = MPIR_Err_create_code(MPI_SUCCESS,
Modified: mpich2/trunk/src/mpi/spawn/comm_spawn_multiple.c
===================================================================
--- mpich2/trunk/src/mpi/spawn/comm_spawn_multiple.c 2012-11-20 22:20:54 UTC (rev 10634)
+++ mpich2/trunk/src/mpi/spawn/comm_spawn_multiple.c 2012-11-20 22:20:54 UTC (rev 10635)
@@ -107,7 +107,7 @@
if (comm_ptr->rank == root) {
MPIR_ERRTEST_ARGNULL(array_of_commands, "array_of_commands", mpi_errno);
MPIR_ERRTEST_ARGNULL(array_of_maxprocs, "array_of_maxprocs", mpi_errno);
- MPIR_ERRTEST_ARGNONPOS(count, "count", mpi_errno);
+ MPIR_ERRTEST_ARGNONPOS(count, "count", mpi_errno, MPI_ERR_COUNT);
for (i = 0; i < count; i++)
{
MPIR_ERRTEST_INFO_OR_NULL(array_of_info[i], mpi_errno);
Modified: mpich2/trunk/src/mpi/topo/graph_map.c
===================================================================
--- mpich2/trunk/src/mpi/topo/graph_map.c 2012-11-20 22:20:54 UTC (rev 10634)
+++ mpich2/trunk/src/mpi/topo/graph_map.c 2012-11-20 22:20:54 UTC (rev 10635)
@@ -136,7 +136,7 @@
MPIR_ERRTEST_ARGNULL(newrank,"newrank",mpi_errno);
MPIR_ERRTEST_ARGNULL(indx,"indx",mpi_errno);
MPIR_ERRTEST_ARGNULL(edges,"edges",mpi_errno);
- MPIR_ERRTEST_ARGNONPOS(nnodes,"nnodes",mpi_errno);
+ MPIR_ERRTEST_ARGNONPOS(nnodes,"nnodes",mpi_errno, MPI_ERR_ARG);
}
MPID_END_ERROR_CHECKS;
}
More information about the commits
mailing list