1
1

Grunt work from while I was on a teleconf today. :-)

Change all instances of invoking errorhandlers on NULL to
MPI_COMM_WORLD.  Three places still need to be changed:
- MPI_Test
- MPI_Wait
- MPI_Cancel
These all may have a valid request, and therefore may have a valid
communicator, window, or file to invoke the errorhandler on -- not
MPI_COMM_WORLD.  Tim has graciously volunteered to fix this, so I
simply left them invoking on MPI_COMM_WORLD for now, but put a comment
there saying that Tim would fix it.  :-)

This commit was SVN r1261.
Этот коммит содержится в:
Jeff Squyres 2004-06-15 01:39:49 +00:00
родитель 27874ad53b
Коммит db2b35de4d
25 изменённых файлов: 81 добавлений и 66 удалений

Просмотреть файл

@ -8,7 +8,7 @@
#include "runtime/runtime.h" #include "runtime/runtime.h"
#include "mpi/c/bindings.h" #include "mpi/c/bindings.h"
#include "mca/pml/pml.h" #include "mca/pml/pml.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES #if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Cancel = PMPI_Cancel #pragma weak MPI_Cancel = PMPI_Cancel
#endif #endif
@ -27,13 +27,18 @@ int MPI_Cancel(MPI_Request *request)
} else if (request == NULL) { } else if (request == NULL) {
rc = MPI_ERR_REQUEST; rc = MPI_ERR_REQUEST;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Cancel"); /* JMS: Tim will fix to invoke on the communicator/window/file
on the request (i.e., not COMM_WORLD), if the request is
available/valid */
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Cancel");
} }
if (NULL == *request) { if (NULL == *request) {
return MPI_SUCCESS; return MPI_SUCCESS;
} }
rc = mca_pml.pml_cancel(*request); rc = mca_pml.pml_cancel(*request);
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, "MPI_Cancel"); /* JMS: Tim will fix to invoke on the communicator/window/file on
the request (i.e., not COMM_WORLD) */
OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, "MPI_Cancel");
} }

Просмотреть файл

@ -23,7 +23,7 @@ int MPI_Get_address(void *location, MPI_Aint *address)
{ {
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }

Просмотреть файл

@ -30,7 +30,10 @@ int MPI_Test(MPI_Request *request, int *completed, MPI_Status *status)
} else if (completed == NULL) { } else if (completed == NULL) {
rc = MPI_ERR_ARG; rc = MPI_ERR_ARG;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Test"); /* JMS: Tim will fix to invoke on the communicator/window/file
on the request (i.e., not COMM_WORLD), if the request is
available/valid */
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Test");
} }
if(*request == NULL) { if(*request == NULL) {
@ -45,6 +48,8 @@ int MPI_Test(MPI_Request *request, int *completed, MPI_Status *status)
if(*completed < 0) { if(*completed < 0) {
*completed = 0; *completed = 0;
} }
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, "MPI_Test"); /* JMS: Tim will fix to invoke on the communicator/window/file on
the request (i.e., not COMM_WORLD) */
OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, "MPI_Test");
} }

Просмотреть файл

@ -29,10 +29,10 @@ int MPI_Testany(int count, MPI_Request requests[], int *index, int *completed, M
} else if (NULL == index) { } else if (NULL == index) {
rc = MPI_ERR_ARG; rc = MPI_ERR_ARG;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Testany"); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Testany");
} }
rc = mca_pml.pml_test(count, requests, index, completed, status); rc = mca_pml.pml_test(count, requests, index, completed, status);
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, "MPI_Testany"); OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, "MPI_Testany");
} }

Просмотреть файл

@ -31,12 +31,12 @@ int MPI_Testsome(int incount, MPI_Request requests[],
} else if (NULL == indices) { } else if (NULL == indices) {
rc = MPI_ERR_ARG; rc = MPI_ERR_ARG;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Testsome"); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Testsome");
} }
/* optimize this in the future */ /* optimize this in the future */
rc = mca_pml.pml_test(incount, requests, &index, &completed, statuses); rc = mca_pml.pml_test(incount, requests, &index, &completed, statuses);
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Testsome"); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Testsome");
if(completed) { if(completed) {
*outcount = 1; *outcount = 1;
indices[0] = index; indices[0] = index;

Просмотреть файл

@ -28,11 +28,11 @@ MPI_Type_commit(MPI_Datatype *type)
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
rc = ompi_ddt_commit( type ); rc = ompi_ddt_commit( type );
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }

Просмотреть файл

@ -30,17 +30,17 @@ MPI_Type_contiguous(int count,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
if( count < 0 ) { if( count < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, MPI_COMM_WORLD,
MPI_ERR_COUNT, FUNC_NAME ); MPI_ERR_COUNT, FUNC_NAME );
} }
} }
rc = ompi_ddt_create_contiguous( count, oldtype, newtype ); rc = ompi_ddt_create_contiguous( count, oldtype, newtype );
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME );
/* data description */ /* data description */
{ {
@ -49,5 +49,5 @@ MPI_Type_contiguous(int count,
ompi_ddt_set_args( *newtype, 1, a_i, 0, NULL, 1, &oldtype, MPI_COMBINER_CONTIGUOUS ); ompi_ddt_set_args( *newtype, 1, a_i, 0, NULL, 1, &oldtype, MPI_COMBINER_CONTIGUOUS );
} }
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }

Просмотреть файл

@ -32,16 +32,16 @@ MPI_Type_create_hindexed(int count,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
if( count < 0 ) { if( count < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, MPI_COMM_WORLD,
MPI_ERR_COUNT, FUNC_NAME ); MPI_ERR_COUNT, FUNC_NAME );
} }
for( i = 0; i < count; i++ ) { for( i = 0; i < count; i++ ) {
if(array_of_blocklengths[i] < 0) { if(array_of_blocklengths[i] < 0) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, MPI_COMM_WORLD,
MPI_ERR_ARG, FUNC_NAME ); MPI_ERR_ARG, FUNC_NAME );
} }
} }
@ -51,7 +51,7 @@ MPI_Type_create_hindexed(int count,
oldtype, newtype ); oldtype, newtype );
if( rc != MPI_SUCCESS ) { if( rc != MPI_SUCCESS ) {
ompi_ddt_destroy( newtype ); ompi_ddt_destroy( newtype );
OMPI_ERRHANDLER_RETURN( rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN( rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }
/* data description */ /* data description */
{ {

Просмотреть файл

@ -32,21 +32,21 @@ MPI_Type_create_hvector(int count,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
if( count < 0 ) { if( count < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, MPI_COMM_WORLD,
MPI_ERR_COUNT, FUNC_NAME ); MPI_ERR_COUNT, FUNC_NAME );
} }
if( blocklength < 0) { if( blocklength < 0) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, MPI_COMM_WORLD,
MPI_ERR_ARG, FUNC_NAME ); MPI_ERR_ARG, FUNC_NAME );
} }
} }
rc = ompi_ddt_create_hvector ( count, blocklength, stride, oldtype, newtype ); rc = ompi_ddt_create_hvector ( count, blocklength, stride, oldtype, newtype );
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME );
{ {
int* a_i[3]; int* a_i[3];

Просмотреть файл

@ -32,15 +32,15 @@ MPI_Type_create_indexed_block(int count,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
if( count < 0 ) { if( count < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, MPI_COMM_WORLD,
MPI_ERR_COUNT, FUNC_NAME ); MPI_ERR_COUNT, FUNC_NAME );
} }
if( blocklength < 0 ) { if( blocklength < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, MPI_COMM_WORLD,
MPI_ERR_ARG, FUNC_NAME ); MPI_ERR_ARG, FUNC_NAME );
} }
} }
@ -48,7 +48,7 @@ MPI_Type_create_indexed_block(int count,
oldtype, newtype ); oldtype, newtype );
if( rc != MPI_SUCCESS ) { if( rc != MPI_SUCCESS ) {
ompi_ddt_destroy( newtype ); ompi_ddt_destroy( newtype );
OMPI_ERRHANDLER_RETURN( rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN( rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }
{ {
int* a_i[3]; int* a_i[3];

Просмотреть файл

@ -31,7 +31,7 @@ MPI_Type_create_resized(MPI_Datatype oldtype,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
@ -39,7 +39,7 @@ MPI_Type_create_resized(MPI_Datatype oldtype,
rc = ompi_ddt_create_resized( oldtype, lb, extent, newtype ); rc = ompi_ddt_create_resized( oldtype, lb, extent, newtype );
if( rc != MPI_SUCCESS ) { if( rc != MPI_SUCCESS ) {
ompi_ddt_destroy( newtype ); ompi_ddt_destroy( newtype );
OMPI_ERRHANDLER_RETURN( rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN( rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }
{ {

Просмотреть файл

@ -32,16 +32,16 @@ MPI_Type_create_struct(int count,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
if( count < 0 ) { if( count < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, MPI_COMM_WORLD,
MPI_ERR_COUNT, FUNC_NAME ); MPI_ERR_COUNT, FUNC_NAME );
} }
for ( i = 0; i < count; i++ ){ for ( i = 0; i < count; i++ ){
if(array_of_blocklengths[i] < 0) { if(array_of_blocklengths[i] < 0) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, MPI_COMM_WORLD,
MPI_ERR_ARG, FUNC_NAME ); MPI_ERR_ARG, FUNC_NAME );
} }
} }
@ -51,7 +51,7 @@ MPI_Type_create_struct(int count,
array_of_types, newtype ); array_of_types, newtype );
if( rc != MPI_SUCCESS ) { if( rc != MPI_SUCCESS ) {
ompi_ddt_destroy( newtype ); ompi_ddt_destroy( newtype );
OMPI_ERRHANDLER_RETURN( rc, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( rc, MPI_COMM_WORLD,
rc, FUNC_NAME ); rc, FUNC_NAME );
} }

Просмотреть файл

@ -29,7 +29,7 @@ MPI_Type_dup (MPI_Datatype type,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
@ -37,7 +37,7 @@ MPI_Type_dup (MPI_Datatype type,
if( (rc = ompi_ddt_duplicate( type, newtype )) != MPI_SUCCESS ) { if( (rc = ompi_ddt_duplicate( type, newtype )) != MPI_SUCCESS ) {
ompi_ddt_destroy( newtype ); ompi_ddt_destroy( newtype );
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }

Просмотреть файл

@ -28,14 +28,14 @@ MPI_Type_free(MPI_Datatype *type)
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
rc = ompi_ddt_destroy( type ); rc = ompi_ddt_destroy( type );
if( rc != MPI_SUCCESS ) { if( rc != MPI_SUCCESS ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
*type = MPI_DATATYPE_NULL; *type = MPI_DATATYPE_NULL;

Просмотреть файл

@ -34,7 +34,7 @@ MPI_Type_get_contents(MPI_Datatype mtype,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
@ -43,7 +43,7 @@ MPI_Type_get_contents(MPI_Datatype mtype,
&max_addresses, array_of_addresses, &max_addresses, array_of_addresses,
&max_datatypes, array_of_datatypes, NULL ); &max_datatypes, array_of_datatypes, NULL );
if( rc != MPI_SUCCESS ) { if( rc != MPI_SUCCESS ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }

Просмотреть файл

@ -32,7 +32,7 @@ MPI_Type_get_envelope(MPI_Datatype type,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
@ -40,5 +40,5 @@ MPI_Type_get_envelope(MPI_Datatype type,
rc = ompi_ddt_get_args( type, 0, num_integers, NULL, num_addresses, NULL, num_datatypes, rc = ompi_ddt_get_args( type, 0, num_integers, NULL, num_addresses, NULL, num_datatypes,
NULL, combiner ); NULL, combiner );
OMPI_ERRHANDLER_RETURN( rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN( rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }

Просмотреть файл

@ -28,11 +28,11 @@ MPI_Type_get_extent(MPI_Datatype type, MPI_Aint *lb, MPI_Aint *extent)
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
rc = ompi_ddt_get_extent( type, lb, extent ); rc = ompi_ddt_get_extent( type, lb, extent );
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }

Просмотреть файл

@ -30,11 +30,11 @@ MPI_Type_get_true_extent(MPI_Datatype datatype,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
} }
rc = ompi_ddt_get_true_extent( datatype, true_lb, true_extent ); rc = ompi_ddt_get_true_extent( datatype, true_lb, true_extent );
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, FUNC_NAME );
} }

Просмотреть файл

@ -32,16 +32,16 @@ MPI_Type_indexed(int count,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
if( count < 0 ) { if( count < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, MPI_COMM_WORLD,
MPI_ERR_COUNT, FUNC_NAME ); MPI_ERR_COUNT, FUNC_NAME );
} }
for( i = 0; i < count; i++ ) { for( i = 0; i < count; i++ ) {
if( array_of_blocklengths[i] < 0 ) { if( array_of_blocklengths[i] < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, MPI_COMM_WORLD,
MPI_ERR_ARG, FUNC_NAME ); MPI_ERR_ARG, FUNC_NAME );
} }
} }
@ -52,7 +52,7 @@ MPI_Type_indexed(int count,
oldtype, newtype ); oldtype, newtype );
if( rc != MPI_SUCCESS ) { if( rc != MPI_SUCCESS ) {
ompi_ddt_destroy( newtype ); ompi_ddt_destroy( newtype );
OMPI_ERRHANDLER_RETURN( rc, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( rc, MPI_COMM_WORLD,
rc, FUNC_NAME ); rc, FUNC_NAME );
} }

Просмотреть файл

@ -24,7 +24,7 @@ int
MPI_Type_size(MPI_Datatype type, int *size) MPI_Type_size(MPI_Datatype type, int *size)
{ {
if( type == MPI_DATATYPE_NULL ) { if( type == MPI_DATATYPE_NULL ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_TYPE, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_TYPE, MPI_COMM_WORLD,
MPI_ERR_TYPE, FUNC_NAME ); MPI_ERR_TYPE, FUNC_NAME );
} }
*size = type->size; *size = type->size;

Просмотреть файл

@ -32,21 +32,21 @@ MPI_Type_vector(int count,
if( MPI_PARAM_CHECK ) { if( MPI_PARAM_CHECK ) {
if( OMPI_MPI_INVALID_STATE ) { if( OMPI_MPI_INVALID_STATE ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_INTERN, MPI_COMM_WORLD,
MPI_ERR_INTERN, FUNC_NAME ); MPI_ERR_INTERN, FUNC_NAME );
} }
if( count < 0 ) { if( count < 0 ) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_COUNT, MPI_COMM_WORLD,
MPI_ERR_COUNT, FUNC_NAME ); MPI_ERR_COUNT, FUNC_NAME );
} }
if( blocklength < 0) { if( blocklength < 0) {
OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, (ompi_communicator_t*)NULL, OMPI_ERRHANDLER_RETURN( MPI_ERR_ARG, MPI_COMM_WORLD,
MPI_ERR_ARG, FUNC_NAME ); MPI_ERR_ARG, FUNC_NAME );
} }
} }
rc = ompi_ddt_create_vector ( count, blocklength, stride, oldtype, newtype ); rc = ompi_ddt_create_vector ( count, blocklength, stride, oldtype, newtype );
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, FUNC_NAME ); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME );
{ {
int* a_i[3]; int* a_i[3];

Просмотреть файл

@ -27,7 +27,10 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status)
} else if (request == NULL) { } else if (request == NULL) {
rc = MPI_ERR_REQUEST; rc = MPI_ERR_REQUEST;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Wait"); /* JMS: Tim will fix to invoke on the communicator/window/file
on the request (i.e., not COMM_WORLD), if the request is
available/valid */
OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Wait");
} }
if (NULL == *request) { if (NULL == *request) {
@ -40,6 +43,8 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status)
return MPI_SUCCESS; return MPI_SUCCESS;
} }
rc = mca_pml.pml_wait(1, request, &index, status); rc = mca_pml.pml_wait(1, request, &index, status);
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, "MPI_Wait"); /* JMS: Tim will fix to invoke on the communicator/window/file on
the request (i.e., not COMM_WORLD) */
OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, "MPI_Wait");
} }

Просмотреть файл

@ -28,9 +28,9 @@ int MPI_Waitall(int count, MPI_Request *requests, MPI_Status *statuses)
} else if (requests == NULL) { } else if (requests == NULL) {
rc = MPI_ERR_REQUEST; rc = MPI_ERR_REQUEST;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Waitall"); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Waitall");
} }
rc = mca_pml.pml_wait_all(count, requests, statuses); rc = mca_pml.pml_wait_all(count, requests, statuses);
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, "MPI_Waitall"); OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, "MPI_Waitall");
} }

Просмотреть файл

@ -27,9 +27,9 @@ int MPI_Waitany(int count, MPI_Request *requests, int *index, MPI_Status *status
} else if (requests == NULL) { } else if (requests == NULL) {
rc = MPI_ERR_REQUEST; rc = MPI_ERR_REQUEST;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Waitany"); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Waitany");
} }
rc = mca_pml.pml_wait(count, requests, index, status); rc = mca_pml.pml_wait(count, requests, index, status);
OMPI_ERRHANDLER_RETURN(rc, (ompi_communicator_t*)NULL, rc, "MPI_Waitany"); OMPI_ERRHANDLER_RETURN(rc, MPI_COMM_WORLD, rc, "MPI_Waitany");
} }

Просмотреть файл

@ -33,12 +33,12 @@ int MPI_Waitsome(int incount, MPI_Request *requests,
} else if (requests == NULL) { } else if (requests == NULL) {
rc = MPI_ERR_REQUEST; rc = MPI_ERR_REQUEST;
} }
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Waitsome"); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Waitsome");
} }
/* optimize this in the future */ /* optimize this in the future */
rc = mca_pml.pml_wait(incount, requests, &index, statuses); rc = mca_pml.pml_wait(incount, requests, &index, statuses);
OMPI_ERRHANDLER_CHECK(rc, (ompi_communicator_t*)NULL, rc, "MPI_Waitsome"); OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, "MPI_Waitsome");
*outcount = 1; *outcount = 1;
indices[0] = index; indices[0] = index;
return MPI_SUCCESS; return MPI_SUCCESS;