Skip to content
Snippets Groups Projects
Commit be074f09 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

configure: Fix problem in workaround for older MPI versions.

parent 9b2b8d0e
No related branches found
No related tags found
No related merge requests found
......@@ -54,12 +54,12 @@
#include <mpi.h>
#include "xt/xt_mpi.h"
#include "xt_mpi_ddt_cache.h"
#include "xt_mpi_ddt_wrap.h"
#include "xt_arithmetic_util.h"
#include "core/cksum.h"
#include "core/core.h"
#include "core/ppm_xfuncs.h"
#include "xt_mpi_ddt_wrap.h"
#include "xt_mpi_ddt_cache.h"
#if ! HAVE_DECL___BUILTIN_CLZL \
&& (HAVE_DECL___LZCNT && SIZEOF_LONG == SIZEOF_INT \
......@@ -314,27 +314,6 @@ Xt_mpi_ddt_cache_acquire_indexed_block(
return dt;
}
#if MPI_VERSION < 3
static inline int
XtMPI_Type_create_hindexed_block(int count, int blocklength,
const MPI_Aint array_of_displacements[],
MPI_Datatype oldtype, MPI_Datatype *newtype)
{
size_t count_ = count > 0 ? (size_t)count : 0;
int *restrict blocklengths = xmalloc(count_ * sizeof (*blocklengths));
for (size_t i = 0; i < count_; ++i)
blocklengths[i] = blocklength;
int rc = MPI_Type_create_hindexed(count, blocklengths,
CAST_MPI_SEND_BUF(array_of_displacements),
oldtype, newtype);
free(blocklengths);
return rc;
}
#define MPI_Type_create_hindexed_block XtMPI_Type_create_hindexed_block
enum { MPI_COMBINER_HINDEXED_BLOCK=128 };
#endif
MPI_Datatype
Xt_mpi_ddt_cache_acquire_hindexed_block(
struct Xt_mpiddt_list *ddt_list,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment