1
1
- adapted Open MPI version check (the "const" stuff will come with version 1.7.4, not from 1.9.0)
	- removed the const keyword from the deprecated functions MPI_Type_hindexed and MPI_Type_struct
	  TODO: Since MPICH v3.x adds the const keyword to that functions we need a configure test to figure out whether adding const is required. (only relevant for the stand-alone version of VampirTrace)

This commit was SVN r29317.

The following SVN revision numbers were found above:
  r29314 --> open-mpi/ompi@29b22f350e
Этот коммит содержится в:
Matthias Jurenz 2013-10-01 14:24:50 +00:00
родитель 29b22f350e
Коммит 0a841eb762
3 изменённых файлов: 9 добавлений и 120 удалений

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

@ -90,8 +90,6 @@ MPI_Test
MPI_Testall
MPI_Testany
MPI_Testsome
MPI_Type_hindexed
MPI_Type_struct
MPI_Wait
MPI_Waitall
MPI_Waitany

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

@ -149,12 +149,12 @@ VT_MPI_INT MPI_Type_commit(MPI_Datatype* datatype_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Type_contiguous(VT_MPI_INT count, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_extent(MPI_Datatype datatype, MPI_Aint* extent_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_free(MPI_Datatype* datatype_CLASS_SINGLE_IO);
VT_MPI_INT MPI_Type_hindexed(VT_MPI_INT count, CONST VT_MPI_INT* array_of_blocklengths, CONST MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_hindexed(VT_MPI_INT count, VT_MPI_INT* array_of_blocklengths, MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_hvector(VT_MPI_INT count, VT_MPI_INT blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_indexed(VT_MPI_INT count, CONST VT_MPI_INT* array_of_blocklengths, CONST VT_MPI_INT* array_of_displacements, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_lb(MPI_Datatype datatype, MPI_Aint* displacement_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_size(MPI_Datatype datatype, VT_MPI_INT* size);
VT_MPI_INT MPI_Type_struct(VT_MPI_INT count, CONST VT_MPI_INT* array_of_blocklengths, CONST MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, CONST MPI_Datatype* array_of_types_CLASS_ARRAY_IN_count, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_struct(VT_MPI_INT count, VT_MPI_INT* array_of_blocklengths, MPI_Aint* array_of_displacements_CLASS_ARRAY_IN_count, MPI_Datatype* array_of_types_CLASS_ARRAY_IN_count, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_ub(MPI_Datatype datatype, MPI_Aint* displacement_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Type_vector(VT_MPI_INT count, VT_MPI_INT blocklength, VT_MPI_INT stride, MPI_Datatype oldtype, MPI_Datatype* newtype_CLASS_SINGLE_OUT);
VT_MPI_INT MPI_Unpack(CONST void* inbuf, VT_MPI_INT insize, VT_MPI_INT* position, void* outbuf_CLASS_BUFFER, VT_MPI_INT outcount, MPI_Datatype datatype, MPI_Comm comm);

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

@ -46,23 +46,17 @@
/* The MPI 3.0 standard added the const keyword to all in buffers in the
C bindings. Prepend CONST to those function parameters which is defined
either to const (if MPI-3*) or to nothing (if MPI-1/2).
*or Open MPI v1.9a, even though it doesn't identify itself as MPI-3.0 yet */
*or Open MPI version >= 1.7.4, even though it doesn't identify itself as
MPI-3.0 yet */
#if (defined(MPI_VERSION) && MPI_VERSION >= 3) || \
(defined(OPEN_MPI) && defined(OMPI_MAJOR_VERSION) && \
defined(OMPI_MINOR_VERSION) && \
OMPI_MAJOR_VERSION == 1 && OMPI_MINOR_VERSION == 9)
(defined(OMPI_MAJOR_VERSION) && defined(OMPI_MINOR_VERSION) && \
defined(OMPI_RELEASE_VERSION) && \
(OMPI_MAJOR_VERSION > 1 || \
(OMPI_MINOR_VERSION > 7 || \
(OMPI_MINOR_VERSION == 7 && OMPI_RELEASE_VERSION > 3))))
# define CONST const
/* Open MPI did not add the const keyword to deprecated functions
(e.g. MPI_Type_hindexed, MPI_Type_struct), so we need a special CONST macro
for those functions. */
# if defined(OPEN_MPI)
# define DEPRECATED_CONST
# else /* OPEN_MPI */
# define DEPRECATED_CONST CONST
# endif /* OPEN_MPI */
#else /* MPI_VERSION */
# define CONST
# define DEPRECATED_CONST
#endif /* MPI_VERSION */
/* get calling thread id */
@ -1324,109 +1318,6 @@ VT_MPI_INT MPI_Win_get_group(MPI_Win win, MPI_Group* group)
#endif /* HAVE_MPI2_1SIDED */
/*
*-----------------------------------------------------------------------------
*
* Derived datatypes
*
*-----------------------------------------------------------------------------
*/
/* -- MPI_Type_hindexed -- */
VT_MPI_INT MPI_Type_hindexed(VT_MPI_INT count,
DEPRECATED_CONST VT_MPI_INT* array_of_blocklengths,
DEPRECATED_CONST MPI_Aint* array_of_displacements,
MPI_Datatype oldtype, MPI_Datatype* newtype)
{
VT_MPI_INT result;
uint32_t tid;
GET_THREAD_ID(tid);
if (IS_MPI_TRACE_ON(tid))
{
uint64_t time;
uint8_t was_recorded;
MPI_TRACE_OFF(tid);
time = vt_pform_wtime();
was_recorded = vt_enter(tid, &time, vt_mpi_regid[VT__MPI_TYPE_HINDEXED]);
VT_UNIMCI_CHECK_PRE(MPI_Type_hindexed,
(count, array_of_blocklengths, array_of_displacements, oldtype, newtype,
"", 0, 0), was_recorded, &time);
result = PMPI_Type_hindexed(count, array_of_blocklengths,
array_of_displacements, oldtype, newtype);
VT_UNIMCI_CHECK_POST(MPI_Type_hindexed,
(count, array_of_blocklengths, array_of_displacements, oldtype, newtype,
"", 0, 0), was_recorded, &time);
time = vt_pform_wtime();
vt_exit(tid, &time);
MPI_TRACE_ON(tid);
}
else
{
result = PMPI_Type_hindexed(count, array_of_blocklengths,
array_of_displacements, oldtype, newtype);
}
return result;
}
/* -- MPI_Type_struct -- */
VT_MPI_INT MPI_Type_struct(VT_MPI_INT count,
DEPRECATED_CONST VT_MPI_INT* array_of_blocklengths,
DEPRECATED_CONST MPI_Aint* array_of_displacements,
DEPRECATED_CONST MPI_Datatype* array_of_types,
MPI_Datatype* newtype)
{
VT_MPI_INT result;
uint32_t tid;
GET_THREAD_ID(tid);
if (IS_MPI_TRACE_ON(tid))
{
uint64_t time;
uint8_t was_recorded;
MPI_TRACE_OFF(tid);
time = vt_pform_wtime();
was_recorded = vt_enter(tid, &time, vt_mpi_regid[VT__MPI_TYPE_STRUCT]);
VT_UNIMCI_CHECK_PRE(MPI_Type_struct,
(count, array_of_blocklengths, array_of_displacements, array_of_types,
newtype, "", 0, 0), was_recorded, &time);
result = PMPI_Type_struct(count, array_of_blocklengths,
array_of_displacements, array_of_types, newtype);
VT_UNIMCI_CHECK_POST(MPI_Type_struct,
(count, array_of_blocklengths, array_of_displacements, array_of_types,
newtype, "", 0, 0), was_recorded, &time);
time = vt_pform_wtime();
vt_exit(tid, &time);
MPI_TRACE_ON(tid);
}
else
{
result = PMPI_Type_struct(count, array_of_blocklengths,
array_of_displacements, array_of_types, newtype);
}
return result;
}
/*
*-----------------------------------------------------------------------------
*