Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
a22df6f0
Commit
a22df6f0
authored
Mar 08, 2011
by
William Gropp
Browse files
[svn-r8164] Fixes for Fortran support of int not the same as MPI_Fint when --disable-cxx used
parent
c73de10d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mpi/coll/allreduce.c
View file @
a22df6f0
...
...
@@ -366,9 +366,23 @@ int MPIR_Allreduce_intra (
datatype
,
uop
);
}
else
else
{
#endif
#if defined(HAVE_FORTRAN_BINDING) && !defined(HAVE_FINT_IS_INT)
if
(
is_f77_uop
)
{
MPI_Fint
lcount
=
(
MPI_Fint
)
count
;
MPI_Fint
ldtype
=
(
MPI_Fint
)
datatype
;
(
*
uop
)(
tmp_buf
,
recvbuf
,
&
lcount
,
&
ldtype
);
}
else
{
(
*
uop
)(
tmp_buf
,
recvbuf
,
&
count
,
&
datatype
);
}
#else
(
*
uop
)(
tmp_buf
,
recvbuf
,
&
count
,
&
datatype
);
#endif
#ifdef HAVE_CXX_BINDING
}
#endif
/* change the rank */
newrank
=
rank
/
2
;
...
...
@@ -422,9 +436,24 @@ int MPIR_Allreduce_intra (
datatype
,
uop
);
}
else
else
{
#endif
#if defined(HAVE_FORTRAN_BINDING) && !defined(HAVE_FINT_IS_INT)
if
(
is_f77_uop
)
{
MPI_Fint
lcount
=
(
MPI_Fint
)
count
;
MPI_Fint
ldtype
=
(
MPI_Fint
)
datatype
;
(
*
uop
)(
tmp_buf
,
recvbuf
,
&
lcount
,
&
ldtype
);
}
else
{
(
*
uop
)(
tmp_buf
,
recvbuf
,
&
count
,
&
datatype
);
}
#else
(
*
uop
)(
tmp_buf
,
recvbuf
,
&
count
,
&
datatype
);
#endif
#ifdef HAVE_CXX_BINDING
}
#endif
}
else
{
/* op is noncommutative and the order is not right */
...
...
@@ -435,9 +464,23 @@ int MPIR_Allreduce_intra (
datatype
,
uop
);
}
else
else
{
#endif
#if defined(HAVE_FORTRAN_BINDING) && !defined(HAVE_FINT_IS_INT)
if
(
is_f77_uop
)
{
MPI_Fint
lcount
=
(
MPI_Fint
)
count
;
MPI_Fint
ldtype
=
(
MPI_Fint
)
datatype
;
(
*
uop
)(
recvbuf
,
tmp_buf
,
&
lcount
,
&
ldtype
);
}
else
{
(
*
uop
)(
recvbuf
,
tmp_buf
,
&
count
,
&
datatype
);
}
#else
(
*
uop
)(
recvbuf
,
tmp_buf
,
&
count
,
&
datatype
);
#endif
#ifdef HAVE_CXX_BINDING
}
#endif
/* copy result back into recvbuf */
mpi_errno
=
MPIR_Localcopy
(
tmp_buf
,
count
,
datatype
,
...
...
src/mpi/coll/reduce.c
View file @
a22df6f0
...
...
@@ -207,7 +207,9 @@ static int MPIR_Reduce_binomial (
#else
(
*
uop
)(
tmp_buf
,
recvbuf
,
&
count
,
&
datatype
);
#endif
#ifdef HAVE_CXX_BINDING
}
#endif
}
else
{
#ifdef HAVE_CXX_BINDING
...
...
@@ -231,7 +233,9 @@ static int MPIR_Reduce_binomial (
#else
(
*
uop
)(
recvbuf
,
tmp_buf
,
&
count
,
&
datatype
);
#endif
#ifdef HAVE_CXX_BINDING
}
#endif
mpi_errno
=
MPIR_Localcopy
(
tmp_buf
,
count
,
datatype
,
recvbuf
,
count
,
datatype
);
if
(
mpi_errno
)
{
MPIU_ERR_POP
(
mpi_errno
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment