/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
*
- * (C) 2013 by Argonne National Laboratory.
+ * (C) 2010 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "mpi.h"
MPI_Comm comm;
MPI_Win win;
MPI_Request req;
+ MPI_Datatype derived_dtp;
MTest_Init( &argc, &argv );
MPI_Abort( MPI_COMM_WORLD, 1 );
}
+ MPI_Type_contiguous(2, MPI_INT, &derived_dtp);
+ MPI_Type_commit(&derived_dtp);
+
/* The following loop is used to run through a series of communicators
* that are subsets of MPI_COMM_WORLD, of size 1 or greater. */
while (MTestGetIntracommGeneral( &comm, 1, 1 )) {
MPI_Comm_rank( comm, &rank );
MPI_Comm_size( comm, &size );
- MPI_Win_create( buf, bufsize, sizeof(int), MPI_INFO_NULL, comm, &win );
+ MPI_Win_create( buf, bufsize, 2*sizeof(int), MPI_INFO_NULL, comm, &win );
/* To improve reporting of problems about operations, we
change the error handler to errors return */
MPI_Win_set_errhandler( win, MPI_ERRORS_RETURN );
MPI_Accumulate( rmabuf, count, MPI_INT, TARGET,
0, count, MPI_INT, MPI_SUM, win );
);
+ TEST_FENCE_OP("Accumulate_derived",
+ MPI_Accumulate( rmabuf, count, derived_dtp, TARGET,
+ 0, count, derived_dtp, MPI_SUM, win );
+ );
TEST_FENCE_OP("Get accumulate",
MPI_Get_accumulate( rmabuf, count, MPI_INT, result,
count, MPI_INT, TARGET, 0,
MPI_Accumulate( rmabuf, count, MPI_INT, TARGET, 0,
count, MPI_INT, MPI_SUM, win );
);
+ TEST_PT_OP("Accumulate_derived",
+ MPI_Accumulate( rmabuf, count, derived_dtp, TARGET, 0,
+ count, derived_dtp, MPI_SUM, win );
+ );
TEST_PT_OP("Get accumulate",
MPI_Get_accumulate( rmabuf, count, MPI_INT, result, count,
MPI_INT, TARGET, 0, count,
MPI_Raccumulate( rmabuf, count, MPI_INT, TARGET, 0,
count, MPI_INT, MPI_SUM, win, &req );
);
+ TEST_REQ_OP("Raccumulate_derived", req,
+ MPI_Raccumulate( rmabuf, count, derived_dtp, TARGET, 0,
+ count, derived_dtp, MPI_SUM, win, &req );
+ );
TEST_REQ_OP("Rget_accumulate", req,
MPI_Rget_accumulate( rmabuf, count, MPI_INT, result,
count, MPI_INT, TARGET, 0,
MTestFreeComm(&comm);
}
+ MPI_Type_free(&derived_dtp);
+
free( result );
free( buf );
free( rmabuf );