1
1
After talking to both Brian and George, the conensus was to just
remove the flag and the test function.  Begone, evil spirits, BEGONE!

This commit was SVN r22831.

The following Trac tickets were found above:
  Ticket 2273 --> https://svn.open-mpi.org/trac/ompi/ticket/2273
Этот коммит содержится в:
Jeff Squyres 2010-03-16 00:47:10 +00:00
родитель 814fb9399f
Коммит 7b3ac4fb73
8 изменённых файлов: 9 добавлений и 64 удалений

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

@ -4,6 +4,7 @@
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -44,8 +45,6 @@ BEGIN_C_DECLS
/* These flags are on top of the flags in opal_datatype.h */
/* Is the datatype predefined as MPI type (not necessarily as OPAL type, e.g. struct/block types) */
#define OMPI_DATATYPE_FLAG_PREDEFINED 0x0200
/* Is the datatype suitable for one sided operations */
#define OMPI_DATATYPE_FLAG_ONE_SIDED 0x0400
/* Keep trace of the type of the predefined datatypes */
#define OMPI_DATATYPE_FLAG_DATA_INT 0x1000
#define OMPI_DATATYPE_FLAG_DATA_FLOAT 0x2000
@ -135,47 +134,6 @@ ompi_datatype_is_overlapped( const ompi_datatype_t* type )
return opal_datatype_is_overlapped(&type->super);
}
static inline int32_t
ompi_datatype_is_acceptable_for_one_sided( const ompi_datatype_t* type __opal_attribute_unused__ )
{
/* Please see https://svn.open-mpi.org/trac/ompi/ticket/2233.
This function used to check for the
OMPI_DATATYPE_FLAG_ONE_SIDED flag on the .flags of the
datatype, i.e.:
return (type->super.flags & OMPI_DATATYPE_FLAG_ONE_SIDED);
However, after lengthy discussions between George and Brian,
the conclusion was that the current DDT engine (as of r22640)
does not support checking for what the MPI spec defines as
invalid datatypes for one-sided operations.
The DDT engine currently sets the _ONE_SIDED flag on datatypes
that have offsets expressed in bytes (vs. offsets expressed in
items). Such datatypes actually *are* valid for use with
one-sided operations, but are not portable (and therefore are
not recommended).
The DDT engine cannot currently check for *absolute* offsets,
which are not valid for MPI one-sided operations. Hence, since
we effectively can't check for invalid-for-one-sided-operations
datatypes, just always return 1/true (i.e., that this datatype
is acceptable for one-sided operations).
Maybe someday someone will write a better check that can look
for absolute offsets, and therefore this function would have
some meaning again. :-) This function therefore only still
exists for this future possibility. Since it's an inline
function that returns a constant, any optimizing compiler worth
its salt will simply optimize it out. So we figured it was
safe to leave this function, especially since it gives a
convenient location to put this lengthy explanation/comment.
:-)
*/
return 1;
}
static inline int32_t
ompi_datatype_is_valid( const ompi_datatype_t* type )
{

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

@ -9,6 +9,7 @@
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -31,7 +32,6 @@
static void __ompi_datatype_allocate( ompi_datatype_t* datatype )
{
datatype->super.flags |= OMPI_DATATYPE_FLAG_ONE_SIDED;
datatype->args = NULL;
datatype->d_f_to_c_index = opal_pointer_array_add(&ompi_datatype_f_to_c_table, datatype);
/* Later generated datatypes will have their id according to the Fortran ID, as ALL types are registered */

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

@ -12,6 +12,7 @@
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -109,11 +110,6 @@ int32_t ompi_datatype_create_hindexed( int count, const int* pBlockLength, const
}
ompi_datatype_add( pdt, oldType, dLength, disp, extent );
}
/*
* A datatype based on bytes displacements is not suitable for
* one sided communications.
*/
pdt->super.flags &= ~OMPI_DATATYPE_FLAG_ONE_SIDED;
*newType = pdt;
return OMPI_SUCCESS;
}

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

@ -12,6 +12,7 @@
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -90,11 +91,6 @@ int32_t ompi_datatype_create_struct( int count, const int* pBlockLength, const O
}
ompi_datatype_add( pdt, lastType, lastBlock, lastDisp, lastExtent );
/*
* A datatype based on bytes displacements is not suitable for
* one sided communications.
*/
pdt->super.flags &= ~OMPI_DATATYPE_FLAG_ONE_SIDED;
*newType = pdt;
return OMPI_SUCCESS;
}

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

@ -12,6 +12,7 @@
* All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -91,11 +92,6 @@ int32_t ompi_datatype_create_hvector( int count, int bLength, OPAL_PTRDIFF_TYPE
OBJ_RELEASE( pTempData );
}
}
/*
* A datatype based on bytes displacements is not suitable for
* one sided communications.
*/
pData->super.flags &= ~OMPI_DATATYPE_FLAG_ONE_SIDED;
*newType = pData;
return OMPI_SUCCESS;
}

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

@ -4,6 +4,7 @@
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -300,7 +301,6 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
{ /*ompi_predefined_datatype_t*/ \
{ /* ompi_datatype_t */ \
OMPI_DATATYPE_INITIALIZER_ ## TYPE (OMPI_DATATYPE_FLAG_PREDEFINED | \
OMPI_DATATYPE_FLAG_ONE_SIDED | \
(FLAGS)) /*super*/, \
OMPI_DATATYPE_EMPTY_DATA(NAME) /*id,d_f_to_c_index,d_keyhash,args,packed_description,name*/ \
}, \
@ -350,7 +350,6 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
OPAL_OBJ_STATIC_INIT(opal_datatype_t), \
OPAL_DATATYPE_FLAG_BASIC | \
OMPI_DATATYPE_FLAG_PREDEFINED | \
OMPI_DATATYPE_FLAG_ONE_SIDED | \
OMPI_DATATYPE_FLAG_DATA_FORTRAN | (FLAGS) /*flag*/, \
OPAL_DATATYPE_ ## TYPE ## SIZE /*id*/, \
(((uint32_t)1)<<(OPAL_DATATYPE_ ## TYPE ## SIZE)) /*bdt_used*/, \

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

@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* $COPYRIGHT$
@ -356,7 +356,7 @@ opal_pointer_array_t ompi_datatype_f_to_c_table;
ompi_datatype_commit( &ptype ); \
COPY_DATA_DESC( PDATA, ptype ); \
(PDATA)->super.flags &= ~OPAL_DATATYPE_FLAG_PREDEFINED; \
(PDATA)->super.flags |= (OMPI_DATATYPE_FLAG_PREDEFINED|OMPI_DATATYPE_FLAG_ONE_SIDED); \
(PDATA)->super.flags |= OMPI_DATATYPE_FLAG_PREDEFINED; \
ptype->super.desc.desc = NULL; \
ptype->super.opt_desc.desc = NULL; \
OBJ_RELEASE( ptype ); \

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

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -67,7 +68,6 @@ BEGIN_C_DECLS
else if( (COUNT) < 0 ) (RC) = MPI_ERR_COUNT; \
else if( !opal_datatype_is_committed(&((DDT)->super)) ) (RC) = MPI_ERR_TYPE; \
else if( opal_datatype_is_overlapped(&((DDT)->super)) ) (RC) = MPI_ERR_TYPE; \
else if( !ompi_datatype_is_acceptable_for_one_sided(DDT)) (RC) = MPI_ERR_TYPE; \
else if( !opal_datatype_is_valid(&((DDT)->super)) ) (RC) = MPI_ERR_TYPE; \
} while(0)