Skip to content

Commit 357d2dc

Browse files
committed
c bindings: convert new status functions to in
format for bindings generator code. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent d975271 commit 357d2dc

File tree

7 files changed

+32
-65
lines changed

7 files changed

+32
-65
lines changed

ompi/mpi/c/Makefile.am

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,15 @@ prototype_sources = \
388388
status_f082f.c.in \
389389
status_f2c.c.in \
390390
status_f2f08.c.in \
391+
status_get_error.c.in \
392+
status_get_source.c.in \
393+
status_get_tag.c.in \
391394
status_set_cancelled.c.in \
392395
status_set_elements.c.in \
393396
status_set_elements_x.c.in \
397+
status_set_error.c.in \
398+
status_set_source.c.in \
399+
status_set_tag.c.in \
394400
testall.c.in \
395401
testany.c.in \
396402
test.c.in \
@@ -820,9 +826,15 @@ interface_profile_sources = \
820826
generated_status_f082f.c \
821827
generated_status_f2c.c \
822828
generated_status_f2f08.c \
829+
generated_status_get_error.c \
830+
generated_status_get_source.c \
831+
generated_status_get_tag.c \
823832
generated_status_set_cancelled.c \
824833
generated_status_set_elements.c \
825834
generated_status_set_elements_x.c \
835+
generated_status_set_error.c \
836+
generated_status_set_source.c \
837+
generated_status_set_tag.c \
826838
generated_testall.c \
827839
generated_testany.c \
828840
generated_test.c \

ompi/mpi/c/status_get_error.c renamed to ompi/mpi/c/status_get_error.c.in

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
4+
* Copyright (c) 2025 Triad National Security, LLC. All rights
5+
* reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -16,17 +18,7 @@
1618
#include "ompi/errhandler/errhandler.h"
1719
#include "ompi/memchecker.h"
1820

19-
#if OMPI_BUILD_MPI_PROFILING
20-
#if OPAL_HAVE_WEAK_SYMBOLS
21-
#pragma weak MPI_Status_get_error = PMPI_Status_get_error
22-
#endif
23-
#define MPI_Status_get_error PMPI_Status_get_error
24-
#endif
25-
26-
static const char FUNC_NAME[] = "MPI_Status_get_error";
27-
28-
29-
int MPI_Status_get_error(const MPI_Status *status, int *error)
21+
PROTOTYPE ERROR_CLASS status_get_error(STATUS status, INT_OUT error)
3022
{
3123
int rc = MPI_SUCCESS;
3224

ompi/mpi/c/status_get_source.c renamed to ompi/mpi/c/status_get_source.c.in

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
4+
* Copyright (c) 2025 Triad National Security, LLC. All rights
5+
* reserved.
46
* $COPYRIGHT$
57
*
68
* Additional copyrights may follow
@@ -16,17 +18,7 @@
1618
#include "ompi/errhandler/errhandler.h"
1719
#include "ompi/memchecker.h"
1820

19-
#if OMPI_BUILD_MPI_PROFILING
20-
#if OPAL_HAVE_WEAK_SYMBOLS
21-
#pragma weak MPI_Status_get_source = PMPI_Status_get_source
22-
#endif
23-
#define MPI_Status_get_source PMPI_Status_get_source
24-
#endif
25-
26-
static const char FUNC_NAME[] = "MPI_Status_get_source";
27-
28-
29-
int MPI_Status_get_source(const MPI_Status *status, int *source)
21+
PROTOTYPE ERROR_CLASS status_get_source(STATUS status, INT_OUT source)
3022
{
3123
int rc = MPI_SUCCESS;
3224

ompi/mpi/c/status_get_tag.c renamed to ompi/mpi/c/status_get_tag.c.in

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
33
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
4+
* Copyright (c) 2025 Triad National Security, LLC. All rights
5+
* reserved.
6+
*
47
* $COPYRIGHT$
58
*
69
* Additional copyrights may follow
@@ -16,17 +19,8 @@
1619
#include "ompi/errhandler/errhandler.h"
1720
#include "ompi/memchecker.h"
1821

19-
#if OMPI_BUILD_MPI_PROFILING
20-
#if OPAL_HAVE_WEAK_SYMBOLS
21-
#pragma weak MPI_Status_get_tag = PMPI_Status_get_tag
22-
#endif
23-
#define MPI_Status_get_tag PMPI_Status_get_tag
24-
#endif
25-
26-
static const char FUNC_NAME[] = "MPI_Status_get_tag";
27-
2822

29-
int MPI_Status_get_tag(const MPI_Status *status, int *tag)
23+
PROTOTYPE ERROR_CLASS status_get_tag(STATUS status, INT_OUT tag)
3024
{
3125
int rc = MPI_SUCCESS;
3226

ompi/mpi/c/status_set_error.c renamed to ompi/mpi/c/status_set_error.c.in

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
3+
* Copyright (c) 2025 Triad National Security, LLC. All rights
4+
* reserved.
35
* $COPYRIGHT$
46
*
57
* Additional copyrights may follow
@@ -15,17 +17,7 @@
1517
#include "ompi/errhandler/errhandler.h"
1618
#include "ompi/memchecker.h"
1719

18-
#if OMPI_BUILD_MPI_PROFILING
19-
#if OPAL_HAVE_WEAK_SYMBOLS
20-
#pragma weak MPI_Status_set_error = PMPI_Status_set_error
21-
#endif
22-
#define MPI_Status_set_error PMPI_Status_set_error
23-
#endif
24-
25-
static const char FUNC_NAME[] = "MPI_Status_set_error";
26-
27-
28-
int MPI_Status_set_error(MPI_Status *status, int error)
20+
PROTOTYPE ERROR_CLASS status_set_error(STATUS_OUT status, INT error)
2921
{
3022
MEMCHECKER(
3123
if(status != MPI_STATUSES_IGNORE) {

ompi/mpi/c/status_set_source.c renamed to ompi/mpi/c/status_set_source.c.in

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*
22
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
3+
* Copyright (c) 2025 Triad National Security, LLC. All rights
4+
* reserved.
35
* $COPYRIGHT$
46
*
57
* Additional copyrights may follow
@@ -15,17 +17,7 @@
1517
#include "ompi/errhandler/errhandler.h"
1618
#include "ompi/memchecker.h"
1719

18-
#if OMPI_BUILD_MPI_PROFILING
19-
#if OPAL_HAVE_WEAK_SYMBOLS
20-
#pragma weak MPI_Status_set_source = PMPI_Status_set_source
21-
#endif
22-
#define MPI_Status_set_source PMPI_Status_set_source
23-
#endif
24-
25-
static const char FUNC_NAME[] = "MPI_Status_set_source";
26-
27-
28-
int MPI_Status_set_source(MPI_Status *status, int source)
20+
PROTOTYPE ERROR_CLASS status_set_source(STATUS_OUT status, INT source)
2921
{
3022
MEMCHECKER(
3123
if(status != MPI_STATUSES_IGNORE) {

ompi/mpi/c/status_set_tag.c renamed to ompi/mpi/c/status_set_tag.c.in

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/*
22
* Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
3+
* Copyright (c) 2025 Triad National Security, LLC. All rights
4+
* reserved.
5+
*
36
* $COPYRIGHT$
47
*
58
* Additional copyrights may follow
@@ -15,17 +18,7 @@
1518
#include "ompi/errhandler/errhandler.h"
1619
#include "ompi/memchecker.h"
1720

18-
#if OMPI_BUILD_MPI_PROFILING
19-
#if OPAL_HAVE_WEAK_SYMBOLS
20-
#pragma weak MPI_Status_set_tag = PMPI_Status_set_tag
21-
#endif
22-
#define MPI_Status_set_tag PMPI_Status_set_tag
23-
#endif
24-
25-
static const char FUNC_NAME[] = "MPI_Status_set_tag";
26-
27-
28-
int MPI_Status_set_tag(MPI_Status *status, int tag)
21+
PROTOTYPE ERROR_CLASS status_set_tag(STATUS_OUT status, INT tag)
2922
{
3023
MEMCHECKER(
3124
if(status != MPI_STATUSES_IGNORE) {

0 commit comments

Comments
 (0)