113ce723e1
size_t to int. This is in recognition of the fact that these two classes are primarily used for fortran<-->c convertsion of various entities (attributes, MPI objects), and MPI defines that an int must be used to hold MPI fortran handles. Hence, why use size_t internally? See the comment in src/class/ompi_pointer_array.h for a better description. Mixed in a few attribute fixes in this commit as well. This commit, therefore: - converts the indexing from size_t to int - changes all locations in the code that I could find that used size_t as the interface to ompi_bitmap_t or ompi_pointer_array_t - convert to use OMPI_FINT_2_INT / OMPI_INT_2_FINT macros in various src/mpi/c/*f2c.c and src/mpi/c/*c2f.c files - check the return code of ompi_comm_free() to ensure that everything worked properly before returning MPI_SUCCESS - unified all src/mpi/c/*f2c.c functions (i.e., they all do the same thing) - tie up some loose ends w.r.t. MPI_Request handling in fortran; set the req_f_to_c_index to MPI_UNDEFINED when it does not have a fortran index - still need to add a configure test to find OMPI_FORTRAN_HANDLE_MAX for ompi_bitmap.c and ompi_pointer_array.c (hard-wired to INT_MAX right now) - re-organized, consolidated, and unified some ompi_pointer_array.c code -- fixed a few minor bugs w.r.t. lowest_free (could have left some unintentional holes in the array) This commit was SVN r3302.
38 строки
743 B
C
38 строки
743 B
C
/*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include "mpi.h"
|
|
#include "mpi/c/bindings.h"
|
|
#include "mpi/f77/fint_2_int.h"
|
|
#include "class/ompi_list.h"
|
|
#include "info/info.h"
|
|
#include "errhandler/errhandler.h"
|
|
#include "communicator/communicator.h"
|
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
|
|
#pragma weak MPI_Info_c2f = PMPI_Info_c2f
|
|
#endif
|
|
|
|
#if OMPI_PROFILING_DEFINES
|
|
#include "mpi/c/profile/defines.h"
|
|
#endif
|
|
|
|
static const char FUNC_NAME[] = "MPI_Info_c2f";
|
|
|
|
|
|
MPI_Fint MPI_Info_c2f(MPI_Info info)
|
|
{
|
|
if (MPI_PARAM_CHECK) {
|
|
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
|
|
|
|
if (NULL == info || ompi_info_is_freed(info)) {
|
|
info = MPI_INFO_NULL;
|
|
}
|
|
}
|
|
|
|
return OMPI_INT_2_FINT(info->i_f_to_c_index);
|
|
}
|