linearalgebra and fft: clean up -Wunused-parameter warnings
authorAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Mon, 1 Jul 2013 04:20:01 +0000 (08:20 +0400)
committerAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Thu, 18 Jul 2013 09:50:01 +0000 (13:50 +0400)
Clean up (most) of unused params

Change-Id: Iaad4b2d1a98584d6d72cdd1ecf43b788d9753715
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
12 files changed:
src/gromacs/fft/fft5d.cpp
src/gromacs/fft/parallel_3dfft.c
src/gromacs/fft/parallel_3dfft.h
src/gromacs/fft/tests/fft.cpp
src/gromacs/linearalgebra/gmx_arpack.c
src/gromacs/linearalgebra/gmx_lapack/dorml2.c
src/gromacs/linearalgebra/gmx_lapack/dsytd2.c
src/gromacs/linearalgebra/gmx_lapack/sorml2.c
src/gromacs/linearalgebra/gmx_lapack/ssytd2.c
src/gromacs/linearalgebra/matrix.c
src/gromacs/linearalgebra/matrix.h
src/gromacs/mdlib/pme.c

index 368a4ac34e45199b7080becd70a74d960c1be4dd..05d735e13daaf68ec13a0708c729df775be489e3 100644 (file)
@@ -686,7 +686,7 @@ enum order {
    pN, pM, pK is local size specific to current processor (only different to max if not divisible)
    NG, MG, KG is size of global data*/
 static void splitaxes(t_complex* lout, const t_complex* lin,
-                      int maxN, int maxM, int maxK, int pN, int pM, int pK,
+                      int maxN, int maxM, int maxK, int pM,
                       int P, int NG, int *N, int* oN, int starty, int startz, int endy, int endz)
 {
     int x, y, z, i;
@@ -740,7 +740,7 @@ static void splitaxes(t_complex* lout, const t_complex* lin,
    N,M,K local dimensions
    KG global size*/
 static void joinAxesTrans13(t_complex* lout, const t_complex* lin,
-                            int maxN, int maxM, int maxK, int pN, int pM, int pK,
+                            int maxN, int maxM, int maxK, int pM,
                             int P, int KG, int* K, int* oK, int starty, int startx, int endy, int endx)
 {
     int i, x, y, z;
@@ -792,7 +792,7 @@ static void joinAxesTrans13(t_complex* lout, const t_complex* lin,
    the minor, middle, major order is only correct for x,y,z (N,M,K) for the input
    N,M,K local size
    MG, global size*/
-static void joinAxesTrans12(t_complex* lout, const t_complex* lin, int maxN, int maxM, int maxK, int pN, int pM, int pK,
+static void joinAxesTrans12(t_complex* lout, const t_complex* lin, int maxN, int maxM, int maxK, int pN,
                             int P, int MG, int* M, int* oM, int startx, int startz, int endx, int endz)
 {
     int i, z, y, x;
@@ -1088,7 +1088,7 @@ void fft5d_execute(fft5d_plan plan, int thread, fft5d_time times)
             {
                 tend    = ((thread+1)*pM[s]*pK[s]/plan->nthreads);
                 tstart /= C[s];
-                splitaxes(lout2, lout, N[s], M[s], K[s], pN[s], pM[s], pK[s], P[s], C[s], iNout[s], oNout[s], tstart%pM[s], tstart/pM[s], tend%pM[s], tend/pM[s]);
+                splitaxes(lout2, lout, N[s], M[s], K[s], pM[s], P[s], C[s], iNout[s], oNout[s], tstart%pM[s], tstart/pM[s], tend%pM[s], tend/pM[s]);
             }
 #pragma omp barrier /*barrier required before AllToAll (all input has to be their) - before timing to make timing more acurate*/
 #ifdef NOGMX
@@ -1167,7 +1167,7 @@ void fft5d_execute(fft5d_plan plan, int thread, fft5d_time times)
             {
                 tstart = ( thread   *pM[s]*pN[s]/plan->nthreads);
                 tend   = ((thread+1)*pM[s]*pN[s]/plan->nthreads);
-                joinAxesTrans13(lin, joinin, N[s], pM[s], K[s], pN[s], pM[s], pK[s], P[s], C[s+1], iNin[s+1], oNin[s+1], tstart%pM[s], tstart/pM[s], tend%pM[s], tend/pM[s]);
+                joinAxesTrans13(lin, joinin, N[s], pM[s], K[s], pM[s], P[s], C[s+1], iNin[s+1], oNin[s+1], tstart%pM[s], tstart/pM[s], tend%pM[s], tend/pM[s]);
             }
         }
         else
@@ -1176,7 +1176,7 @@ void fft5d_execute(fft5d_plan plan, int thread, fft5d_time times)
             {
                 tstart = ( thread   *pK[s]*pN[s]/plan->nthreads);
                 tend   = ((thread+1)*pK[s]*pN[s]/plan->nthreads);
-                joinAxesTrans12(lin, joinin, N[s], M[s], pK[s], pN[s], pM[s], pK[s], P[s], C[s+1], iNin[s+1], oNin[s+1], tstart%pN[s], tstart/pN[s], tend%pN[s], tend/pN[s]);
+                joinAxesTrans12(lin, joinin, N[s], M[s], pK[s], pN[s], P[s], C[s+1], iNin[s+1], oNin[s+1], tstart%pN[s], tstart/pN[s], tend%pN[s], tend/pN[s]);
             }
         }
 
index 77f7975648c8279e541c27cc8014652f9ee309cd..8042ebecce255664fe68d8dcfa62534cea21f410 100644 (file)
@@ -43,8 +43,6 @@ gmx_parallel_3dfft_init   (gmx_parallel_3dfft_t     *    pfft_setup,
                            real     **                   real_data,
                            t_complex     **              complex_data,
                            MPI_Comm                      comm[2],
-                           int     *                     slab2index_major,
-                           int     *                     slab2index_minor,
                            gmx_bool                      bReproducible,
                            int                           nthreads)
 {
@@ -152,8 +150,6 @@ gmx_parallel_3dfft_complex_limits(gmx_parallel_3dfft_t      pfft_setup,
 int
 gmx_parallel_3dfft_execute(gmx_parallel_3dfft_t    pfft_setup,
                            enum gmx_fft_direction  dir,
-                           void *                  in_data,
-                           void *                  out_data,
                            int                     thread,
                            gmx_wallcycle_t         wcycle)
 {
index c5b91d61433996f393bf754a730f041ced37c519..0c1fa0375a55ae5c3d8956f58e7337ec49f1b8bd 100644 (file)
@@ -51,8 +51,6 @@ typedef struct gmx_parallel_3dfft *
  *  \param comm           MPI communicator for both parallelization axis.
  *                        Needs to be either initialized or MPI_NULL for
  *                        no parallelization in that axis.
- *  \param slab2index_major Not used
- *  \param slab2index_minor Not used
  *  \param bReproducible  Try to avoid FFT timing optimizations and other stuff
  *                        that could make results differ for two runs with
  *                        identical input (reproducibility for debugging).
@@ -66,8 +64,6 @@ int
                                real **real_data,
                                t_complex **complex_data,
                                MPI_Comm                  comm[2],
-                               int *                     slab2index_major,
-                               int *                     slab2index_minor,
                                gmx_bool                  bReproducible,
                                int                       nthreads);
 
@@ -97,8 +93,6 @@ gmx_parallel_3dfft_complex_limits(gmx_parallel_3dfft_t      pfft_setup,
 int
 gmx_parallel_3dfft_execute(gmx_parallel_3dfft_t    pfft_setup,
                            enum gmx_fft_direction  dir,
-                           void *                  in_data,
-                           void *                  out_data,
                            int                     thread,
                            gmx_wallcycle_t         wcycle);
 
index cd1fc323cd027d989fa2bb2fbb0d9b39334718c8..ff83aa6dec8160f9c78cb0668782ba1f03745f31 100644 (file)
@@ -252,7 +252,7 @@ TEST_F(FFFTest3D, Real5_6_9)
     ivec       local_ndata, offset, rsize, csize, complex_order;
 
     gmx_parallel_3dfft_init(&fft_, ndata, &rdata, &cdata,
-                            comm, NULL, NULL, TRUE, 1);
+                            comm, TRUE, 1);
 
     gmx_parallel_3dfft_real_limits(fft_, local_ndata, offset, rsize);
     gmx_parallel_3dfft_complex_limits(fft_, complex_order,
@@ -262,15 +262,13 @@ TEST_F(FFFTest3D, Real5_6_9)
     int size = csize[0]*csize[1]*csize[2];
 
     memcpy(rdata, inputdata, size*sizeof(t_complex));
-    gmx_parallel_3dfft_execute(fft_, GMX_FFT_REAL_TO_COMPLEX, rdata, cdata,
-                               0, NULL);
+    gmx_parallel_3dfft_execute(fft_, GMX_FFT_REAL_TO_COMPLEX, 0, NULL);
     //TODO use std::complex and add checkComplex for it
     checker_.checkSequenceArray(size*2,
                                 reinterpret_cast<real*>(cdata), "forward");
 
     memcpy(cdata, inputdata, size*sizeof(t_complex));
-    gmx_parallel_3dfft_execute(fft_, GMX_FFT_COMPLEX_TO_REAL, rdata, cdata,
-                               0, NULL);
+    gmx_parallel_3dfft_execute(fft_, GMX_FFT_COMPLEX_TO_REAL, 0, NULL);
     for (int i = 0; i < ndata[0]*ndata[1]; i++) //check sequence but skip unused data
     {
         checker_.checkSequenceArray(ndata[2], rdata+i*rsize[2],
index 746398e5facfd6bfc5321eb4906f37b52ad98d18..2e187a5c1210a83d02297fa626859d7f04b1fa3a 100644 (file)
@@ -508,7 +508,7 @@ L190:
 static void
 F77_FUNC(dgetv0, DGETV0) (int *     ido,
                           const char *    bmat,
-                          int *     itry,
+                          int gmx_unused *     itry,
                           int *     initv,
                           int *     n,
                           int *     j,
@@ -1812,7 +1812,7 @@ F77_FUNC(dsaup2, DSAUP2) (int *     ido,
                           double *  tol,
                           double *  resid,
                           int *     mode,
-                          int *     iupd,
+                          int gmx_unused *     iupd,
                           int *     ishift,
                           int *     mxiter,
                           double *  v,
@@ -3377,7 +3377,7 @@ L190:
 static void
 F77_FUNC(sgetv0, SGETV0) (int *     ido,
                           const char *    bmat,
-                          int *     itry,
+                          int gmx_unused *     itry,
                           int *     initv,
                           int *     n,
                           int *     j,
@@ -4681,7 +4681,7 @@ F77_FUNC(ssaup2, SSAUP2) (int *     ido,
                           float *  tol,
                           float *  resid,
                           int *     mode,
-                          int *     iupd,
+                          int gmx_unused *     iupd,
                           int *     ishift,
                           int *     mxiter,
                           float *  v,
index f04cb41fc4e0c187d7267c84030c56ee699476ce..684dc24bbb85b8d6da547e90898d9f6f40de9ec9 100644 (file)
@@ -1,5 +1,6 @@
 #include <ctype.h>
 #include "../gmx_lapack.h"
+#include <types/simple.h>
 
 void
 F77_FUNC(dorml2,DORML2)(const char *side,
@@ -13,7 +14,7 @@ F77_FUNC(dorml2,DORML2)(const char *side,
        double *c,
        int *ldc,
        double *work,
-       int *info)
+    int gmx_unused *info)
 {
   const char xside=toupper(*side);
   const char xtrans=toupper(*trans);
index 4cbd160b8bbac3f7aa53722c6ecb86268180b55f..3a527347f779834dac8deca3b929b3f6bb28ff8c 100644 (file)
@@ -14,7 +14,7 @@ F77_FUNC(dsytd2,DSYTD2)(const char *    uplo,
        double *  d,
        double *  e,
        double *  tau,
-       int *     info)
+    int gmx_unused *     info)
 {
   double minusone,zero;
   double taui,alpha,tmp;
index 00e6614139fc9dccb6ce74524f461f07d33f1014..a9b3d965c773b2f86284e7847eac2a41eac1b000 100644 (file)
@@ -1,4 +1,5 @@
 #include <ctype.h>
+#include <types/simple.h>
 #include "../gmx_lapack.h"
 
 void
@@ -13,7 +14,7 @@ F77_FUNC(sorml2,SORML2)(const char *side,
                         float *c,
                         int *ldc,
                         float *work,
-                        int *info)
+                        int gmx_unused *info)
 {
   const char xside=toupper(*side);
   const char xtrans=toupper(*trans);
index d485fa16dbeba955f6c27a94fd9ca198e962ce6a..f6c6f122fbc0946d6779d8287f9d0c7402755e57 100644 (file)
@@ -14,7 +14,7 @@ F77_FUNC(ssytd2,SSYTD2)(const char *    uplo,
        float *  d,
        float *  e,
        float *  tau,
-       int *     info)
+    int gmx_unused *     info)
 {
   float minusone,zero;
   float taui,alpha,tmp;
index ba9ffcb40f80fd35c1643756afee9ddc7337663d..8462fc660839680961a49b13507ad5eb5e74d86c 100644 (file)
@@ -62,7 +62,7 @@ double **alloc_matrix(int n, int m)
     return ptr;
 }
 
-void free_matrix(double **a, int n)
+void free_matrix(double **a)
 {
     int i;
 
@@ -178,8 +178,8 @@ int matrix_invert(FILE *fp, int n, double **a)
         id = alloc_matrix(n, n);
         matrix_multiply(fp, n, n, test, a, id);
         dump_matrix(fp, "And here is the product of A and Ainv", n, id);
-        free_matrix(id, n);
-        free_matrix(test, n);
+        free_matrix(id);
+        free_matrix(test);
     }
 #endif
     sfree(ipiv);
@@ -240,9 +240,9 @@ double multi_regression(FILE *fp, int nrow, double *y, int ncol,
     }
 
     sfree(atx);
-    free_matrix(a, nrow);
-    free_matrix(at, ncol);
-    free_matrix(ata, ncol);
+    free_matrix(a);
+    free_matrix(at);
+    free_matrix(ata);
 
     return chi2;
 }
index 2799bd947469d6d3cf37beb764138ccd644717cc..4ce4b1623476b3cfe5000de3e1884579f059a8e0 100644 (file)
@@ -44,7 +44,7 @@ extern "C"
 
 double **alloc_matrix(int n, int m);
 
-void free_matrix(double **a, int n);
+void free_matrix(double **a);
 
 void matrix_multiply(FILE *fp, int n, int m, double **x, double **y, double **z);
 
index bd1a2966e31e961a8d7883a101d7970a4db176b4..52eed9abfa8e56a738f874ebcbe96454bec5ecd9 100644 (file)
@@ -3190,7 +3190,7 @@ int gmx_pme_init(gmx_pme_t *         pmedata,
 
     pme->nthread = nthread;
 
-     /* Check if any of the PME MPI ranks uses threads */
+    /* Check if any of the PME MPI ranks uses threads */
     use_threads = (pme->nthread > 1 ? 1 : 0);
 #ifdef GMX_MPI
     if (pme->nnodes > 1)
@@ -3342,7 +3342,6 @@ int gmx_pme_init(gmx_pme_t *         pmedata,
     gmx_parallel_3dfft_init(&pme->pfft_setupA, ndata,
                             &pme->fftgridA, &pme->cfftgridA,
                             pme->mpi_comm_d,
-                            pme->overlap[0].s2g0, pme->overlap[1].s2g0,
                             bReproducible, pme->nthread);
 
     if (bFreeEnergy)
@@ -3359,7 +3358,6 @@ int gmx_pme_init(gmx_pme_t *         pmedata,
         gmx_parallel_3dfft_init(&pme->pfft_setupB, ndata,
                                 &pme->fftgridB, &pme->cfftgridB,
                                 pme->mpi_comm_d,
-                                pme->overlap[0].s2g0, pme->overlap[1].s2g0,
                                 bReproducible, pme->nthread);
     }
     else
@@ -4489,7 +4487,7 @@ int gmx_pme_do(gmx_pme_t pme,
                     wallcycle_start(wcycle, ewcPME_FFT);
                 }
                 gmx_parallel_3dfft_execute(pfft_setup, GMX_FFT_REAL_TO_COMPLEX,
-                                           fftgrid, cfftgrid, thread, wcycle);
+                                           thread, wcycle);
                 if (thread == 0)
                 {
                     wallcycle_stop(wcycle, ewcPME_FFT);
@@ -4523,7 +4521,7 @@ int gmx_pme_do(gmx_pme_t pme,
                     wallcycle_start(wcycle, ewcPME_FFT);
                 }
                 gmx_parallel_3dfft_execute(pfft_setup, GMX_FFT_COMPLEX_TO_REAL,
-                                           cfftgrid, fftgrid, thread, wcycle);
+                                           thread, wcycle);
                 if (thread == 0)
                 {
                     wallcycle_stop(wcycle, ewcPME_FFT);