1
1

Fix a few more bugs with fortran collectives.

This commit was SVN r2895.
Этот коммит содержится в:
Jeff Squyres 2004-09-30 18:03:30 +00:00
родитель 1b80a6325b
Коммит ffea11f88e
3 изменённых файлов: 6 добавлений и 4 удалений

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

@ -7,6 +7,7 @@
#include <stdio.h>
#include "mpi.h"
#include "op/op.h"
#include "mpi/f77/bindings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
@ -54,6 +55,7 @@ void mpi_op_create_f(MPI_Fint *function, MPI_Fint *commute,
*ierr = OMPI_INT_2_FINT(MPI_Op_create((MPI_User_function *)function,
OMPI_FINT_2_INT(*commute),
&c_op));
c_op->o_flags |= OMPI_OP_FLAGS_FORTRAN_FUNC;
*op = MPI_Op_c2f(c_op);
}

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

@ -422,7 +422,7 @@ static inline bool ompi_op_is_commute(ompi_op_t *op)
static inline void ompi_op_reduce(ompi_op_t *op, void *source, void *target,
int count, ompi_datatype_t *dtype)
{
MPI_Fint fint = (MPI_Fint) dtype->id;
MPI_Fint fint = (MPI_Fint) dtype->d_f_to_c_index;
/*
* Call the reduction function. Two dimensions: a) if both the op

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

@ -70,7 +70,7 @@
int i; \
ompi_op_predefined_##type_name##_t *a = (ompi_op_predefined_##type_name##_t*) in; \
ompi_op_predefined_##type_name##_t *b = (ompi_op_predefined_##type_name##_t*) out; \
for (i = 0; i < *count; ++i, a++, b++ ) { \
for (i = 0; i < *count; ++i, ++a, ++b) { \
if (a->v op b->v) { \
b->v = a->v; \
b->k = a->k; \
@ -151,7 +151,7 @@ void ompi_mpi_op_sum_fortran_complex(void *in, void *out, int *count,
int i;
ompi_fortran_complex_t *a = (ompi_fortran_complex_t*) in;
ompi_fortran_complex_t *b = (ompi_fortran_complex_t*) out;
for (i = 0; i < *count; ++i) {
for (i = 0; i < *count; ++i, ++b, ++a) {
b->real += a->real;
b->imag += a->imag;
}
@ -184,7 +184,7 @@ void ompi_mpi_op_prod_fortran_complex(void *in, void *out, int *count,
ompi_fortran_complex_t *a = (ompi_fortran_complex_t*) in;
ompi_fortran_complex_t *b = (ompi_fortran_complex_t*) out;
ompi_fortran_complex_t temp;
for (i = 0; i < *count; ++i) {
for (i = 0; i < *count; ++i, ++a, ++b) {
temp.real = a->real * b->real - a->imag * b->imag;
temp.imag = a->imag * b->real + a->real * b->imag;
*b = temp;