* clean up the error checking a bit - user defined datatypes are allowed for
MPI_OP_REPLACE. All other rules are basically the same as MPI_Reduce, so use that helper function. This commit was SVN r9104.
Этот коммит содержится в:
родитель
eb7e722588
Коммит
889aeeddb2
@ -41,6 +41,7 @@ int MPI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype origin_data
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
ompi_win_t *ompi_win = (ompi_win_t*) win;
|
ompi_win_t *ompi_win = (ompi_win_t*) win;
|
||||||
|
char *msg;
|
||||||
|
|
||||||
if (target_rank == MPI_PROC_NULL) return MPI_SUCCESS;
|
if (target_rank == MPI_PROC_NULL) return MPI_SUCCESS;
|
||||||
|
|
||||||
@ -57,10 +58,11 @@ int MPI_Accumulate(void *origin_addr, int origin_count, MPI_Datatype origin_data
|
|||||||
rc = MPI_ERR_RANK;
|
rc = MPI_ERR_RANK;
|
||||||
} else if (MPI_OP_NULL == op) {
|
} else if (MPI_OP_NULL == op) {
|
||||||
rc = MPI_ERR_OP;
|
rc = MPI_ERR_OP;
|
||||||
} else if (!ompi_op_is_intrinsic(op) ||
|
} else if (op != &ompi_mpi_op_replace &&
|
||||||
(target_datatype->id < DT_MAX_PREDEFINED &&
|
!ompi_op_is_valid(op, target_datatype, &msg, FUNC_NAME)) {
|
||||||
-1 == ompi_op_ddt_map[target_datatype->id])) {
|
int ret = OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_OP, msg);
|
||||||
rc = MPI_ERR_OP;
|
free(msg);
|
||||||
|
return ret;
|
||||||
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_ACCESS_EPOCH)) {
|
} else if (0 == (ompi_win_get_mode(win) & OMPI_WIN_ACCESS_EPOCH)) {
|
||||||
rc = MPI_ERR_RMA_CONFLICT;
|
rc = MPI_ERR_RMA_CONFLICT;
|
||||||
} else {
|
} else {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user