Skip to content

Commit 9f9f70e

Browse files
committed
Merge pull request #1746 from jjhursey/topic/op-init
ompi/op: Provide a default value for type/flags
2 parents 45fbfa2 + a776d78 commit 9f9f70e

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
@@ -443,6 +443,10 @@ static void ompi_op_construct(ompi_op_t *new_op)
443443
{
444444
int i;
445445

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

448452
new_op->o_f_to_c_index =

0 commit comments

Comments
 (0)