1
1
This commit was SVN r29314.

The following SVN revision numbers were found above:
  r29280 --> open-mpi/ompi@5c41bdc746
Этот коммит содержится в:
Matthias Jurenz 2013-10-01 12:43:15 +00:00
родитель 5d2bce3334
Коммит 29b22f350e
3 изменённых файлов: 124 добавлений и 8 удалений

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

@ -90,6 +90,8 @@ 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, 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_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_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, 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_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_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);

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

@ -43,15 +43,26 @@
#include "mpi.h"
/* since MPI-3 the C keyword "const" is added to all relevant MPI API parameters
(e.g. MPI_Send(void* sendbuf, ...) -> MPI_Send(const void* sendbuf, ...));
prepend CONST to these parameters which is defined either to "const"
(if MPI-3) or to nothing (if MPI-1/2) */
/* JMS Temporarily added "|| 1" in the next line so that the OMPI trunk can build */
#if defined(MPI_VERSION) && MPI_VERSION >= 3 || 1
/* 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 */
#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)
# 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 */
@ -1313,6 +1324,109 @@ 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;
}
/*
*-----------------------------------------------------------------------------
*