|
| 1 | +/* |
| 2 | + * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana |
| 3 | + * University Research and Technology |
| 4 | + * Corporation. All rights reserved. |
| 5 | + * Copyright (c) 2004-2020 The University of Tennessee and The University |
| 6 | + * of Tennessee Research Foundation. All rights |
| 7 | + * reserved. |
| 8 | + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, |
| 9 | + * University of Stuttgart. All rights reserved. |
| 10 | + * Copyright (c) 2004-2005 The Regents of the University of California. |
| 11 | + * All rights reserved. |
| 12 | + * Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. |
| 13 | + * Copyright (c) 2015-2017 Research Organization for Information Science |
| 14 | + * and Technology (RIST). All rights reserved. |
| 15 | + * Copyright (c) 2025 UT-Battelle, LLC. All rights reserved. |
| 16 | + * $COPYRIGHT$ |
| 17 | + * |
| 18 | + * Additional copyrights may follow |
| 19 | + * |
| 20 | + * $HEADER$ |
| 21 | + */ |
| 22 | + |
| 23 | +#include "ompi_config.h" |
| 24 | + |
| 25 | +#include "ompi/mpi/fortran/mpif-h/bindings.h" |
| 26 | +#include "ompi/mpi/fortran/base/constants.h" |
| 27 | +#include "ompi/mpi/fortran/base/fortran_base_strings.h" |
| 28 | +#include "ompi/communicator/communicator.h" |
| 29 | + |
| 30 | +#if OMPI_BUILD_MPI_PROFILING |
| 31 | +#if OPAL_HAVE_WEAK_SYMBOLS |
| 32 | +#pragma weak PMPI_REMOVE_ERROR_STRING = ompi_remove_error_string_f |
| 33 | +#pragma weak pmpi_remove_error_string = ompi_remove_error_string_f |
| 34 | +#pragma weak pmpi_remove_error_string_ = ompi_remove_error_string_f |
| 35 | +#pragma weak pmpi_remove_error_string__ = ompi_remove_error_string_f |
| 36 | + |
| 37 | +#pragma weak PMPI_Remove_error_string_f = ompi_remove_error_string_f |
| 38 | +#pragma weak PMPI_Remove_error_string_f08 = ompi_remove_error_string_f |
| 39 | +#else |
| 40 | +OMPI_GENERATE_F77_BINDINGS (PMPI_REMOVE_ERROR_STRING, |
| 41 | + pmpi_remove_error_string, |
| 42 | + pmpi_remove_error_string_, |
| 43 | + pmpi_remove_error_string__, |
| 44 | + pompi_remove_error_string_f, |
| 45 | + (MPI_Fint *errorcode, MPI_Fint *ierr), |
| 46 | + (errorcode, ierr) ) |
| 47 | +#endif |
| 48 | +#endif |
| 49 | + |
| 50 | +#if OPAL_HAVE_WEAK_SYMBOLS |
| 51 | +#pragma weak MPI_REMOVE_ERROR_STRING = ompi_remove_error_string_f |
| 52 | +#pragma weak mpi_remove_error_string = ompi_remove_error_string_f |
| 53 | +#pragma weak mpi_remove_error_string_ = ompi_remove_error_string_f |
| 54 | +#pragma weak mpi_remove_error_string__ = ompi_remove_error_string_f |
| 55 | + |
| 56 | +#pragma weak MPI_Remove_error_string_f = ompi_remove_error_string_f |
| 57 | +#pragma weak MPI_Remove_error_string_f08 = ompi_remove_error_string_f |
| 58 | +#else |
| 59 | +#if ! OMPI_BUILD_MPI_PROFILING |
| 60 | +OMPI_GENERATE_F77_BINDINGS (MPI_REMOVE_ERROR_STRING, |
| 61 | + mpi_remove_error_string, |
| 62 | + mpi_remove_error_string_, |
| 63 | + mpi_remove_error_string__, |
| 64 | + ompi_remove_error_string_f, |
| 65 | + (MPI_Fint *errorcode, MPI_Fint *ierr), |
| 66 | + (errorcode, ierr) ) |
| 67 | +#else |
| 68 | +#define ompi_remove_error_string_f pompi_remove_error_string_f |
| 69 | +#endif |
| 70 | +#endif |
| 71 | + |
| 72 | + |
| 73 | +void ompi_remove_error_string_f(MPI_Fint *errorcode, MPI_Fint *ierr) |
| 74 | +{ |
| 75 | + int ierr_c; |
| 76 | + |
| 77 | + ierr_c = PMPI_Remove_error_string(OMPI_FINT_2_INT(*errorcode)); |
| 78 | + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c); |
| 79 | +} |
0 commit comments