<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Dear Matt,<br>
I cannot rewrite this example using the MatCreateFFT calls because
it is not clear to me which is the shape and the ordering of the
vectors produced by MatScatterPetscToFFTW. Furthermore, if I
understand correctly this function returns the c2r / r2c Fourier
transforms, and not the c2c transforms (unless PETSc is configured
for complex data).<br>
However, I have rewritten the example using FFTW instead of PFFT
(attached), and it runs fine both in serial and in parallel (with
a cpu count that should be a power of two). However, I prefer
using PFFT over FFTW, so if somebody has comments on this library,
it would be great to know.<br>
Thank you,<br>
Giuseppe<br>
<br>
<br>
<br>
<br>
On 11/23/2015 03:09 PM, Matthew Knepley wrote:<br>
</div>
<blockquote
cite="mid:CAMYG4GnjyV7jXHPvfN+y4ux6YYGdPiDhhAyDAG+5BJwRefXTCQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Mon, Nov 23, 2015 at 1:31 AM,
Giuseppe Pitton <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:gpitton@sissa.it"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:gpitton@sissa.it">gpitton@sissa.it</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear
users and developers,<br>
I am trying to interface PETSc with the parallel fast
Fourier transform library PFFT (<a moz-do-not-send="true"
href="https://www-user.tu-chemnitz.de/%7Epotts/workgroup/pippig/software.php.en"
rel="noreferrer" target="_blank">https://www-user.tu-chemnitz.de/~potts/workgroup/pippig/software.php.en</a>),
based in turn on FFTW. My plan is to build a spectral
differentiation code, and in the attached files you can
see a simple example.<br>
</blockquote>
<div><br>
</div>
<div>Is it possible to write this example using the existing
calls?</div>
<div><br>
</div>
<div> <a moz-do-not-send="true"
href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateFFT.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateFFT.html</a></div>
<div><br>
</div>
<div>That way we would have a baseline we could both run
that works, and then we could look</div>
<div>at something broken.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The
code works correctly in serial, but in parallel there are
some problems regarding the output of the results, I think
due to some differences in the way PETSc and PFFT store
data, but I'm not sure if this is really the issue.<br>
In the attached code, the number of processors used should
be specified at compile time in the variable "ncpus". As
long as ncpus = 1, everything works fine, but if ncpus = 2
or an higher power of 2, the code terminates correctly but
the results show some artifacts, as you can see from the
generated hdf5 file, named "output-pfft.h5".<br>
In the makefile the variables PFFTINC, PFFTLIB, FFTWINC
and FFTWLIB should be set correctly.<br>
Thank you,<br>
Giuseppe<br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">What most experimenters take for
granted before they begin their experiments is infinitely
more interesting than any results to which their experiments
lead.<br>
-- Norbert Wiener</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>