Thomas:
Thx Hong. I tried the ex148, but I doesn't work as I have complex
petsc scalars. Instead I tried ex154, where I did the following
modification to be able to compile it
hg diff
diff -r b800705fa966 src/mat/examples/tests/ex154.c
--- a/src/mat/examples/tests/ex154.c Tue Jul 10 21:23:47 2012 -0500
+++ b/src/mat/examples/tests/ex154.c Wed Jul 11 11:06:03 2012 +0200
@@ -46,7 +46,7 @@
ierr = VecGetSize(input,&vsize);CHKERRQ(ierr);
printf("The vector size of output from the main routine is %d\n",vsize);
- ierr = InputTransformFFT(A,input,x);CHKERRQ(ierr);
+ ierr = VecScatterPetscToFFTW(A,input,x);CHKERRQ(ierr);
// ierr = VecAssemblyBegin(x);CHKERRQ(ierr);
// ierr = VecAssemblyEnd(x);CHKERRQ(ierr);
// ierr = VecView(x,PETSC_VIEWER_STDOUT_WORLD);CHKERRQ(ierr);
@@ -54,7 +54,9 @@
ierr = MatMult(A,x,y);CHKERRQ(ierr);
ierr = MatMultTranspose(A,y,z);CHKERRQ(ierr);
- ierr = OutputTransformFFT(A,z,output);CHKERRQ(ierr);
+ ierr = VecScatterFFTWToPetsc(A,z,output);CHKERRQ(ierr);
+
+ /* Check accuracy */
fac = 1.0/(PetscReal)N;
ierr = VecScale(output,fac);CHKERRQ(ierr);
Running this program with a single node (mpirun -n 1 ex154) works but
with multiple (mpirun -n 2 ex154) I get a segfault
http://pastie.tk/view.php?id=29C95711
ex143 with -use_FFTW_interface YES and-use_FFTW_interface NO works
for both single and multiple nodes. ex145 only for more than one node
(as expected).
Regards
Thomas