Skip to content

Commit 979e947

Browse files
committed
attributes - clean up extra helper data
using the bindings_extra_state arg to ompi_attr_create_keyval Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent 590e08e commit 979e947

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

ompi/mpi/c/comm_create_keyval.c.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* and Technology (RIST). All rights reserved.
1515
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
1616
* All Rights reserved.
17-
* Copyright (c) 2024 Triad National Security, LLC. All rights
17+
* Copyright (c) 2024-2025 Triad National Security, LLC. All rights
1818
* reserved.
1919
* $COPYRIGHT$
2020
*
@@ -52,13 +52,14 @@ PROTOTYPE ERROR_CLASS comm_create_keyval(COMM_COPY_ATTR_FUNCTION comm_copy_attr_
5252
#if OMPI_ABI_SRC
5353
copy_fn.attr_communicator_copy_fn = ompi_abi_copy_attr_fn;
5454
del_fn.attr_communicator_delete_fn = ompi_abi_delete_attr_fn;
55+
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
56+
comm_keyval, extra_state, flags, extra_state);
5557
#else
5658
copy_fn.attr_communicator_copy_fn = comm_copy_attr_fn;
5759
del_fn.attr_communicator_delete_fn = comm_delete_attr_fn;
58-
#endif
59-
6060
ret = ompi_attr_create_keyval(COMM_ATTR, copy_fn, del_fn,
6161
comm_keyval, extra_state, flags, NULL);
62+
#endif
6263

6364
OMPI_ERRHANDLER_NOHANDLE_RETURN(ret, MPI_ERR_OTHER, FUNC_NAME);
6465
}

ompi/mpi/c/type_create_keyval.c.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* and Technology (RIST). All rights reserved.
1515
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
1616
* All Rights reserved.
17-
* Copyright (c) 2024 Triad National Security, LLC. All rights
17+
* Copyright (c) 2024-2025 Triad National Security, LLC. All rights
1818
* reserved.
1919
* $COPYRIGHT$
2020
*
@@ -53,13 +53,15 @@ PROTOTYPE ERROR_CLASS type_create_keyval(TYPE_COPY_ATTR_FUNCTION type_copy_attr_
5353
#if OMPI_ABI_SRC
5454
copy_fn.attr_datatype_copy_fn = ompi_abi_copy_attr_fn;
5555
del_fn.attr_datatype_delete_fn = ompi_abi_delete_attr_fn;
56+
ret = ompi_attr_create_keyval(TYPE_ATTR, copy_fn, del_fn,
57+
type_keyval, extra_state, flags, extra_state);
5658
#else
5759
copy_fn.attr_datatype_copy_fn = type_copy_attr_fn;
5860
del_fn.attr_datatype_delete_fn = type_delete_attr_fn;
59-
#endif
60-
6161
ret = ompi_attr_create_keyval(TYPE_ATTR, copy_fn, del_fn,
6262
type_keyval, extra_state, flags, NULL);
63+
#endif
64+
6365
OMPI_ERRHANDLER_NOHANDLE_RETURN(ret, ret, FUNC_NAME);
6466
}
6567

ompi/mpi/c/win_create_keyval.c.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* and Technology (RIST). All rights reserved.
1515
* Copyright (c) 2022 Amazon.com, Inc. or its affiliates.
1616
* All Rights reserved.
17-
* Copyright (c) 2024 Triad National Security, LLC. All rights
17+
* Copyright (c) 2024-2025 Triad National Security, LLC. All rights
1818
* reserved.
1919
* $COPYRIGHT$
2020
*
@@ -51,12 +51,14 @@ PROTOTYPE ERROR_CLASS win_create_keyval(WIN_COPY_ATTR_FUNCTION win_copy_attr_fn,
5151
#if OMPI_ABI_SRC
5252
copy_fn.attr_win_copy_fn = ompi_abi_copy_attr_fn;
5353
del_fn.attr_win_delete_fn = ompi_abi_delete_attr_fn;
54+
ret = ompi_attr_create_keyval(WIN_ATTR, copy_fn, del_fn,
55+
win_keyval, extra_state, flags, extra_state);
5456
#else
5557
copy_fn.attr_win_copy_fn = win_copy_attr_fn;
5658
del_fn.attr_win_delete_fn = win_delete_attr_fn;
57-
#endif
58-
5959
ret = ompi_attr_create_keyval(WIN_ATTR, copy_fn, del_fn,
6060
win_keyval, extra_state, flags, NULL);
61+
#endif
62+
6163
OMPI_ERRHANDLER_NOHANDLE_RETURN(ret, MPI_ERR_OTHER, FUNC_NAME);
6264
}

0 commit comments

Comments
 (0)