title: FFTW3 1D transform with MPI is slow
body: <p>I'm testing FFTW 1D c2c transform using MPI. 
  After compiling and running the 2D example on FFTW3 tutorial I have seen that with 8 nodes execution is 2x faster than using only one node(using large size like 4096x4096). </p>
  
  <p>So I modified this example for 1D but something goes wrong becouse I see this timing :</p>
  
  <pre><code>1 node  = 0.763668 s
  2 nodes = 1.540884 s
  4 nodes = 1.336446 s
  8 nodes = 0.851646 s
  </code></pre>
  
  <p>My code :</p>
  
  <pre><code>    #include &lt;fftw3-mpi.h&gt;
      # include &lt;stdlib.h&gt;
      # include &lt;stdio.h&gt;
      #include &lt;sys/stat.h&gt;
      #include &lt;fcntl.h&gt;
      # include &lt;time.h&gt;
      #include &lt;math.h&gt;
  
      int main(int argc, char **argv)
      {
         //const ptrdiff_t N0 = 4096;
         const ptrdiff_t N0 = 4194304 ;
         //const ptrdiff_t N0 = 8388608;
         fftw_plan planForw,planBack;
         fftw_complex *data,*dataOut,*data2;
         ptrdiff_t alloc_local, local_ni, local_i_start, i, j,local_no, local_o_start;
         int index,size;
         double startwtime, endwtime;
         MPI_Init(&amp;argc, &amp;argv);
         fftw_mpi_init();
         MPI_Comm_rank(MPI_COMM_WORLD,&amp;index);
         MPI_Comm_size(MPI_COMM_WORLD,&amp;size);
  
         /* get local data size and allocate */
         alloc_local = fftw_mpi_local_size_1d(N0, MPI_COMM_WORLD,FFTW_FORWARD, FFTW_ESTIMATE,
                                                    &amp;local_ni, &amp;local_i_start,&amp;local_no, &amp;local_o_start);
         data = fftw_alloc_complex(alloc_local);
         dataOut = fftw_alloc_complex(alloc_local);
         data2 = fftw_alloc_complex(alloc_local);
               /* create plan  */
         planForw = fftw_mpi_plan_dft_1d(N0, data, data2, MPI_COMM_WORLD,
                                           FFTW_FORWARD, FFTW_ESTIMATE);
         planBack = fftw_mpi_plan_dft_1d(N0, data2, dataOut, MPI_COMM_WORLD,
                                           FFTW_BACKWARD, FFTW_ESTIMATE);
         /* initialize data to some function my_function(x,y) */
         for (i = 0; i &lt; local_ni; ++i) 
         {
          data[i][0] =rand() / (double)RAND_MAX;
          data[i][1] =rand() / (double)RAND_MAX;
         }
         if(index==0){
          startwtime = MPI_Wtime();
  
          }
  
          fftw_execute(planForw);
          fftw_execute(planBack);
          if(index==0){
          endwtime = MPI_Wtime();
              printf("wall clock time = %f\n",
                             endwtime-startwtime);
  
  
         }
  
               fftw_destroy_plan(planForw);
           fftw_destroy_plan(planBack);
               MPI_Finalize();
  }
  </code></pre>