Skip to content

Commit 4d357f8

Browse files
author
rhc54
committed
Merge pull request open-mpi#1210 from jjhursey/fix/v1.10-op-init
ompi/op: Provide a default value for type/flags
2 parents f30d793 + da044f7 commit 4d357f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ompi/op/op.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ static void ompi_op_construct(ompi_op_t *new_op)
441441
{
442442
int i;
443443

444+
/* Provide a default of a high value. Useful for non-predefined ops. */
445+
new_op->op_type = OMPI_OP_NUM_OF_TYPES;
446+
new_op->o_flags = 0;
447+
444448
/* assign entry in fortran <-> c translation array */
445449

446450
new_op->o_f_to_c_index =

0 commit comments

Comments
 (0)