Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ompi/op/op.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ ompi_op_t *ompi_op_create_user(bool commute,
new_op->o_flags |= OMPI_OP_FLAGS_COMMUTE;
}

strncpy(new_op->o_name, "USER OP", sizeof(new_op->o_name) - 1);
new_op->o_name[sizeof(new_op->o_name) - 1] = '\0';

/* Set the user-defined callback function. The "fort_fn" member
is part of a union, so it doesn't matter if this is a C or
Fortan callback; we'll call the right flavor (per o_flags) at
Expand Down Expand Up @@ -446,6 +449,7 @@ static void ompi_op_construct(ompi_op_t *new_op)
/* Provide a default of a high value. Useful for non-predefined ops. */
new_op->op_type = OMPI_OP_NUM_OF_TYPES;
new_op->o_flags = 0;
new_op->o_name[0] = '\0';

/* assign entry in fortran <-> c translation array */

Expand Down