Commits

Hong Zhang committed c3eba89

small fix for real build; update fftw.py

Comments (0)

Files changed (3)

config/PETSc/packages/fftw.py

   def __init__(self, framework):
     PETSc.package.NewPackage.__init__(self, framework)
     # host locally as fftw.org url can expire after new release.
-    self.download  = ['http://ftp.mcs.anl.gov/pub/petsc/externalpackages/fftw-3.3.2.tar.gz','http://www.fftw.org/fftw-3.3.2.tar.gz']
+    self.download  = ['http://www.fftw.org/fftw-3.3.3.tar.gz',
+                      'http://ftp.mcs.anl.gov/pub/petsc/externalpackages/fftw-3.3.3.tar.gz']
     self.functions = ['fftw_malloc']
     self.includes  = ['fftw3-mpi.h']
     self.liblist   = [['libfftw3_mpi.a','libfftw3.a']]

src/mat/examples/tests/ex144.c

   double          *in1,*in2;
   ptrdiff_t       alloc_local,local_n0,local_0_start;
   ptrdiff_t       local_n1,local_1_start;
-  PetscInt        i,j,n1;
+  PetscInt        i,j;
   PetscInt        size,rank,n,N,N_factor,NM;
   PetscScalar     one=2.0,zero=0.5;
   PetscScalar     two=4.0,three=8.0,four=16.0;
   N        = 2*N0*(N1/2+1);
   N_factor = N0*N1;
   n        = 2*local_n0*(N1/2+1); 
-  n1       = local_n1*N0*2;
 
 /*    printf("The value N is  %d from process %d\n",N,rank);  */
 /*    printf("The value n is  %d from process %d\n",n,rank);  */

src/mat/impls/fft/fftw/fftw.c

       ierr = ISDestroy(&list1);CHKERRQ(ierr);
       ierr = ISDestroy(&list2);CHKERRQ(ierr);
 #else
-      alloc_local =  fftw_mpi_local_size_2d_transposed(dim[0],dim[1]/2+1,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
+      fftw_mpi_local_size_2d_transposed(dim[0],dim[1]/2+1,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
 
       N1   = 2*dim[0]*(dim[1]/2+1); n1 = 2*local_n0*(dim[1]/2+1);
       ierr = PetscMalloc(sizeof(PetscInt)*((PetscInt)local_n0)*dim[1],&indx1);CHKERRQ(ierr);
 
       (fftw->dim_fftw)[fftw->ndim_fftw-1] = temp/2 + 1;
 
-      alloc_local = fftw_mpi_local_size_transposed(fftw->ndim_fftw,fftw->dim_fftw,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
+      fftw_mpi_local_size_transposed(fftw->ndim_fftw,fftw->dim_fftw,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
 
       N1 = 2*N*(PetscInt)((fftw->dim_fftw)[fftw->ndim_fftw-1])/((PetscInt) temp);
 
       n    = (PetscInt)local_n0*dim[1];
       ierr = MatSetSizes(A,n,n,N,N);CHKERRQ(ierr);
 #else
-      alloc_local = fftw_mpi_local_size_2d_transposed(dim[0],dim[1]/2+1,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
+      fftw_mpi_local_size_2d_transposed(dim[0],dim[1]/2+1,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
 
       n    = 2*(PetscInt)local_n0*(dim[1]/2+1);
       ierr = MatSetSizes(A,n,n,2*dim[0]*(dim[1]/2+1),2*dim[0]*(dim[1]/2+1));
       n    = (PetscInt)local_n0*dim[1]*dim[2];
       ierr = MatSetSizes(A,n,n,N,N);CHKERRQ(ierr);
 #else
-      alloc_local = fftw_mpi_local_size_3d_transposed(dim[0],dim[1],dim[2]/2+1,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
+      fftw_mpi_local_size_3d_transposed(dim[0],dim[1],dim[2]/2+1,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
 
       n   = 2*(PetscInt)local_n0*dim[1]*(dim[2]/2+1);
       ierr = MatSetSizes(A,n,n,2*dim[0]*dim[1]*(dim[2]/2+1),2*dim[0]*dim[1]*(dim[2]/2+1));
 
       pdim[ndim-1] = temp/2 + 1;
 
-      alloc_local = fftw_mpi_local_size_transposed(ndim,pdim,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
+      fftw_mpi_local_size_transposed(ndim,pdim,comm,&local_n0,&local_0_start,&local_n1,&local_1_start);
 
       n  = 2*(PetscInt)local_n0*partial_dim*pdim[ndim-1]/temp;
       N1 = 2*N*(PetscInt)pdim[ndim-1]/((PetscInt) temp);