1
1

Commit 1.5 of 2: just like r9560, we need to make the MPI_*_C2F

functions return an invalid fortran handle (-1) if an invalid C handle
is passed in.

Just so it's logged somewhere -- it looks like commit 2 of 2 as noted
in the r9560 commit message (ok, 3 of 3 if you're really counting),
where we have to edit the C interface functions to check for NULL, is
going to be far easier than I thought -- many (but not all) of the C
interface functions already check for NULL MPI handles (either
directly or through helper functions).  

Woo hoo for foresight...

This commit was SVN r9561.

The following SVN revision numbers were found above:
  r9560 --> open-mpi/ompi@e00c6053dc
Этот коммит содержится в:
Jeff Squyres 2006-04-07 04:01:22 +00:00
родитель e00c6053dc
Коммит f710ef5b2b
9 изменённых файлов: 18 добавлений и 9 удалений

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -38,7 +39,7 @@ MPI_Fint MPI_Comm_c2f(MPI_Comm comm)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (ompi_comm_invalid (comm)) {
comm = MPI_COMM_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -44,7 +45,7 @@ MPI_Fint MPI_Errhandler_c2f(MPI_Errhandler errhandler)
/* not invoking an error handler */
if (NULL == errhandler ||
OMPI_ERRHANDLER_TYPE_COMM != errhandler->eh_mpi_object_type) {
errhandler = MPI_ERRHANDLER_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -38,7 +39,7 @@ MPI_Fint MPI_File_c2f(MPI_File file)
if (MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (ompi_file_invalid(file)) {
file = MPI_FILE_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -39,7 +40,7 @@ MPI_Fint MPI_Group_c2f(MPI_Group group)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if( (NULL == group) ) {
group = MPI_GROUP_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -39,7 +40,7 @@ MPI_Fint MPI_Info_c2f(MPI_Info info)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == info || ompi_info_is_freed(info)) {
info = MPI_INFO_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -39,7 +40,7 @@ MPI_Fint MPI_Op_c2f(MPI_Op op)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == op) {
op = MPI_OP_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -39,7 +40,7 @@ MPI_Fint MPI_Request_c2f(MPI_Request request)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == request) {
request = MPI_REQUEST_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -39,7 +40,7 @@ MPI_Fint MPI_Type_c2f(MPI_Datatype datatype)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (NULL == datatype) {
datatype = MPI_DATATYPE_NULL;
return OMPI_INT_2_FINT(-1);
}
}

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -40,7 +41,7 @@ MPI_Fint MPI_Win_c2f(MPI_Win win)
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if (ompi_win_invalid(win)) {
win = MPI_WIN_NULL;
return OMPI_INT_2_FINT(-1);
}
}