Thomas:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
<br>
</div>Thx Hong. I tried the ex148, but I doesn't work as I have complex<br>
petsc scalars. Instead I tried ex154, where I did the following<br>
modification to be able to compile it<br></blockquote><div><br></div><div>ex148.c only works with real precision:</div><div>#if defined(PETSC_USE_COMPLEX)</div><div>  SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_SUP, "This example requires real numbers");</div>
<div>#endif</div><div><br></div><div>As you see, these examples were written last summer,</div><div>and have not been checked/tested with FFTW since then, therefore</div><div>messy and buggy. I'll check what you reported below</div>
<div>and get back to you soon.</div><div><br></div><div>Thanks for reporting the problems,</div><div><br></div><div>Hong </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<br>
 hg diff<br>
diff -r b800705fa966 src/mat/examples/tests/ex154.c<br>
--- a/src/mat/examples/tests/ex154.c    Tue Jul 10 21:23:47 2012 -0500<br>
+++ b/src/mat/examples/tests/ex154.c    Wed Jul 11 11:06:03 2012 +0200<br>
@@ -46,7 +46,7 @@<br>
   ierr = VecGetSize(input,&vsize);CHKERRQ(ierr);<br>
   printf("The vector size of output from the main routine is %d\n",vsize);<br>
<br>
-  ierr = InputTransformFFT(A,input,x);CHKERRQ(ierr);<br>
+  ierr = VecScatterPetscToFFTW(A,input,x);CHKERRQ(ierr);<br>
 //  ierr = VecAssemblyBegin(x);CHKERRQ(ierr);<br>
 //  ierr = VecAssemblyEnd(x);CHKERRQ(ierr);<br>
 //  ierr = VecView(x,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);<br>
@@ -54,7 +54,9 @@<br>
   ierr = MatMult(A,x,y);CHKERRQ(ierr);<br>
   ierr = MatMultTranspose(A,y,z);CHKERRQ(ierr);<br>
<br>
-  ierr = OutputTransformFFT(A,z,output);CHKERRQ(ierr);<br>
+  ierr = VecScatterFFTWToPetsc(A,z,output);CHKERRQ(ierr);<br>
+<br>
+  /* Check accuracy */<br>
   fac = 1.0/(PetscReal)N;<br>
   ierr = VecScale(output,fac);CHKERRQ(ierr);<br>
<br>
Running this program with a single node (mpirun -n 1 ex154) works but<br>
with multiple (mpirun -n 2 ex154) I get a segfault<br>
<a href="http://pastie.tk/view.php?id=29C95711" target="_blank">http://pastie.tk/view.php?id=29C95711</a><br>
<br>
ex143 with -use_FFTW_interface YES and-use_FFTW_interface NO  works<br>
for both single and multiple nodes. ex145 only for more than one node<br>
(as expected).<br>
<br>
Regards<br>
<span class="HOEnZb"><font color="#888888">Thomas<br>
</font></span></blockquote></div><br>