Skip to content

Commit 92d9194

Browse files
committed
mpi4: fix init check for a few more functions
MPI_Errhandler_c2f MPI_Errhandler_free MPI_Session_call_errhandler are on the list of functions that can be invoked before mpi is initialized (via mpi_init or session_init) and after finalize. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
1 parent 6bbfca7 commit 92d9194

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ompi/mpi/c/errhandler_c2f.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
1313
* Copyright (c) 2015 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
15+
* Copyright (c) 2022 Triad National Security, LLC. All rights
16+
* reserved.
1517
* $COPYRIGHT$
1618
*
1719
* Additional copyrights may follow
@@ -33,16 +35,14 @@
3335
#define MPI_Errhandler_c2f PMPI_Errhandler_c2f
3436
#endif
3537

36-
static const char FUNC_NAME[] = "MPI_Errhandler_c2f";
38+
static const char FUNC_NAME[] __opal_attribute_unused__ = "MPI_Errhandler_c2f";
3739

3840

3941
MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler)
4042
{
4143
/* Error checking */
4244

4345
if (MPI_PARAM_CHECK) {
44-
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
45-
4646
/* mapping an invalid handle to a null handle */
4747
if (NULL == errhandler) {
4848
return OMPI_INT_2_FINT(-1);

ompi/mpi/c/errhandler_free.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2022 Triad National Security, LLC. All rights
15+
* reserved.
1416
* $COPYRIGHT$
1517
*
1618
* Additional copyrights may follow
@@ -32,15 +34,14 @@
3234
#define MPI_Errhandler_free PMPI_Errhandler_free
3335
#endif
3436

35-
static const char FUNC_NAME[] = "MPI_Errhandler_free";
37+
static const char FUNC_NAME[] __opal_attribute_unused__ = "MPI_Errhandler_free";
3638

3739

3840
int MPI_Errhandler_free(MPI_Errhandler *errhandler)
3941
{
4042
/* Error checking */
4143

4244
if (MPI_PARAM_CHECK) {
43-
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
4445
/* Raise an MPI exception if we got NULL or if we got an intrinsic
4546
*and* the reference count is 1 (meaning that this FREE would
4647
actually free the underlying intrinsic object). This is ugly

ompi/mpi/c/session_call_errhandler.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@
3636
#endif
3737

3838

39-
static const char FUNC_NAME[] = "MPI_Session_call_errhandler";
39+
static const char FUNC_NAME[] __opal_attribute_unused__ = "MPI_Session_call_errhandler";
4040

4141

4242
int MPI_Session_call_errhandler(MPI_Session session, int errorcode)
4343
{
4444
/* Error checking */
4545

4646
if (MPI_PARAM_CHECK) {
47-
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
4847
if (ompi_instance_invalid(session)) {
4948
if (NULL != session) {
5049
return OMPI_ERRHANDLER_INVOKE(session, MPI_ERR_SESSION, FUNC_NAME);

0 commit comments

Comments
 (0)