* Fix some comments to update to the new Fortran binding directory
structure * Minor optimization: if MPI_Test returns flags==.FALSE., don't copy over the request/status to the OUT variables * Update comments about .TRUE./.FALSE. compiler values This commit was SVN r27041.
Этот коммит содержится в:
родитель
4e3b02e836
Коммит
0ef6782b0b
@ -88,7 +88,7 @@ void ompi_get_processor_name_f(char *name, MPI_Fint *resultlen, MPI_Fint *ierr,
|
||||
OMPI_SINGLE_INT_2_FINT(resultlen);
|
||||
|
||||
/* Use the full length of the Fortran string, not *resultlen.
|
||||
See comment in ompi/mpi/f77/strings.c. */
|
||||
See comment in ompi/mpi/fortran/base/strings.c. */
|
||||
if (OMPI_SUCCESS != (ret = ompi_fortran_string_c2f(c_name, name,
|
||||
name_len))) {
|
||||
ierr_c = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME);
|
||||
|
@ -70,8 +70,8 @@ void ompi_op_create_f(ompi_op_fortran_handler_fn_t* function, ompi_fortran_logic
|
||||
int c_ierr;
|
||||
MPI_Op c_op;
|
||||
|
||||
/* See the note in src/mpi/f77/prototypes_mpi.h about the use of
|
||||
(void*) for function pointers in this function */
|
||||
/* See the note in src/mpi/fortran/mpif-h/prototypes_mpi.h about
|
||||
the use of (void*) for function pointers in this function */
|
||||
|
||||
c_ierr = MPI_Op_create((MPI_User_function *) function,
|
||||
OMPI_LOGICAL_2_INT(*commute),
|
||||
|
@ -80,7 +80,10 @@ void ompi_test_f(MPI_Fint *request, ompi_fortran_logical_t *flag,
|
||||
|
||||
OMPI_SINGLE_INT_2_LOGICAL(flag);
|
||||
|
||||
if (MPI_SUCCESS == c_ierr) {
|
||||
/* Note that all Fortran compilers have logical FALSE == 0; we
|
||||
just need to check for any nonzero value (because TRUE is not
|
||||
always 1). */
|
||||
if (MPI_SUCCESS == c_ierr && *flag) {
|
||||
*request = OMPI_INT_2_FINT(c_req->req_f_to_c_index);
|
||||
if (!OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
|
||||
MPI_Status_c2f(&c_status, status);
|
||||
|
@ -96,9 +96,9 @@ void ompi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, ompi_fortran_l
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
OMPI_SINGLE_INT_2_LOGICAL(flag);
|
||||
/*
|
||||
* All Fortran Compilers have FALSE == 0 -- we just need a TRUE value, i.e. *flag != 0
|
||||
*/
|
||||
|
||||
/* All Fortran Compilers have FALSE == 0, so just check for any
|
||||
nonzero value (because TRUE is not always == 1) */
|
||||
if (MPI_SUCCESS == c_ierr && *flag) {
|
||||
for (i = 0; i < OMPI_FINT_2_INT(*count); ++i) {
|
||||
array_of_requests[i] = c_req[i]->req_f_to_c_index;
|
||||
|
@ -100,7 +100,9 @@ void ompi_testany_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *indx
|
||||
OMPI_SINGLE_INT_2_LOGICAL(flag);
|
||||
if (MPI_SUCCESS == c_ierr) {
|
||||
|
||||
/* Increment index by one for fortran conventions */
|
||||
/* Increment index by one for fortran conventions. Note that
|
||||
all Fortran compilers have FALSE==0; we just need to check
|
||||
for any nonzero value (because TRUE is not always 1) */
|
||||
|
||||
OMPI_SINGLE_INT_2_FINT(indx);
|
||||
if (*flag &&
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user