Skip to content

Commit cec7ad4

Browse files
hppritchahjelmn
authored andcommitted
temporary fix for fortran error handlers
Signed-off-by: Howard Pritchard <hppritcha@gmail.com> (cherry picked from commit 04314a099d819091a4b2e15fcb22dbddfc5c809e)
1 parent bc64fb4 commit cec7ad4

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

ompi/mpi/fortran/mpif-h/comm_create_errhandler_f.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ void ompi_comm_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t *functio
7474
MPI_Fint *errhandler, MPI_Fint *ierr)
7575
{
7676
int c_ierr;
77-
MPI_Errhandler c_errhandler =
78-
ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_COMM,
77+
MPI_Errhandler c_errhandler;
78+
c_ierr = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_COMM,
7979
(ompi_errhandler_generic_handler_fn_t*) function,
80-
OMPI_ERRHANDLER_LANG_FORTRAN);
80+
OMPI_ERRHANDLER_LANG_FORTRAN, &c_errhandler);
8181
if (MPI_ERRHANDLER_NULL != c_errhandler) {
8282
*errhandler = PMPI_Errhandler_c2f(c_errhandler);
8383
c_ierr = MPI_SUCCESS;

ompi/mpi/fortran/mpif-h/file_create_errhandler_f.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ void ompi_file_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* functio
7474
MPI_Fint *errhandler, MPI_Fint *ierr)
7575
{
7676
int c_ierr;
77-
MPI_Errhandler c_errhandler =
78-
ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_FILE,
77+
MPI_Errhandler c_errhandler;
78+
c_ierr = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_FILE,
7979
(ompi_errhandler_generic_handler_fn_t*) function,
80-
OMPI_ERRHANDLER_LANG_FORTRAN);
80+
OMPI_ERRHANDLER_LANG_FORTRAN, &c_errhandler);
8181
if (MPI_ERRHANDLER_NULL != c_errhandler) {
8282
*errhandler = PMPI_Errhandler_c2f(c_errhandler);
8383
c_ierr = MPI_SUCCESS;

ompi/mpi/fortran/mpif-h/win_create_errhandler_f.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ static const char FUNC_NAME[] = "MPI_WIN_CREATE_ERRHANDLER";
7373
void ompi_win_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t* function,
7474
MPI_Fint *errhandler, MPI_Fint *ierr)
7575
{
76-
MPI_Errhandler c_errhandler =
77-
ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_WIN,
76+
int c_ierr;
77+
MPI_Errhandler c_errhandler;
78+
79+
c_ierr = ompi_errhandler_create(OMPI_ERRHANDLER_TYPE_WIN,
7880
(ompi_errhandler_generic_handler_fn_t*) function,
79-
OMPI_ERRHANDLER_LANG_FORTRAN);
81+
OMPI_ERRHANDLER_LANG_FORTRAN, &c_errhandler);
8082
if (MPI_ERRHANDLER_NULL != c_errhandler) {
8183
*errhandler = PMPI_Errhandler_c2f(c_errhandler);
8284
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);

0 commit comments

Comments
 (0)