1
1

Merge pull request #6312 from ggouaillardet/topic/op

ompi/op: fix support of non predefined datatypes with predefined oper…
Этот коммит содержится в:
Nathan Hjelm 2019-01-29 10:55:00 -07:00 коммит произвёл GitHub
родитель 23da9fac23 bc1cab5498
Коммит f9338dac93
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

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

@ -16,6 +16,8 @@
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
* Copyright (c) 2019 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -571,9 +573,16 @@ static inline void ompi_op_reduce(ompi_op_t * op, void *source,
/* For intrinsics, we also pass the corresponding op module */
if (0 != (op->o_flags & OMPI_OP_FLAGS_INTRINSIC)) {
op->o_func.intrinsic.fns[ompi_op_ddt_map[dtype->id]](source, target,
&count, &dtype,
op->o_func.intrinsic.modules[ompi_op_ddt_map[dtype->id]]);
int dtype_id;
if (!ompi_datatype_is_predefined(dtype)) {
ompi_datatype_t *dt = ompi_datatype_get_single_predefined_type_from_args(dtype);
dtype_id = ompi_op_ddt_map[dt->id];
} else {
dtype_id = ompi_op_ddt_map[dtype->id];
}
op->o_func.intrinsic.fns[dtype_id](source, target,
&count, &dtype,
op->o_func.intrinsic.modules[dtype_id]);
return;
}