[petsc-dev] Detecting MPI_C_DOUBLE_COMPLEX when clanguage!='C'

Jack Poulson jack.poulson at gmail.com
Tue Apr 24 09:02:35 CDT 2012


On Tue, Apr 24, 2012 at 7:19 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Tue, Apr 24, 2012 at 07:15, Matthew Knepley <knepley at gmail.com> wrote:
>
>> Of course don't fix it. Who do these guys work for, Sandia?
>
>
> They could fix it as an extension in MPICH2, but it would have to be added
> to the standard for us to rely on it. Considering that we still can't use
> anything past MPI-1.1, we won't be able to remove the hacks for a long
> time. This is not to say that it isn't worth fixing, just that your
> daughter will be in college by the time the fix can be assumed by callers.
>

Why not just cast the std::complex<double>* buffer into a a double* buffer
of twice the length and use MPI_SUM for the MPI_DOUBLE datatype? I have
always found MPI's support for complex datatypes to be hopelessly buggy, so
I play these tricks whenever possible. Is this what PETSc currently does
for complex MPI_SUM?

Jack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120424/d3114877/attachment.html>


More information about the petsc-dev mailing list