From a92d8d59d16437ec4951728711ff2e0f79a74e3a Mon Sep 17 00:00:00 2001 From: Alexey Shvetsov Date: Sun, 30 Jun 2013 01:11:09 +0400 Subject: [PATCH] gmxlib: clean up -Wunused-parameter warnings Clean up (most) of unused params Change-Id: Ibbe8d775ca1c37338f968d124d773808a1784eae Signed-off-by: Alexey Shvetsov --- src/gromacs/gmxana/anadih.c | 2 +- src/gromacs/gmxana/gmx_anaeig.c | 6 +- src/gromacs/gmxana/gmx_bond.c | 2 +- src/gromacs/gmxana/gmx_bundle.c | 2 +- src/gromacs/gmxana/gmx_cluster.c | 4 +- src/gromacs/gmxana/gmx_covar.c | 6 +- src/gromacs/gmxana/gmx_current.c | 2 +- src/gromacs/gmxana/gmx_density.c | 8 +- src/gromacs/gmxana/gmx_densmap.c | 2 +- src/gromacs/gmxana/gmx_densorder.c | 4 +- src/gromacs/gmxana/gmx_dipoles.c | 4 +- src/gromacs/gmxana/gmx_disre.c | 4 +- src/gromacs/gmxana/gmx_dist.c | 4 +- src/gromacs/gmxana/gmx_do_dssp.c | 4 +- src/gromacs/gmxana/gmx_filter.c | 4 +- src/gromacs/gmxana/gmx_genconf.c | 2 +- src/gromacs/gmxana/gmx_gyrate.c | 4 +- src/gromacs/gmxana/gmx_h2order.c | 4 +- src/gromacs/gmxana/gmx_hbond.c | 2 +- src/gromacs/gmxana/gmx_helix.c | 4 +- src/gromacs/gmxana/gmx_helixorient.c | 4 +- src/gromacs/gmxana/gmx_hydorder.c | 6 +- src/gromacs/gmxana/gmx_mdmat.c | 4 +- src/gromacs/gmxana/gmx_mindist.c | 6 +- src/gromacs/gmxana/gmx_msd.c | 4 +- src/gromacs/gmxana/gmx_order.c | 8 +- src/gromacs/gmxana/gmx_polystat.c | 4 +- src/gromacs/gmxana/gmx_potential.c | 4 +- src/gromacs/gmxana/gmx_principal.c | 4 +- src/gromacs/gmxana/gmx_rdf.c | 4 +- src/gromacs/gmxana/gmx_rms.c | 6 +- src/gromacs/gmxana/gmx_rmsdist.c | 2 +- src/gromacs/gmxana/gmx_rmsf.c | 4 +- src/gromacs/gmxana/gmx_rotacf.c | 4 +- src/gromacs/gmxana/gmx_rotmat.c | 8 +- src/gromacs/gmxana/gmx_saltbr.c | 2 +- src/gromacs/gmxana/gmx_sans.c | 4 +- src/gromacs/gmxana/gmx_sas.c | 4 +- src/gromacs/gmxana/gmx_sgangle.c | 16 +- src/gromacs/gmxana/gmx_sorient.c | 4 +- src/gromacs/gmxana/gmx_spatial.c | 2 +- src/gromacs/gmxana/gmx_spol.c | 4 +- src/gromacs/gmxana/gmx_traj.c | 2 +- src/gromacs/gmxana/gmx_trjconv.c | 2 +- src/gromacs/gmxana/gmx_trjorder.c | 4 +- src/gromacs/gmxana/gmx_vanhove.c | 2 +- src/gromacs/gmxana/gmx_xpm2ps.c | 2 +- src/gromacs/gmxlib/bondfree.c | 206 +++++++++--------- src/gromacs/gmxlib/chargegroup.c | 4 +- src/gromacs/gmxlib/checkpoint.c | 54 ++--- src/gromacs/gmxlib/disre.c | 6 +- src/gromacs/gmxlib/ewald_util.c | 3 +- src/gromacs/gmxlib/gmx_detect_hardware.c | 12 +- src/gromacs/gmxlib/gmx_omp_nthreads.c | 2 +- src/gromacs/gmxlib/gmx_thread_affinity.c | 4 +- src/gromacs/gmxlib/gmxfio.c | 5 +- src/gromacs/gmxlib/gmxfio_asc.c | 12 +- src/gromacs/gmxlib/gmxfio_bin.c | 4 +- src/gromacs/gmxlib/gmxfio_int.h | 2 +- src/gromacs/gmxlib/gmxfio_xdr.c | 4 +- src/gromacs/gmxlib/main.c | 2 +- src/gromacs/gmxlib/mshift.c | 4 +- src/gromacs/gmxlib/mtop_util.c | 5 +- src/gromacs/gmxlib/network.c | 6 +- src/gromacs/gmxlib/nrama.c | 4 +- src/gromacs/gmxlib/nrnb.c | 7 +- src/gromacs/gmxlib/orires.c | 6 +- src/gromacs/gmxlib/random.c | 6 +- src/gromacs/gmxlib/readinp.c | 1 - src/gromacs/gmxlib/rmpbc.c | 3 +- src/gromacs/gmxlib/sfactor.c | 4 +- src/gromacs/gmxlib/shift_util.c | 2 +- src/gromacs/gmxlib/smalloc.c | 2 +- src/gromacs/gmxlib/splitter.c | 12 +- src/gromacs/gmxlib/statutil.cpp | 4 +- src/gromacs/gmxlib/symtab.c | 2 +- src/gromacs/gmxlib/tpxio.c | 23 +- src/gromacs/gmxlib/trnio.c | 6 +- src/gromacs/gmxlib/trxio.c | 8 +- src/gromacs/gmxlib/txtdump.c | 23 +- src/gromacs/gmxlib/vmdio.c | 4 +- src/gromacs/gmxlib/vmdio.h | 4 +- src/gromacs/gmxlib/xdrd.c | 2 +- src/gromacs/gmxlib/xtcio.c | 2 +- src/gromacs/gmxpreprocess/readir.c | 2 +- src/gromacs/legacyheaders/coulomb.h | 8 +- .../legacyheaders/gmx_thread_affinity.h | 4 +- src/gromacs/legacyheaders/gpu_utils.h | 24 +- src/gromacs/legacyheaders/nrnb.h | 5 +- src/gromacs/legacyheaders/random.h | 2 +- src/gromacs/legacyheaders/readinp.h | 1 - src/gromacs/legacyheaders/rmpbc.h | 3 +- src/gromacs/legacyheaders/sfactor.h | 2 +- src/gromacs/legacyheaders/statutil.h | 5 +- src/gromacs/legacyheaders/xdrf.h | 2 +- src/gromacs/mdlib/ewald.c | 3 +- src/gromacs/mdlib/force.c | 3 +- src/gromacs/mdlib/forcerec.c | 4 +- src/gromacs/mdlib/sim_util.c | 8 +- src/gromacs/mdlib/tpi.c | 20 +- .../trajectoryanalysis/runnercommon.cpp | 2 +- src/programs/mdrun/gctio.c | 2 +- src/programs/mdrun/membed.c | 2 +- src/programs/mdrun/runner.c | 2 +- 104 files changed, 359 insertions(+), 399 deletions(-) diff --git a/src/gromacs/gmxana/anadih.c b/src/gromacs/gmxana/anadih.c index fdce1a092f..667cb21619 100644 --- a/src/gromacs/gmxana/anadih.c +++ b/src/gromacs/gmxana/anadih.c @@ -992,7 +992,7 @@ void read_ang_dih(const char *trj_fn, /* Increment loop counter */ teller++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); sfree(x); diff --git a/src/gromacs/gmxana/gmx_anaeig.c b/src/gromacs/gmxana/gmx_anaeig.c index 220d156508..599a1db62a 100644 --- a/src/gromacs/gmxana/gmx_anaeig.c +++ b/src/gromacs/gmxana/gmx_anaeig.c @@ -554,7 +554,7 @@ static void project(const char *trajfile, t_topology *top, int ePBC, matrix topb if (top) { - gpbc = gmx_rmpbc_init(&top->idef, ePBC, nat, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, nat); } for (i = 0; i < nat; i++) @@ -623,7 +623,7 @@ static void project(const char *trajfile, t_topology *top, int ePBC, matrix topb } nfr++; } - while (read_next_x(oenv, status, &t, nat, xread, box)); + while (read_next_x(oenv, status, &t, xread, box)); close_trx(status); sfree(x); if (filterfile) @@ -1243,7 +1243,7 @@ int gmx_anaeig(int argc, char *argv[]) bTop = read_tps_conf(ftp2fn(efTPS, NFILE, fnm), title, &top, &ePBC, &xtop, NULL, topbox, bM); atoms = &top.atoms; - gpbc = gmx_rmpbc_init(&top.idef, ePBC, atoms->nr, topbox); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, atoms->nr); gmx_rmpbc(gpbc, atoms->nr, topbox, xtop); /* Fitting is only required for the projection */ if (bProj && bFit1) diff --git a/src/gromacs/gmxana/gmx_bond.c b/src/gromacs/gmxana/gmx_bond.c index ff27615106..02160f6bdb 100644 --- a/src/gromacs/gmxana/gmx_bond.c +++ b/src/gromacs/gmxana/gmx_bond.c @@ -204,7 +204,7 @@ static void do_bonds(FILE *log, const char *fn, const char *fbond, fprintf(outd, "\n"); } } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); if (fdist) diff --git a/src/gromacs/gmxana/gmx_bundle.c b/src/gromacs/gmxana/gmx_bundle.c index 6ecd5cf388..46b4c3fdb8 100644 --- a/src/gromacs/gmxana/gmx_bundle.c +++ b/src/gromacs/gmxana/gmx_bundle.c @@ -346,7 +346,7 @@ int gmx_bundle(int argc, char *argv[]) } read_first_frame(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &fr, TRX_NEED_X); - gpbc = gmx_rmpbc_init(&top.idef, ePBC, fr.natoms, fr.box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, fr.natoms); do { diff --git a/src/gromacs/gmxana/gmx_cluster.c b/src/gromacs/gmxana/gmx_cluster.c index dd4b940ec5..d4e4af2bb2 100644 --- a/src/gromacs/gmxana/gmx_cluster.c +++ b/src/gromacs/gmxana/gmx_cluster.c @@ -770,7 +770,7 @@ rvec **read_whole_trj(const char *fn, int isize, atom_id index[], int skip, } i++; } - while (read_next_x(oenv, status, &t, natom, x, box)); + while (read_next_x(oenv, status, &t, x, box)); fprintf(stderr, "Allocated %lu bytes for frames\n", (unsigned long) (max_nf*isize*sizeof(**xx))); fprintf(stderr, "Read %d frames from trajectory %s\n", i0, fn); @@ -1552,7 +1552,7 @@ int gmx_cluster(int argc, char *argv[]) TRUE); if (bPBC) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr); } fprintf(stderr, "\nSelect group for least squares fit%s:\n", diff --git a/src/gromacs/gmxana/gmx_covar.c b/src/gromacs/gmxana/gmx_covar.c index a8c1b088b3..956fc2fb39 100644 --- a/src/gromacs/gmxana/gmx_covar.c +++ b/src/gromacs/gmxana/gmx_covar.c @@ -257,7 +257,7 @@ int gmx_covar(int argc, char *argv[]) /* Prepare reference frame */ if (bPBC) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, atoms->nr, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, atoms->nr); gmx_rmpbc(gpbc, atoms->nr, box, xref); } if (bFit) @@ -299,7 +299,7 @@ int gmx_covar(int argc, char *argv[]) rvec_inc(xav[i], xread[index[i]]); } } - while (read_next_x(oenv, status, &t, nat, xread, box)); + while (read_next_x(oenv, status, &t, xread, box)); close_trj(status); inv_nframes = 1.0/nframes0; @@ -365,7 +365,7 @@ int gmx_covar(int argc, char *argv[]) } } } - while (read_next_x(oenv, status, &t, nat, xread, box) && + while (read_next_x(oenv, status, &t, xread, box) && (bRef || nframes < nframes0)); close_trj(status); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_current.c b/src/gromacs/gmxana/gmx_current.c index de82a7db1d..30d3fe91d2 100644 --- a/src/gromacs/gmxana/gmx_current.c +++ b/src/gromacs/gmxana/gmx_current.c @@ -446,7 +446,7 @@ static void dielectric(FILE *fmj, FILE *fmd, FILE *outf, FILE *fcur, FILE *mcor, clear_rvec(mjd_tmp); clear_rvec(mdvec); clear_rvec(tmp); - gpbc = gmx_rmpbc_init(&top.idef, ePBC, fr.natoms, fr.box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, fr.natoms); do { diff --git a/src/gromacs/gmxana/gmx_density.c b/src/gromacs/gmxana/gmx_density.c index fa3ad0940f..8943185b69 100644 --- a/src/gromacs/gmxana/gmx_density.c +++ b/src/gromacs/gmxana/gmx_density.c @@ -200,7 +200,7 @@ void calc_electron_density(const char *fn, atom_id **index, int gnx[], snew((*slDensity)[i], *nslices); } - gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr); /*********** Start processing trajectory ***********/ do { @@ -254,7 +254,7 @@ void calc_electron_density(const char *fn, atom_id **index, int gnx[], } nr_frames++; } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); gmx_rmpbc_done(gpbc); /*********** done with status file **********/ @@ -321,7 +321,7 @@ void calc_density(const char *fn, atom_id **index, int gnx[], snew((*slDensity)[i], *nslices); } - gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr); /*********** Start processing trajectory ***********/ do { @@ -357,7 +357,7 @@ void calc_density(const char *fn, atom_id **index, int gnx[], } nr_frames++; } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); gmx_rmpbc_done(gpbc); /*********** done with status file **********/ diff --git a/src/gromacs/gmxana/gmx_densmap.c b/src/gromacs/gmxana/gmx_densmap.c index 5d1cbc3ae0..940099f31c 100644 --- a/src/gromacs/gmxana/gmx_densmap.c +++ b/src/gromacs/gmxana/gmx_densmap.c @@ -364,7 +364,7 @@ int gmx_densmap(int argc, char *argv[]) } nfr++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); /* normalize gridpoints */ diff --git a/src/gromacs/gmxana/gmx_densorder.c b/src/gromacs/gmxana/gmx_densorder.c index fee0f4915d..a7d7286598 100644 --- a/src/gromacs/gmxana/gmx_densorder.c +++ b/src/gromacs/gmxana/gmx_densorder.c @@ -171,7 +171,7 @@ static void density_in_time (const char *fn, atom_id **index, int gnx[], real bw /****Start trajectory processing***/ /*Initialize Densdevel and PBC-remove*/ - gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr); *Densdevel = NULL; @@ -259,7 +259,7 @@ static void density_in_time (const char *fn, atom_id **index, int gnx[], real bw } } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); /*Free memory we no longer need and exit.*/ diff --git a/src/gromacs/gmxana/gmx_dipoles.c b/src/gromacs/gmxana/gmx_dipoles.c index b4fc0d7a02..ce92da2b90 100644 --- a/src/gromacs/gmxana/gmx_dipoles.c +++ b/src/gromacs/gmxana/gmx_dipoles.c @@ -1013,7 +1013,7 @@ static void do_dip(t_topology *top, int ePBC, real volume, gkrbin = mk_gkrbin(rcut, rcmax, bPhi, ndegrees); } - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natom, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natom); /* Start while loop over frames */ t1 = t0 = t; @@ -1314,7 +1314,7 @@ static void do_dip(t_topology *top, int ePBC, real volume, } else { - bCont = read_next_x(oenv, status, &t, natom, x, box); + bCont = read_next_x(oenv, status, &t, x, box); } timecheck = check_times(t); } diff --git a/src/gromacs/gmxana/gmx_disre.c b/src/gromacs/gmxana/gmx_disre.c index 87bf8639e4..a88ec2d8df 100644 --- a/src/gromacs/gmxana/gmx_disre.c +++ b/src/gromacs/gmxana/gmx_disre.c @@ -832,7 +832,7 @@ int gmx_disre(int argc, char *argv[]) init_nrnb(&nrnb); if (ir.ePBC != epbcNONE) { - gpbc = gmx_rmpbc_init(&top->idef, ir.ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ir.ePBC, natoms); } j = 0; @@ -901,7 +901,7 @@ int gmx_disre(int argc, char *argv[]) } j++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); if (ir.ePBC != epbcNONE) { diff --git a/src/gromacs/gmxana/gmx_dist.c b/src/gromacs/gmxana/gmx_dist.c index 75098a1926..8d10b3da72 100644 --- a/src/gromacs/gmxana/gmx_dist.c +++ b/src/gromacs/gmxana/gmx_dist.c @@ -207,7 +207,7 @@ int gmx_dist(int argc, char *argv[]) pbc = NULL; } - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); do { /* initialisation for correct distance calculations */ @@ -303,7 +303,7 @@ int gmx_dist(int argc, char *argv[]) teller++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); gmx_rmpbc_done(gpbc); if (!bCutoff) diff --git a/src/gromacs/gmxana/gmx_do_dssp.c b/src/gromacs/gmxana/gmx_do_dssp.c index 8d22f98758..7e76870a56 100644 --- a/src/gromacs/gmxana/gmx_do_dssp.c +++ b/src/gromacs/gmxana/gmx_do_dssp.c @@ -639,7 +639,7 @@ int gmx_do_dssp(int argc, char *argv[]) accr = NULL; naccr = 0; - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); do { t = output_env_conv_time(oenv, t); @@ -683,7 +683,7 @@ int gmx_do_dssp(int argc, char *argv[]) remove(pdbfile); nframe++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); fprintf(stderr, "\n"); close_trj(status); if (fTArea) diff --git a/src/gromacs/gmxana/gmx_filter.c b/src/gromacs/gmxana/gmx_filter.c index 8044e6a96e..5ff99c301a 100644 --- a/src/gromacs/gmxana/gmx_filter.c +++ b/src/gromacs/gmxana/gmx_filter.c @@ -140,7 +140,7 @@ int gmx_filter(int argc, char *argv[]) &xtop, NULL, topbox, TRUE); if (bTop) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr, topbox); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr); gmx_rmpbc(gpbc, top.atoms.nr, topbox, xtop); } } @@ -340,7 +340,7 @@ int gmx_filter(int argc, char *argv[]) x[nffr - 1] = ptr; fr++; } - while (read_next_x(oenv, in, &(t[nffr - 1]), nat, x[nffr - 1], box[nffr - 1])); + while (read_next_x(oenv, in, &(t[nffr - 1]), x[nffr - 1], box[nffr - 1])); if (bTop) { diff --git a/src/gromacs/gmxana/gmx_genconf.c b/src/gromacs/gmxana/gmx_genconf.c index 576c11050d..7fc9722bcf 100644 --- a/src/gromacs/gmxana/gmx_genconf.c +++ b/src/gromacs/gmxana/gmx_genconf.c @@ -311,7 +311,7 @@ int gmx_genconf(int argc, char *argv[]) } if (bTRX) { - if (!read_next_x(oenv, status, &t, natoms, xx, boxx) && + if (!read_next_x(oenv, status, &t, xx, boxx) && ((i+1)*(j+1)*(k+1) < vol)) { gmx_fatal(FARGS, "Not enough frames in trajectory"); diff --git a/src/gromacs/gmxana/gmx_gyrate.c b/src/gromacs/gmxana/gmx_gyrate.c index cccee82376..26f7904ef2 100644 --- a/src/gromacs/gmxana/gmx_gyrate.c +++ b/src/gromacs/gmxana/gmx_gyrate.c @@ -307,7 +307,7 @@ int gmx_gyrate(int argc, char *argv[]) } if (nz == 0) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); } do { @@ -367,7 +367,7 @@ int gmx_gyrate(int argc, char *argv[]) } j++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); if (nz == 0) { diff --git a/src/gromacs/gmxana/gmx_h2order.c b/src/gromacs/gmxana/gmx_h2order.c index f4885946b1..0d2ac426b2 100644 --- a/src/gromacs/gmxana/gmx_h2order.c +++ b/src/gromacs/gmxana/gmx_h2order.c @@ -125,7 +125,7 @@ void calc_h2order(const char *fn, atom_id index[], int ngx, rvec **slDipole, teller = 0; - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); /*********** Start processing trajectory ***********/ do { @@ -205,7 +205,7 @@ void calc_h2order(const char *fn, atom_id index[], int ngx, rvec **slDipole, } } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); /*********** done with status file **********/ fprintf(stderr, "\nRead trajectory. Printing parameters to file\n"); diff --git a/src/gromacs/gmxana/gmx_hbond.c b/src/gromacs/gmxana/gmx_hbond.c index 8c9cd720b9..0ef1d7c790 100644 --- a/src/gromacs/gmxana/gmx_hbond.c +++ b/src/gromacs/gmxana/gmx_hbond.c @@ -4530,7 +4530,7 @@ int gmx_hbond(int argc, char *argv[]) #pragma omp single { - trrStatus = (read_next_x(oenv, status, &t, natoms, x, box)); + trrStatus = (read_next_x(oenv, status, &t, x, box)); nframes++; } diff --git a/src/gromacs/gmxana/gmx_helix.c b/src/gromacs/gmxana/gmx_helix.c index 883ff82b7f..fd56396552 100644 --- a/src/gromacs/gmxana/gmx_helix.c +++ b/src/gromacs/gmxana/gmx_helix.c @@ -269,7 +269,7 @@ int gmx_helix(int argc, char *argv[]) pr_bb(stdout, nres, bb); } - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); snew(xav, natoms); teller = 0; @@ -326,7 +326,7 @@ int gmx_helix(int argc, char *argv[]) } } } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); fprintf(stderr, "\n"); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_helixorient.c b/src/gromacs/gmxana/gmx_helixorient.c index bcb4607edb..dcbbb93a90 100644 --- a/src/gromacs/gmxana/gmx_helixorient.c +++ b/src/gromacs/gmxana/gmx_helixorient.c @@ -250,7 +250,7 @@ int gmx_helixorient(int argc, char *argv[]) unitaxes[1][1] = 1; unitaxes[2][2] = 1; - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); do { @@ -502,7 +502,7 @@ int gmx_helixorient(int argc, char *argv[]) teller++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_hydorder.c b/src/gromacs/gmxana/gmx_hydorder.c index e742d16182..e8c081d3fc 100644 --- a/src/gromacs/gmxana/gmx_hydorder.c +++ b/src/gromacs/gmxana/gmx_hydorder.c @@ -131,8 +131,8 @@ static void find_tetra_order_grid(t_topology top, int ePBC, snew(skmol, maxidx); /* Must init pbc every step because of pressure coupling */ - set_pbc(&pbc,ePBC,box); - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + set_pbc(&pbc, ePBC, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); gmx_rmpbc(gpbc, natoms, box, x); *sgmean = 0.0; @@ -391,7 +391,7 @@ static void calc_tetra_order_interface(const char *fnNDX, const char *fnTPS, con } } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); sfree(grpname); diff --git a/src/gromacs/gmxana/gmx_mdmat.c b/src/gromacs/gmxana/gmx_mdmat.c index 6aa3f662f9..d7d86f00c6 100644 --- a/src/gromacs/gmxana/gmx_mdmat.c +++ b/src/gromacs/gmxana/gmx_mdmat.c @@ -303,7 +303,7 @@ int gmx_mdmat(int argc, char *argv[]) rlo.r = 1.0, rlo.g = 1.0, rlo.b = 1.0; rhi.r = 0.0, rhi.g = 0.0, rhi.b = 0.0; - gpbc = gmx_rmpbc_init(&top.idef, ePBC, trxnat, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, trxnat); if (bFrames) { @@ -338,7 +338,7 @@ int gmx_mdmat(int argc, char *argv[]) nres, nres, resnr, resnr, mdmat, 0, truncate, rlo, rhi, &nlevels); } } - while (read_next_x(oenv, status, &t, trxnat, x, box)); + while (read_next_x(oenv, status, &t, x, box)); fprintf(stderr, "\n"); close_trj(status); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_mindist.c b/src/gromacs/gmxana/gmx_mindist.c index 2d5543f261..4f51a8a2e0 100644 --- a/src/gromacs/gmxana/gmx_mindist.c +++ b/src/gromacs/gmxana/gmx_mindist.c @@ -149,7 +149,7 @@ static void periodic_mindist_plot(const char *trxfn, const char *outfn, if (NULL != top) { - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); } bFirst = TRUE; @@ -176,7 +176,7 @@ static void periodic_mindist_plot(const char *trxfn, const char *outfn, output_env_conv_time(oenv, t), rmin, rmax, norm(box[0]), norm(box[1]), norm(box[2])); bFirst = FALSE; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); if (NULL != top) { @@ -529,7 +529,7 @@ void dist_plot(const char *fn, const char *afile, const char *dfile, fprintf(respertime, "\n"); } } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); close_trj(status); ffclose(dist); diff --git a/src/gromacs/gmxana/gmx_msd.c b/src/gromacs/gmxana/gmx_msd.c index 8718b180d8..22126a69a2 100644 --- a/src/gromacs/gmxana/gmx_msd.c +++ b/src/gromacs/gmxana/gmx_msd.c @@ -690,7 +690,7 @@ int corr_loop(t_corr *curr, const char *fn, t_topology *top, int ePBC, if (bMol) { - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); } /* the loop over all frames */ @@ -821,7 +821,7 @@ int corr_loop(t_corr *curr, const char *fn, t_topology *top, int ePBC, curr->nframes++; } - while (read_next_x(oenv, status, &t, natoms, x[cur], box)); + while (read_next_x(oenv, status, &t, x[cur], box)); fprintf(stderr, "\nUsed %d restart points spaced %g %s over %g %s\n\n", curr->nrestart, output_env_conv_time(oenv, dt), output_env_get_time_unit(oenv), diff --git a/src/gromacs/gmxana/gmx_order.c b/src/gromacs/gmxana/gmx_order.c index 1ff165a2f1..982a0ac6bb 100644 --- a/src/gromacs/gmxana/gmx_order.c +++ b/src/gromacs/gmxana/gmx_order.c @@ -301,7 +301,7 @@ static void calc_tetra_order_parm(const char *fnNDX, const char *fnTPS, oenv); /* loop over frames */ - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); nframes = 0; do { @@ -316,7 +316,7 @@ static void calc_tetra_order_parm(const char *fnNDX, const char *fnTPS, fprintf(fpsk, "%f %f\n", t, sk); nframes++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); gmx_rmpbc_done(gpbc); @@ -488,7 +488,7 @@ void calc_order(const char *fn, atom_id *index, atom_id *a, rvec **order, teller = 0; - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); /*********** Start processing trajectory ***********/ do { @@ -702,7 +702,7 @@ void calc_order(const char *fn, atom_id *index, atom_id *a, rvec **order, nr_frames++; } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); /*********** done with status file **********/ fprintf(stderr, "\nRead trajectory. Printing parameters to file\n"); diff --git a/src/gromacs/gmxana/gmx_polystat.c b/src/gromacs/gmxana/gmx_polystat.c index 0c80bcf483..53bd7253c2 100644 --- a/src/gromacs/gmxana/gmx_polystat.c +++ b/src/gromacs/gmxana/gmx_polystat.c @@ -283,7 +283,7 @@ int gmx_polystat(int argc, char *argv[]) sum_gyro_tot = 0; sum_pers_tot = 0; - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); do { @@ -456,7 +456,7 @@ int gmx_polystat(int argc, char *argv[]) frame++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_potential.c b/src/gromacs/gmxana/gmx_potential.c index 0f46d45dcf..86e1521f30 100644 --- a/src/gromacs/gmxana/gmx_potential.c +++ b/src/gromacs/gmxana/gmx_potential.c @@ -161,7 +161,7 @@ void calc_potential(const char *fn, atom_id **index, int gnx[], } - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); /*********** Start processing trajectory ***********/ do @@ -221,7 +221,7 @@ void calc_potential(const char *fn, atom_id **index, int gnx[], } nr_frames++; } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_principal.c b/src/gromacs/gmxana/gmx_principal.c index bb3ca306e7..ef7de282ca 100644 --- a/src/gromacs/gmxana/gmx_principal.c +++ b/src/gromacs/gmxana/gmx_principal.c @@ -130,7 +130,7 @@ int gmx_principal(int argc, char *argv[]) natoms = read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box); - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); do { @@ -143,7 +143,7 @@ int gmx_principal(int argc, char *argv[]) fprintf(axis3, "%15.10f %15.10f %15.10f %15.10f\n", t, axes[XX][ZZ], axes[YY][ZZ], axes[ZZ][ZZ]); fprintf(fmoi, "%15.10f %15.10f %15.10f %15.10f\n", t, moi[XX], moi[YY], moi[ZZ]); } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_rdf.c b/src/gromacs/gmxana/gmx_rdf.c index 3eaa3aef8f..eaeb929713 100644 --- a/src/gromacs/gmxana/gmx_rdf.c +++ b/src/gromacs/gmxana/gmx_rdf.c @@ -430,7 +430,7 @@ static void do_rdf(const char *fnNDX, const char *fnTPS, const char *fnTRX, invvol_sum = 0; if (bPBC && (NULL != top)) { - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); } do @@ -613,7 +613,7 @@ static void do_rdf(const char *fnNDX, const char *fnTPS, const char *fnTRX, } nframes++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); fprintf(stderr, "\n"); if (bPBC && (NULL != top)) diff --git a/src/gromacs/gmxana/gmx_rms.c b/src/gromacs/gmxana/gmx_rms.c index d24d171e65..6bad1e6dc8 100644 --- a/src/gromacs/gmxana/gmx_rms.c +++ b/src/gromacs/gmxana/gmx_rms.c @@ -462,7 +462,7 @@ int gmx_rms(int argc, char *argv[]) /* Prepare reference frame */ if (bPBC) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr); gmx_rmpbc(gpbc, top.atoms.nr, box, xp); } if (bReset) @@ -712,7 +712,7 @@ int gmx_rms(int argc, char *argv[]) } } } - while (read_next_x(oenv, status, &t, natoms_trx, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); if (bFile2) @@ -780,7 +780,7 @@ int gmx_rms(int argc, char *argv[]) srenew(time2, maxframe2); } } - while (read_next_x(oenv, status, &t, natoms_trx2, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); } else diff --git a/src/gromacs/gmxana/gmx_rmsdist.c b/src/gromacs/gmxana/gmx_rmsdist.c index 5e91fe8c00..19cf1d1d84 100644 --- a/src/gromacs/gmxana/gmx_rmsdist.c +++ b/src/gromacs/gmxana/gmx_rmsdist.c @@ -791,7 +791,7 @@ int gmx_rmsdist (int argc, char *argv[]) rmsnow = rms_diff(isize, d, d_r); fprintf(fp, "%g %g\n", t, rmsnow); } - while (read_next_x(oenv, status, &t, natom, x, box)); + while (read_next_x(oenv, status, &t, x, box)); fprintf(stderr, "\n"); ffclose(fp); diff --git a/src/gromacs/gmxana/gmx_rmsf.c b/src/gromacs/gmxana/gmx_rmsf.c index 2f69e72dbc..137bb55e4d 100644 --- a/src/gromacs/gmxana/gmx_rmsf.c +++ b/src/gromacs/gmxana/gmx_rmsf.c @@ -341,7 +341,7 @@ int gmx_rmsf(int argc, char *argv[]) if (bFit) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natom, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natom); } /* Now read the trj again to compute fluctuations */ @@ -389,7 +389,7 @@ int gmx_rmsf(int argc, char *argv[]) count += 1.0; teller++; } - while (read_next_x(oenv, status, &t, natom, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); if (bFit) diff --git a/src/gromacs/gmxana/gmx_rotacf.c b/src/gromacs/gmxana/gmx_rotacf.c index deac58817d..bd7120e7d6 100644 --- a/src/gromacs/gmxana/gmx_rotacf.c +++ b/src/gromacs/gmxana/gmx_rotacf.c @@ -149,7 +149,7 @@ int gmx_rotacf(int argc, char *argv[]) natoms = read_first_x(oenv, &status, ftp2fn(efTRX, NFILE, fnm), &t, &x, box); snew(x_s, natoms); - gpbc = gmx_rmpbc_init(&(top->idef), ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&(top->idef), ePBC, natoms); /* Start the loop over frames */ t1 = t0 = t; @@ -204,7 +204,7 @@ int gmx_rotacf(int argc, char *argv[]) /* Increment loop counter */ teller++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); fprintf(stderr, "\nDone with trajectory\n"); diff --git a/src/gromacs/gmxana/gmx_rotmat.c b/src/gromacs/gmxana/gmx_rotmat.c index 220349afc8..36223d0975 100644 --- a/src/gromacs/gmxana/gmx_rotmat.c +++ b/src/gromacs/gmxana/gmx_rotmat.c @@ -90,7 +90,7 @@ static void get_refx(output_env_t oenv, const char *trxfn, int nfitdim, int skip w_rls[a] = (bMW ? top->atoms.atom[index[a]].m : 1.0); tot_mass += w_rls[a]; } - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); do { @@ -112,7 +112,7 @@ static void get_refx(output_env_t oenv, const char *trxfn, int nfitdim, int skip } nfr_all++; } - while (read_next_x(oenv, status, &ti[nfr], natoms, x, box)); + while (read_next_x(oenv, status, &ti[nfr], x, box)); close_trj(status); sfree(x); @@ -248,7 +248,7 @@ int gmx_rotmat(int argc, char *argv[]) read_tps_conf(ftp2fn(efTPS, NFILE, fnm), title, &top, &ePBC, &x_ref, NULL, box, bMW); - gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr); gmx_rmpbc(gpbc, top.atoms.nr, box, x_ref); @@ -301,7 +301,7 @@ int gmx_rotmat(int argc, char *argv[]) R[YY][XX], R[YY][YY], R[YY][ZZ], R[ZZ][XX], R[ZZ][YY], R[ZZ][ZZ]); } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_saltbr.c b/src/gromacs/gmxana/gmx_saltbr.c index 497378e652..987d4876ba 100644 --- a/src/gromacs/gmxana/gmx_saltbr.c +++ b/src/gromacs/gmxana/gmx_saltbr.c @@ -222,7 +222,7 @@ int gmx_saltbr(int argc, char *argv[]) teller++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); fprintf(stderr, "\n"); close_trj(status); diff --git a/src/gromacs/gmxana/gmx_sans.c b/src/gromacs/gmxana/gmx_sans.c index 368d1bf10a..a4749dfbba 100644 --- a/src/gromacs/gmxana/gmx_sans.c +++ b/src/gromacs/gmxana/gmx_sans.c @@ -234,7 +234,7 @@ int gmx_sans(int argc, char *argv[]) /* Prepare reference frame */ if (bPBC) { - gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, top->atoms.nr); gmx_rmpbc(gpbc, top->atoms.nr, box, x); } @@ -339,7 +339,7 @@ int gmx_sans(int argc, char *argv[]) sfree(sqframecurrent->s); sfree(sqframecurrent); } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); /* normalize histo */ diff --git a/src/gromacs/gmxana/gmx_sas.c b/src/gromacs/gmxana/gmx_sas.c index 35a6509cac..23b0c9211a 100644 --- a/src/gromacs/gmxana/gmx_sas.c +++ b/src/gromacs/gmxana/gmx_sas.c @@ -468,7 +468,7 @@ void sas_plot(int nfile, t_filenm fnm[], real solsize, int ndots, if (bPBC) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); } nfr = 0; @@ -585,7 +585,7 @@ void sas_plot(int nfile, t_filenm fnm[], real solsize, int ndots, } nfr++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); if (bPBC) { diff --git a/src/gromacs/gmxana/gmx_sgangle.c b/src/gromacs/gmxana/gmx_sgangle.c index 50d01c9b2b..d4a0453c4a 100644 --- a/src/gromacs/gmxana/gmx_sgangle.c +++ b/src/gromacs/gmxana/gmx_sgangle.c @@ -213,11 +213,11 @@ void sgangle_plot(const char *fn, const char *afile, const char *dfile, distance2; /* same for second of two atoms */ t_trxstatus *status; int natoms, teller = 0; - rvec *x0; /* coordinates, and coordinates corrected for pb */ + rvec *x0; /* coordinates, and coordinates corrected for pb */ matrix box; - char buf[256]; /* for xvgr title */ - gmx_rmpbc_t gpbc = NULL; - const char* aleg[2] = { "cos(Angle)", "Angle (degrees)" }; /* legends for sg_angle output file */ + char buf[256]; /* for xvgr title */ + gmx_rmpbc_t gpbc = NULL; + const char* aleg[2] = { "cos(Angle)", "Angle (degrees)" }; /* legends for sg_angle output file */ if ((natoms = read_first_x(oenv, &status, fn, &t, &x0, box)) == 0) { @@ -246,7 +246,7 @@ void sgangle_plot(const char *fn, const char *afile, const char *dfile, sg_distance2 = xvgropen(d2file, buf, "Time (ps", "Distance (nm)", oenv); } - gpbc = gmx_rmpbc_init(&(top->idef), ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&(top->idef), ePBC, natoms); do { @@ -272,7 +272,7 @@ void sgangle_plot(const char *fn, const char *afile, const char *dfile, } } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); gmx_rmpbc_done(gpbc); @@ -449,7 +449,7 @@ void sgangle_plot_single(const char *fn, const char *afile, const char *dfile, } snew(xzero, natoms); - gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ePBC, natoms); do { @@ -484,7 +484,7 @@ void sgangle_plot_single(const char *fn, const char *afile, const char *dfile, } } - while (read_next_x(oenv, status, &t, natoms, x0, box)); + while (read_next_x(oenv, status, &t, x0, box)); gmx_rmpbc_done(gpbc); fprintf(stderr, "\n"); diff --git a/src/gromacs/gmxana/gmx_sorient.c b/src/gromacs/gmxana/gmx_sorient.c index aefb2380dc..d938288436 100644 --- a/src/gromacs/gmxana/gmx_sorient.c +++ b/src/gromacs/gmxana/gmx_sorient.c @@ -269,7 +269,7 @@ int gmx_sorient(int argc, char *argv[]) if (bTPS) { /* make molecules whole again */ - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); } /* start analysis of trajectory */ do @@ -355,7 +355,7 @@ int gmx_sorient(int argc, char *argv[]) nf++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); /* clean up */ sfree(x); diff --git a/src/gromacs/gmxana/gmx_spatial.c b/src/gromacs/gmxana/gmx_spatial.c index 7f8c7e9401..126942e29c 100644 --- a/src/gromacs/gmxana/gmx_spatial.c +++ b/src/gromacs/gmxana/gmx_spatial.c @@ -244,7 +244,7 @@ int gmx_spatial(int argc, char *argv[]) if (bPBC) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); } /* This is the main loop over frames */ do diff --git a/src/gromacs/gmxana/gmx_spol.c b/src/gromacs/gmxana/gmx_spol.c index abccd8de06..5de9e866b0 100644 --- a/src/gromacs/gmxana/gmx_spol.c +++ b/src/gromacs/gmxana/gmx_spol.c @@ -262,7 +262,7 @@ int gmx_spol(int argc, char *argv[]) molindex = top->mols.index; atom = top->atoms.atom; - gpbc = gmx_rmpbc_init(&top->idef, ir->ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top->idef, ir->ePBC, natoms); /* start analysis of trajectory */ do @@ -342,7 +342,7 @@ int gmx_spol(int argc, char *argv[]) nf++; } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); gmx_rmpbc_done(gpbc); diff --git a/src/gromacs/gmxana/gmx_traj.c b/src/gromacs/gmxana/gmx_traj.c index 05c82fe0e6..3e85dc6561 100644 --- a/src/gromacs/gmxana/gmx_traj.c +++ b/src/gromacs/gmxana/gmx_traj.c @@ -917,7 +917,7 @@ int gmx_traj(int argc, char *argv[]) if (bCom && bPBC) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, fr.natoms, fr.box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, fr.natoms); } do diff --git a/src/gromacs/gmxana/gmx_trjconv.c b/src/gromacs/gmxana/gmx_trjconv.c index 3313a9a8f8..ab64f46b1a 100644 --- a/src/gromacs/gmxana/gmx_trjconv.c +++ b/src/gromacs/gmxana/gmx_trjconv.c @@ -1077,7 +1077,7 @@ int gmx_trjconv(int argc, char *argv[]) } if (bRmPBC) { - gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr, top_box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, top.atoms.nr); } } diff --git a/src/gromacs/gmxana/gmx_trjorder.c b/src/gromacs/gmxana/gmx_trjorder.c index fd893f75f8..abc68bd1e1 100644 --- a/src/gromacs/gmxana/gmx_trjorder.c +++ b/src/gromacs/gmxana/gmx_trjorder.c @@ -234,7 +234,7 @@ int gmx_trjorder(int argc, char *argv[]) } out = open_trx(opt2fn("-o", NFILE, fnm), "w"); } - gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms, box); + gpbc = gmx_rmpbc_init(&top.idef, ePBC, natoms); do { gmx_rmpbc(gpbc, natoms, box, x); @@ -363,7 +363,7 @@ int gmx_trjorder(int argc, char *argv[]) write_trx(out, natoms, swi, &top.atoms, 0, t, box, x, NULL, NULL); } } - while (read_next_x(oenv, status, &t, natoms, x, box)); + while (read_next_x(oenv, status, &t, x, box)); close_trj(status); if (out) { diff --git a/src/gromacs/gmxana/gmx_vanhove.c b/src/gromacs/gmxana/gmx_vanhove.c index 0468c72cc5..f42c141ece 100644 --- a/src/gromacs/gmxana/gmx_vanhove.c +++ b/src/gromacs/gmxana/gmx_vanhove.c @@ -209,7 +209,7 @@ int gmx_vanhove(int argc, char *argv[]) nfr++; } - while (read_next_x(oenv, status, &t, natom, x, box)); + while (read_next_x(oenv, status, &t, x, box)); /* clean up */ sfree(x); diff --git a/src/gromacs/gmxana/gmx_xpm2ps.c b/src/gromacs/gmxana/gmx_xpm2ps.c index cecb3f3141..2b8a07d0d7 100644 --- a/src/gromacs/gmxana/gmx_xpm2ps.c +++ b/src/gromacs/gmxana/gmx_xpm2ps.c @@ -117,7 +117,7 @@ void get_params(const char *mpin, const char *mpout, t_psrec *psr) if (mpin != NULL) { - inp = read_inpfile(mpin, &ninp, NULL, wi); + inp = read_inpfile(mpin, &ninp, wi); } else { diff --git a/src/gromacs/gmxlib/bondfree.c b/src/gromacs/gmxlib/bondfree.c index 1aa794714c..230ccea7ac 100644 --- a/src/gromacs/gmxlib/bondfree.c +++ b/src/gromacs/gmxlib/bondfree.c @@ -256,8 +256,8 @@ real morse_bonds(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { const real one = 1.0; const real two = 2.0; @@ -329,9 +329,9 @@ real cubic_bonds(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { const real three = 3.0; const real two = 2.0; @@ -391,8 +391,8 @@ real FENE_bonds(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, int *global_atom_index) { const real half = 0.5; @@ -488,8 +488,8 @@ real bonds(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, m, ki, ai, aj, type; real dr, dr2, fbond, vbond, fij, vtot; @@ -550,8 +550,8 @@ real restraint_bonds(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, m, ki, ai, aj, type; real dr, dr2, fbond, vbond, fij, vtot; @@ -652,8 +652,8 @@ real polarize(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, m, ki, ai, aj, type; real dr, dr2, fbond, vbond, fij, vtot, ksh; @@ -708,8 +708,8 @@ real anharm_polarize(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, m, ki, ai, aj, type; real dr, dr2, fbond, vbond, fij, vtot, ksh, khyp, drcut, ddr, ddr3; @@ -770,11 +770,11 @@ real anharm_polarize(int nbonds, real water_pol(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], - const rvec x[], rvec f[], rvec fshift[], - const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const rvec x[], rvec f[], rvec gmx_unused fshift[], + const t_pbc gmx_unused *pbc, const t_graph gmx_unused *g, + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { /* This routine implements anisotropic polarizibility for water, through * a shell connected to a dummy with spring constant that differ in the @@ -945,10 +945,10 @@ static real do_1_thole(const rvec xi, const rvec xj, rvec fi, rvec fj, real thole_pol(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], rvec fshift[], - const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_pbc *pbc, const t_graph gmx_unused *g, + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { /* Interaction between two pairs of particles with opposite charge */ int i, type, a1, da1, a2, da2; @@ -1000,8 +1000,8 @@ real angles(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, ai, aj, ak, t1, t2, type; rvec r_ij, r_kj; @@ -1091,10 +1091,10 @@ static gmx_inline void angles_noener_simd(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], - const t_pbc *pbc, const t_graph *g, - real lambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_pbc *pbc, const t_graph gmx_unused *g, + real gmx_unused lambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { #define UNROLL GMX_SIMD_WIDTH_HERE const int nfa1 = 4; @@ -1123,7 +1123,7 @@ angles_noener_simd(int nbonds, dr = gmx_simd_align_real(dr_array); f_buf = gmx_simd_align_real(f_buf_array); - set_pbc_simd(pbc,&pbc_simd); + set_pbc_simd(pbc, &pbc_simd); one_S = gmx_set1_pr(1.0); @@ -1242,8 +1242,8 @@ real linear_angles(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, m, ai, aj, ak, t1, t2, type; rvec f_i, f_j, f_k; @@ -1312,8 +1312,8 @@ real urey_bradley(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, m, ai, aj, ak, t1, t2, type, ki; rvec r_ij, r_kj, r_ik; @@ -1426,9 +1426,9 @@ real quartic_angles(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, j, ai, aj, ak, t1, t2, type; rvec r_ij, r_kj; @@ -1882,8 +1882,8 @@ real pdihs(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, type, ai, aj, ak, al; int t1, t2, t3; @@ -1941,10 +1941,10 @@ static void pdihs_noener(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], - const t_pbc *pbc, const t_graph *g, + const t_pbc gmx_unused *pbc, const t_graph gmx_unused *g, real lambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, type, ai, aj, ak, al; int t1, t2, t3; @@ -1997,29 +1997,29 @@ static void pdihs_noener_simd(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], - const t_pbc *pbc, const t_graph *g, - real lambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_pbc *pbc, const t_graph gmx_unused *g, + real gmx_unused lambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { #define UNROLL GMX_SIMD_WIDTH_HERE - const int nfa1 = 5; - int i, iu, s; - int type, ai[UNROLL], aj[UNROLL], ak[UNROLL], al[UNROLL]; - int t1[UNROLL], t2[UNROLL], t3[UNROLL]; - real ddphi; - real dr_array[3*DIM*UNROLL+UNROLL], *dr; - real buf_array[7*UNROLL+UNROLL], *buf; + const int nfa1 = 5; + int i, iu, s; + int type, ai[UNROLL], aj[UNROLL], ak[UNROLL], al[UNROLL]; + int t1[UNROLL], t2[UNROLL], t3[UNROLL]; + real ddphi; + real dr_array[3*DIM*UNROLL+UNROLL], *dr; + real buf_array[7*UNROLL+UNROLL], *buf; real *cp, *phi0, *mult, *phi, *p, *q, *sf_i, *msf_l; - gmx_mm_pr phi0_S, phi_S; - gmx_mm_pr mx_S, my_S, mz_S; - gmx_mm_pr nx_S, ny_S, nz_S; - gmx_mm_pr nrkj_m2_S, nrkj_n2_S; - gmx_mm_pr cp_S, mdphi_S, mult_S; - gmx_mm_pr sin_S, cos_S; - gmx_mm_pr mddphi_S; - gmx_mm_pr sf_i_S, msf_l_S; - pbc_simd_t pbc_simd; + gmx_mm_pr phi0_S, phi_S; + gmx_mm_pr mx_S, my_S, mz_S; + gmx_mm_pr nx_S, ny_S, nz_S; + gmx_mm_pr nrkj_m2_S, nrkj_n2_S; + gmx_mm_pr cp_S, mdphi_S, mult_S; + gmx_mm_pr sin_S, cos_S; + gmx_mm_pr mddphi_S; + gmx_mm_pr sf_i_S, msf_l_S; + pbc_simd_t pbc_simd; /* Ensure SIMD register alignment */ dr = gmx_simd_align_real(dr_array); @@ -2130,8 +2130,8 @@ real idihs(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, type, ai, aj, ak, al; int t1, t2, t3; @@ -2563,8 +2563,8 @@ real angres(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { return low_angres(nbonds, forceatoms, forceparams, x, f, fshift, pbc, g, lambda, dvdlambda, FALSE); @@ -2575,8 +2575,8 @@ real angresz(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { return low_angres(nbonds, forceatoms, forceparams, x, f, fshift, pbc, g, lambda, dvdlambda, TRUE); @@ -2587,8 +2587,8 @@ real dihres(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { real vtot = 0; int ai, aj, ak, al, i, k, type, t1, t2, t3; @@ -2677,13 +2677,13 @@ real dihres(int nbonds, } -real unimplemented(int nbonds, - const t_iatom forceatoms[], const t_iparams forceparams[], - const rvec x[], rvec f[], rvec fshift[], - const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) +real unimplemented(int gmx_unused nbonds, + const t_iatom gmx_unused forceatoms[], const t_iparams gmx_unused forceparams[], + const rvec gmx_unused x[], rvec gmx_unused f[], rvec gmx_unused fshift[], + const t_pbc gmx_unused *pbc, const t_graph gmx_unused *g, + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { gmx_impl("*** you are using a not implemented function"); @@ -2695,8 +2695,8 @@ real rbdihs(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { const real c0 = 0.0, c1 = 1.0, c2 = 2.0, c3 = 3.0, c4 = 4.0, c5 = 5.0; int type, ai, aj, ak, al, i, j; @@ -2838,9 +2838,9 @@ real cmap_dihs(int nbonds, const gmx_cmap_t *cmap_grid, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, j, k, n, idx; int ai, aj, ak, al, am; @@ -3278,8 +3278,8 @@ real g96bonds(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, m, ki, ai, aj, type; real dr2, fbond, vbond, fij, vtot; @@ -3348,8 +3348,8 @@ real g96angles(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { int i, ai, aj, ak, type, m, t1, t2; rvec r_ij, r_kj; @@ -3419,9 +3419,9 @@ real cross_bond_bond(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { /* Potential from Lawrence and Skimmer, Chem. Phys. Lett. 372 (2003) * pp. 842-847 @@ -3493,9 +3493,9 @@ real cross_bond_angle(int nbonds, const t_iatom forceatoms[], const t_iparams forceparams[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata gmx_unused *fcd, + int gmx_unused *global_atom_index) { /* Potential from Lawrence and Skimmer, Chem. Phys. Lett. 372 (2003) * pp. 842-847 @@ -3618,8 +3618,8 @@ real tab_bonds(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata *fcd, + int gmx_unused *global_atom_index) { int i, m, ki, ai, aj, type, table; real dr, dr2, fbond, vbond, fij, vtot; @@ -3682,8 +3682,8 @@ real tab_angles(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata *fcd, + int gmx_unused *global_atom_index) { int i, ai, aj, ak, t1, t2, type, table; rvec r_ij, r_kj; @@ -3766,8 +3766,8 @@ real tab_dihs(int nbonds, const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + const t_mdatoms gmx_unused *md, t_fcdata *fcd, + int gmx_unused *global_atom_index) { int i, type, ai, aj, ak, al, table; int t1, t2, t3; @@ -4080,7 +4080,7 @@ static real calc_one_bond(FILE *fplog, int thread, rvec x[], rvec f[], rvec fshift[], t_forcerec *fr, const t_pbc *pbc, const t_graph *g, - gmx_enerdata_t *enerd, gmx_grppairener_t *grpp, + gmx_enerdata_t gmx_unused *enerd, gmx_grppairener_t *grpp, t_nrnb *nrnb, real *lambda, real *dvdl, const t_mdatoms *md, t_fcdata *fcd, @@ -4198,13 +4198,13 @@ static real calc_one_bond(FILE *fplog, int thread, to reduce duplication. */ -static real calc_one_bond_foreign(FILE *fplog, int ftype, const t_idef *idef, +static real calc_one_bond_foreign(FILE gmx_unused *fplog, int ftype, const t_idef *idef, rvec x[], rvec f[], t_forcerec *fr, const t_pbc *pbc, const t_graph *g, gmx_grppairener_t *grpp, t_nrnb *nrnb, real *lambda, real *dvdl, const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index, gmx_bool bPrintSepPot) + int *global_atom_index, gmx_bool gmx_unused bPrintSepPot) { int ind, nat1, nbonds, efptFTYPE, nbonds_np; real v = 0; @@ -4277,7 +4277,7 @@ void calc_bonds(FILE *fplog, const gmx_multisim_t *ms, real *lambda, const t_mdatoms *md, t_fcdata *fcd, int *global_atom_index, - t_atomtypes *atype, gmx_genborn_t *born, + t_atomtypes gmx_unused *atype, gmx_genborn_t gmx_unused *born, int force_flags, gmx_bool bPrintSepPot, gmx_large_int_t step) { diff --git a/src/gromacs/gmxlib/chargegroup.c b/src/gromacs/gmxlib/chargegroup.c index b68a51532e..4f0277d6cd 100644 --- a/src/gromacs/gmxlib/chargegroup.c +++ b/src/gromacs/gmxlib/chargegroup.c @@ -145,7 +145,7 @@ void calc_chargegroup_radii(const gmx_mtop_t *mtop, rvec *x, *rcoul2 = sqrt(r2c2); } -void calc_cgcm(FILE *fplog, int cg0, int cg1, t_block *cgs, +void calc_cgcm(FILE gmx_unused *fplog, int cg0, int cg1, t_block *cgs, rvec pos[], rvec cg_cm[]) { int icg, k, k0, k1, d; @@ -189,7 +189,7 @@ void calc_cgcm(FILE *fplog, int cg0, int cg1, t_block *cgs, } } -void put_charge_groups_in_box(FILE *fplog, int cg0, int cg1, +void put_charge_groups_in_box(FILE gmx_unused *fplog, int cg0, int cg1, int ePBC, matrix box, t_block *cgs, rvec pos[], rvec cg_cm[]) diff --git a/src/gromacs/gmxlib/checkpoint.c b/src/gromacs/gmxlib/checkpoint.c index 0e8876c0a7..23aa493db5 100644 --- a/src/gromacs/gmxlib/checkpoint.c +++ b/src/gromacs/gmxlib/checkpoint.c @@ -283,7 +283,7 @@ static void do_cpt_step_err(XDR *xd, const char *desc, gmx_large_int_t *i, FILE bool_t res = 0; char buf[STEPSTRSIZE]; - res = xdr_gmx_large_int(xd, i, "reading checkpoint file"); + res = xdr_gmx_large_int(xd, i); if (res == 0) { cp_error(); @@ -309,7 +309,7 @@ static void do_cpt_double_err(XDR *xd, const char *desc, double *f, FILE *list) } } -static void do_cpt_real_err(XDR *xd, const char *desc, real *f) +static void do_cpt_real_err(XDR *xd, real *f) { bool_t res = 0; @@ -332,7 +332,7 @@ static void do_cpt_n_rvecs_err(XDR *xd, const char *desc, int n, rvec f[], FILE { for (j = 0; j < DIM; j++) { - do_cpt_real_err(xd, desc, &f[i][j]); + do_cpt_real_err(xd, &f[i][j]); } } @@ -949,7 +949,7 @@ static void do_cpt_header(XDR *xd, gmx_bool bRead, int *file_version, } } -static int do_cpt_footer(XDR *xd, gmx_bool bRead, int file_version) +static int do_cpt_footer(XDR *xd, int file_version) { bool_t res = 0; int magic; @@ -971,8 +971,7 @@ static int do_cpt_footer(XDR *xd, gmx_bool bRead, int file_version) return 0; } -static int do_cpt_state(XDR *xd, gmx_bool bRead, - int fflags, t_state *state, +static int do_cpt_state(XDR *xd, int fflags, t_state *state, gmx_bool bReadRNG, FILE *list) { int sflags; @@ -1042,8 +1041,7 @@ static int do_cpt_state(XDR *xd, gmx_bool bRead, return ret; } -static int do_cpt_ekinstate(XDR *xd, gmx_bool bRead, - int fflags, ekinstate_t *ekins, +static int do_cpt_ekinstate(XDR *xd, int fflags, ekinstate_t *ekins, FILE *list) { int i; @@ -1178,7 +1176,7 @@ static int do_cpt_enerhist(XDR *xd, gmx_bool bRead, return ret; } -static int do_cpt_df_hist(XDR *xd, gmx_bool bRead, int fflags, df_history_t *dfhist, FILE *list) +static int do_cpt_df_hist(XDR *xd, int fflags, df_history_t *dfhist, FILE *list) { int i, nlambda; int ret; @@ -1532,10 +1530,10 @@ void write_checkpoint(const char *fn, gmx_bool bNumberAndKeep, sfree(bhost); sfree(fprog); - if ((do_cpt_state(gmx_fio_getxdr(fp), FALSE, state->flags, state, TRUE, NULL) < 0) || - (do_cpt_ekinstate(gmx_fio_getxdr(fp), FALSE, flags_eks, &state->ekinstate, NULL) < 0) || + if ((do_cpt_state(gmx_fio_getxdr(fp), state->flags, state, TRUE, NULL) < 0) || + (do_cpt_ekinstate(gmx_fio_getxdr(fp), flags_eks, &state->ekinstate, NULL) < 0) || (do_cpt_enerhist(gmx_fio_getxdr(fp), FALSE, flags_enh, &state->enerhist, NULL) < 0) || - (do_cpt_df_hist(gmx_fio_getxdr(fp), FALSE, flags_dfh, &state->dfhist, NULL) < 0) || + (do_cpt_df_hist(gmx_fio_getxdr(fp), flags_dfh, &state->dfhist, NULL) < 0) || (do_cpt_EDstate(gmx_fio_getxdr(fp), FALSE, &state->edsamstate, NULL) < 0) || (do_cpt_files(gmx_fio_getxdr(fp), FALSE, &outputfiles, &noutputfiles, NULL, file_version) < 0)) @@ -1543,7 +1541,7 @@ void write_checkpoint(const char *fn, gmx_bool bNumberAndKeep, gmx_file("Cannot read/write checkpoint; corrupt file, or maybe you are out of disk space?"); } - do_cpt_footer(gmx_fio_getxdr(fp), FALSE, file_version); + do_cpt_footer(gmx_fio_getxdr(fp), file_version); /* we really, REALLY, want to make sure to physically write the checkpoint, and all the files it depends on, out to disk. Because we've @@ -1948,15 +1946,14 @@ static void read_checkpoint(const char *fn, FILE **pfplog, cr, bPartDecomp, nppnodes_f, npmenodes_f, dd_nc, dd_nc_f); } } - ret = do_cpt_state(gmx_fio_getxdr(fp), TRUE, fflags, state, *bReadRNG, NULL); + ret = do_cpt_state(gmx_fio_getxdr(fp), fflags, state, *bReadRNG, NULL); *init_fep_state = state->fep_state; /* there should be a better way to do this than setting it here. Investigate for 5.0. */ if (ret) { cp_error(); } - ret = do_cpt_ekinstate(gmx_fio_getxdr(fp), TRUE, - flags_eks, &state->ekinstate, NULL); + ret = do_cpt_ekinstate(gmx_fio_getxdr(fp), flags_eks, &state->ekinstate, NULL); if (ret) { cp_error(); @@ -1990,8 +1987,7 @@ static void read_checkpoint(const char *fn, FILE **pfplog, state->enerhist.nsum_sim = *step; } - ret = do_cpt_df_hist(gmx_fio_getxdr(fp), TRUE, - flags_dfh, &state->dfhist, NULL); + ret = do_cpt_df_hist(gmx_fio_getxdr(fp), flags_dfh, &state->dfhist, NULL); if (ret) { cp_error(); @@ -2003,7 +1999,7 @@ static void read_checkpoint(const char *fn, FILE **pfplog, cp_error(); } - ret = do_cpt_footer(gmx_fio_getxdr(fp), TRUE, file_version); + ret = do_cpt_footer(gmx_fio_getxdr(fp), file_version); if (ret) { cp_error(); @@ -2218,13 +2214,12 @@ static void read_checkpoint_data(t_fileio *fp, int *simulation_part, &(state->dfhist.nlambda), &state->flags, &flags_eks, &flags_enh, &flags_dfh, &state->edsamstate.nED, NULL); ret = - do_cpt_state(gmx_fio_getxdr(fp), TRUE, state->flags, state, bReadRNG, NULL); + do_cpt_state(gmx_fio_getxdr(fp), state->flags, state, bReadRNG, NULL); if (ret) { cp_error(); } - ret = do_cpt_ekinstate(gmx_fio_getxdr(fp), TRUE, - flags_eks, &state->ekinstate, NULL); + ret = do_cpt_ekinstate(gmx_fio_getxdr(fp), flags_eks, &state->ekinstate, NULL); if (ret) { cp_error(); @@ -2235,8 +2230,7 @@ static void read_checkpoint_data(t_fileio *fp, int *simulation_part, { cp_error(); } - ret = do_cpt_df_hist(gmx_fio_getxdr(fp), TRUE, - flags_dfh, &state->dfhist, NULL); + ret = do_cpt_df_hist(gmx_fio_getxdr(fp), flags_dfh, &state->dfhist, NULL); if (ret) { cp_error(); @@ -2262,7 +2256,7 @@ static void read_checkpoint_data(t_fileio *fp, int *simulation_part, cp_error(); } - ret = do_cpt_footer(gmx_fio_getxdr(fp), TRUE, file_version); + ret = do_cpt_footer(gmx_fio_getxdr(fp), file_version); if (ret) { cp_error(); @@ -2359,13 +2353,12 @@ void list_checkpoint(const char *fn, FILE *out) &state.natoms, &state.ngtc, &state.nnhpres, &state.nhchainlength, &(state.dfhist.nlambda), &state.flags, &flags_eks, &flags_enh, &flags_dfh, &state.edsamstate.nED, out); - ret = do_cpt_state(gmx_fio_getxdr(fp), TRUE, state.flags, &state, TRUE, out); + ret = do_cpt_state(gmx_fio_getxdr(fp), state.flags, &state, TRUE, out); if (ret) { cp_error(); } - ret = do_cpt_ekinstate(gmx_fio_getxdr(fp), TRUE, - flags_eks, &state.ekinstate, out); + ret = do_cpt_ekinstate(gmx_fio_getxdr(fp), flags_eks, &state.ekinstate, out); if (ret) { cp_error(); @@ -2376,8 +2369,7 @@ void list_checkpoint(const char *fn, FILE *out) if (ret == 0) { init_df_history(&state.dfhist, state.dfhist.nlambda, 0); /* reinitialize state with correct sizes */ - ret = do_cpt_df_hist(gmx_fio_getxdr(fp), TRUE, - flags_dfh, &state.dfhist, out); + ret = do_cpt_df_hist(gmx_fio_getxdr(fp), flags_dfh, &state.dfhist, out); } if (ret == 0) @@ -2392,7 +2384,7 @@ void list_checkpoint(const char *fn, FILE *out) if (ret == 0) { - ret = do_cpt_footer(gmx_fio_getxdr(fp), TRUE, file_version); + ret = do_cpt_footer(gmx_fio_getxdr(fp), file_version); } if (ret) diff --git a/src/gromacs/gmxlib/disre.c b/src/gromacs/gmxlib/disre.c index e6727f6cc7..b54c0b4091 100644 --- a/src/gromacs/gmxlib/disre.c +++ b/src/gromacs/gmxlib/disre.c @@ -372,9 +372,9 @@ void calc_disres_R_6(const gmx_multisim_t *ms, real ta_disres(int nfa, const t_iatom forceatoms[], const t_iparams ip[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata *fcd, + int gmx_unused *global_atom_index) { const real sixth = 1.0/6.0; const real seven_three = 7.0/3.0; diff --git a/src/gromacs/gmxlib/ewald_util.c b/src/gromacs/gmxlib/ewald_util.c index f7eea7f2d9..4b6b790d52 100644 --- a/src/gromacs/gmxlib/ewald_util.c +++ b/src/gromacs/gmxlib/ewald_util.c @@ -83,8 +83,7 @@ real calc_ewaldcoeff(real rc, real dtol) -real ewald_LRcorrection(FILE *fplog, - int start, int end, +real ewald_LRcorrection(int start, int end, t_commrec *cr, int thread, t_forcerec *fr, real *chargeA, real *chargeB, gmx_bool calc_excl_corr, diff --git a/src/gromacs/gmxlib/gmx_detect_hardware.c b/src/gromacs/gmxlib/gmx_detect_hardware.c index b0b4e74cd6..56f0200147 100644 --- a/src/gromacs/gmxlib/gmx_detect_hardware.c +++ b/src/gromacs/gmxlib/gmx_detect_hardware.c @@ -59,7 +59,7 @@ static const char * invalid_gpuid_hint = /* FW decl. */ void limit_num_gpus_used(gmx_hw_info_t *hwinfo, int count); -static void sprint_gpus(char *sbuf, const gmx_gpu_info_t *gpu_info, gmx_bool bPrintAll) +static void sprint_gpus(char *sbuf, const gmx_gpu_info_t *gpu_info) { int i, ndev; char stmp[STRLEN]; @@ -99,7 +99,7 @@ static void print_gpu_detection_stats(FILE *fplog, if (ngpu > 0) { - sprint_gpus(stmp, gpu_info, TRUE); + sprint_gpus(stmp, gpu_info); md_print_warn(cr, fplog, "%d GPU%s detected%s:\n%s\n", ngpu, (ngpu > 1) ? "s" : "", onhost, stmp); } @@ -173,12 +173,6 @@ static void parse_gpu_id_plain_string(const char *idstr, int *nid, int *idlist) } } -static void parse_gpu_id_csv_string(const char *idstr, int *nid, int *idlist) -{ - /* XXX implement cvs format to support more than 10 different GPUs in a box. */ - gmx_incons("Not implemented yet"); -} - void gmx_check_hw_runconf_consistency(FILE *fplog, gmx_hw_info_t *hwinfo, const t_commrec *cr, int ntmpi_requested, gmx_bool bUseGPU) @@ -407,7 +401,7 @@ void gmx_check_hw_runconf_consistency(FILE *fplog, gmx_hw_info_t *hwinfo, * We assume that this is equal with the number of CPUs reported to be * online by the OS at the time of the call. */ -static int get_nthreads_hw_avail(FILE *fplog, const t_commrec *cr) +static int get_nthreads_hw_avail(FILE gmx_unused *fplog, const t_commrec gmx_unused *cr) { int ret = 0; diff --git a/src/gromacs/gmxlib/gmx_omp_nthreads.c b/src/gromacs/gmxlib/gmx_omp_nthreads.c index f9d3947547..fe3eae1b43 100644 --- a/src/gromacs/gmxlib/gmx_omp_nthreads.c +++ b/src/gromacs/gmxlib/gmx_omp_nthreads.c @@ -239,7 +239,7 @@ void gmx_omp_nthreads_init(FILE *fplog, t_commrec *cr, int nthreads_hw_avail, int omp_nthreads_req, int omp_nthreads_pme_req, - gmx_bool bThisNodePMEOnly, + gmx_bool gmx_unused bThisNodePMEOnly, gmx_bool bFullOmpSupport) { int nth, nth_pmeonly, gmx_maxth, nppn; diff --git a/src/gromacs/gmxlib/gmx_thread_affinity.c b/src/gromacs/gmxlib/gmx_thread_affinity.c index ef96a0bb6b..ce89e4130f 100644 --- a/src/gromacs/gmxlib/gmx_thread_affinity.c +++ b/src/gromacs/gmxlib/gmx_thread_affinity.c @@ -183,9 +183,7 @@ void gmx_set_thread_affinity(FILE *fplog, const t_commrec *cr, gmx_hw_opt_t *hw_opt, - int nthreads_pme, - const gmx_hw_info_t *hwinfo, - const t_inputrec *inputrec) + const gmx_hw_info_t *hwinfo) { int nth_affinity_set, thread_id_node, thread_id, nthread_local, nthread_node, nthread_hw_max, nphyscore; diff --git a/src/gromacs/gmxlib/gmxfio.c b/src/gromacs/gmxlib/gmxfio.c index 8784fc0545..d8d3110461 100644 --- a/src/gromacs/gmxlib/gmxfio.c +++ b/src/gromacs/gmxlib/gmxfio.c @@ -203,8 +203,7 @@ const char *gmx_fio_dbgstr(t_fileio *fio, const char *desc, char *buf) /* check the number of items given against the type */ -void gmx_fio_check_nitem(t_fileio *fio, int eio, int nitem, const char *file, - int line) +void gmx_fio_check_nitem(int eio, int nitem, const char *file, int line) { if ((nitem != 1) && !((eio == eioNRVEC) || (eio == eioNUCHAR))) { @@ -825,7 +824,7 @@ static int gmx_fio_int_get_file_position(t_fileio *fio, gmx_off_t *offset) return 0; } -int gmx_fio_check_file_position(t_fileio *fio) +int gmx_fio_check_file_position(t_fileio gmx_unused *fio) { /* If gmx_off_t is 4 bytes we can not store file offset > 2 GB. * If we do not have ftello, we will play it safe. diff --git a/src/gromacs/gmxlib/gmxfio_asc.c b/src/gromacs/gmxlib/gmxfio_asc.c index fe6c696c52..33ac9f5d81 100644 --- a/src/gromacs/gmxlib/gmxfio_asc.c +++ b/src/gromacs/gmxlib/gmxfio_asc.c @@ -86,15 +86,15 @@ const t_iotype dummy_iotype = {do_dummyread, do_dummywrite}; -static gmx_bool do_dummyread(t_fileio *fio, void *item, int nitem, int eio, - const char *desc, const char *srcfile, int line) +static gmx_bool do_dummyread(t_fileio gmx_unused *fio, void gmx_unused *item, int gmx_unused nitem, int gmx_unused eio, + const char gmx_unused *desc, const char gmx_unused *srcfile, int gmx_unused line) { gmx_fatal(FARGS, "File type not set!"); return FALSE; } -static gmx_bool do_dummywrite(t_fileio *fio, const void *item, int nitem, int eio, - const char *desc, const char *srcfile, int line) +static gmx_bool do_dummywrite(t_fileio gmx_unused *fio, const void gmx_unused *item, int gmx_unused nitem, int gmx_unused eio, + const char gmx_unused *desc, const char gmx_unused *srcfile, int gmx_unused line) { gmx_fatal(FARGS, "File type not set!"); return FALSE; @@ -159,7 +159,7 @@ static gmx_bool do_ascwrite(t_fileio *fio, const void *item, int nitem, int eio, unsigned char *ucptr; FILE *fp = fio->fp; - gmx_fio_check_nitem(fio, eio, nitem, srcfile, line); + gmx_fio_check_nitem(eio, nitem, srcfile, line); switch (eio) { case eioREAL: @@ -303,7 +303,7 @@ static gmx_bool do_ascread(t_fileio *fio, void *item, int nitem, int eio, #define NEXT_ITEM_BUF_LEN 128 char ni_buf[NEXT_ITEM_BUF_LEN]; - gmx_fio_check_nitem(fio, eio, nitem, srcfile, line); + gmx_fio_check_nitem(eio, nitem, srcfile, line); switch (eio) { case eioREAL: diff --git a/src/gromacs/gmxlib/gmxfio_bin.c b/src/gromacs/gmxlib/gmxfio_bin.c index 641897e250..72e5bb3a76 100644 --- a/src/gromacs/gmxlib/gmxfio_bin.c +++ b/src/gromacs/gmxlib/gmxfio_bin.c @@ -77,7 +77,7 @@ static gmx_bool do_binwrite(t_fileio *fio, const void *item, int nitem, int eio, size_t size = 0, wsize; int ssize; - gmx_fio_check_nitem(fio, eio, nitem, srcfile, line); + gmx_fio_check_nitem(eio, nitem, srcfile, line); switch (eio) { case eioREAL: @@ -140,7 +140,7 @@ static gmx_bool do_binread(t_fileio *fio, void *item, int nitem, int eio, size_t size = 0, rsize; int ssize; - gmx_fio_check_nitem(fio, eio, nitem, srcfile, line); + gmx_fio_check_nitem(eio, nitem, srcfile, line); switch (eio) { case eioREAL: diff --git a/src/gromacs/gmxlib/gmxfio_int.h b/src/gromacs/gmxlib/gmxfio_int.h index 38783eb999..91fc7930c7 100644 --- a/src/gromacs/gmxlib/gmxfio_int.h +++ b/src/gromacs/gmxlib/gmxfio_int.h @@ -118,7 +118,7 @@ extern const char *eioNames[eioNR]; /* make a debug string if that is requested in the fio */ const char *gmx_fio_dbgstr(t_fileio *fio, const char *desc, char *buf); /* check the number of items against the allowed number of items */ -void gmx_fio_check_nitem(t_fileio *fio, int eio, int nitem, const char *file, +void gmx_fio_check_nitem(int eio, int nitem, const char *file, int line); /* check the output type against allowed values */ void gmx_fio_fe(t_fileio *fio, int eio, const char *desc, const char *srcfile, diff --git a/src/gromacs/gmxlib/gmxfio_xdr.c b/src/gromacs/gmxlib/gmxfio_xdr.c index a13c545747..35a04b26b2 100644 --- a/src/gromacs/gmxlib/gmxfio_xdr.c +++ b/src/gromacs/gmxlib/gmxfio_xdr.c @@ -88,7 +88,7 @@ static gmx_bool do_xdr(t_fileio *fio, void *item, int nitem, int eio, double d = 0; float f = 0; - gmx_fio_check_nitem(fio, eio, nitem, srcfile, line); + gmx_fio_check_nitem(eio, nitem, srcfile, line); switch (eio) { case eioREAL: @@ -158,7 +158,7 @@ static gmx_bool do_xdr(t_fileio *fio, void *item, int nitem, int eio, { sdum = *(gmx_large_int_t *) item; } - res = xdr_gmx_large_int(fio->xdr, &sdum, NULL); + res = xdr_gmx_large_int(fio->xdr, &sdum); if (item) { *(gmx_large_int_t *) item = sdum; diff --git a/src/gromacs/gmxlib/main.c b/src/gromacs/gmxlib/main.c index 750731866a..05b262d5c4 100644 --- a/src/gromacs/gmxlib/main.c +++ b/src/gromacs/gmxlib/main.c @@ -506,7 +506,7 @@ void init_multisystem(t_commrec *cr, int nsim, char **multidirs, } } -t_commrec *init_par(int *argc, char ***argv_ptr) +t_commrec *init_par(int gmx_unused *argc, char ***argv_ptr) { t_commrec *cr; char **argv; diff --git a/src/gromacs/gmxlib/mshift.c b/src/gromacs/gmxlib/mshift.c index 430462624b..5eb8bd641d 100644 --- a/src/gromacs/gmxlib/mshift.c +++ b/src/gromacs/gmxlib/mshift.c @@ -627,7 +627,7 @@ static void mk_1shift_screw(matrix box, rvec hbox, } } -static int mk_grey(FILE *log, int nnodes, egCol egc[], t_graph *g, int *AtomI, +static int mk_grey(egCol egc[], t_graph *g, int *AtomI, int npbcdim, matrix box, rvec x[], int *nerror) { int m, j, ng, ai, aj, g0; @@ -807,7 +807,7 @@ void mk_mshift(FILE *log, t_graph *g, int ePBC, matrix box, rvec x[]) /* Make all the neighbours of this black node grey * and set their periodicity */ - ng = mk_grey(log, nnodes, g->egc, g, &fG, npbcdim, box, x, &nerror); + ng = mk_grey(g->egc, g, &fG, npbcdim, box, x, &nerror); /* ng is the number of white nodes made grey */ nG += ng; nW -= ng; diff --git a/src/gromacs/gmxlib/mtop_util.c b/src/gromacs/gmxlib/mtop_util.c index 6eeeacdc0b..1d8cef3f76 100644 --- a/src/gromacs/gmxlib/mtop_util.c +++ b/src/gromacs/gmxlib/mtop_util.c @@ -805,8 +805,7 @@ void gmx_mtop_make_atomic_charge_groups(gmx_mtop_t *mtop, * The cat routines below are old code from src/kernel/topcat.c */ -static void blockcat(t_block *dest, t_block *src, int copies, - int dnum, int snum) +static void blockcat(t_block *dest, t_block *src, int copies) { int i, j, l, nra, size; @@ -1013,7 +1012,7 @@ static void gen_local_top(const gmx_mtop_t *mtop, const t_inputrec *ir, srcnr = molt->atoms.nr; destnr = natoms; - blockcat(&top->cgs, &molt->cgs, molb->nmol, destnr, srcnr); + blockcat(&top->cgs, &molt->cgs, molb->nmol); blockacat(&top->excls, &molt->excls, molb->nmol, destnr, srcnr); diff --git a/src/gromacs/gmxlib/network.c b/src/gromacs/gmxlib/network.c index 14926b731a..fbc746290f 100644 --- a/src/gromacs/gmxlib/network.c +++ b/src/gromacs/gmxlib/network.c @@ -64,7 +64,7 @@ gmx_bool gmx_mpi_initialized(void) #endif } -int gmx_setup(int *argc, char **argv, int *nnodes) +int gmx_setup(int gmx_unused *argc, char gmx_unused **argv, int *nnodes) { #ifndef GMX_MPI gmx_call("gmx_setup"); @@ -177,7 +177,7 @@ int gmx_hostname_num() #endif } -void gmx_setup_nodecomm(FILE *fplog, t_commrec *cr) +void gmx_setup_nodecomm(FILE gmx_unused *fplog, t_commrec *cr) { gmx_nodecomm_t *nc; int n, rank, hostnum, ng, ni; @@ -359,7 +359,7 @@ void gmx_barrier(const t_commrec *cr) #endif } -void gmx_abort(int noderank, int nnodes, int errorno) +void gmx_abort(int gmx_unused noderank, int gmx_unused nnodes, int gmx_unused errorno) { #ifndef GMX_MPI gmx_call("gmx_abort"); diff --git a/src/gromacs/gmxlib/nrama.c b/src/gromacs/gmxlib/nrama.c index 51eb50ce72..c5bab6f30f 100644 --- a/src/gromacs/gmxlib/nrama.c +++ b/src/gromacs/gmxlib/nrama.c @@ -81,7 +81,7 @@ static void calc_dihs(t_xrama *xr) t_dih *dd; gmx_rmpbc_t gpbc = NULL; - gpbc = gmx_rmpbc_init(xr->idef, xr->ePBC, xr->natoms, xr->box); + gpbc = gmx_rmpbc_init(xr->idef, xr->ePBC, xr->natoms); gmx_rmpbc(gpbc, xr->natoms, xr->box, xr->x); gmx_rmpbc_done(gpbc); @@ -97,7 +97,7 @@ static void calc_dihs(t_xrama *xr) gmx_bool new_data(t_xrama *xr) { - if (!read_next_x(xr->oenv, xr->traj, &xr->t, xr->natoms, xr->x, xr->box)) + if (!read_next_x(xr->oenv, xr->traj, &xr->t, xr->x, xr->box)) { return FALSE; } diff --git a/src/gromacs/gmxlib/nrnb.c b/src/gromacs/gmxlib/nrnb.c index 16b1e9f894..fa8dd0886b 100644 --- a/src/gromacs/gmxlib/nrnb.c +++ b/src/gromacs/gmxlib/nrnb.c @@ -294,7 +294,7 @@ void print_nrnb(FILE *out, t_nrnb *nrnb) } } -void _inc_nrnb(t_nrnb *nrnb, int enr, int inc, char *file, int line) +void _inc_nrnb(t_nrnb *nrnb, int enr, int inc, char gmx_unused *file, int gmx_unused line) { nrnb->n[enr] += inc; #ifdef DEBUG_NRNB @@ -383,10 +383,9 @@ void print_flop(FILE *out, t_nrnb *nrnb, double *nbfs, double *mflop) } } -void print_perf(FILE *out, double nodetime, double realtime, int nprocs, +void print_perf(FILE *out, double nodetime, double realtime, gmx_large_int_t nsteps, real delta_t, - double nbfs, double mflop, - int omp_nth_pp) + double nbfs, double mflop) { real runtime; diff --git a/src/gromacs/gmxlib/orires.c b/src/gromacs/gmxlib/orires.c index 4ac89a04e1..a0c2a4faf0 100644 --- a/src/gromacs/gmxlib/orires.c +++ b/src/gromacs/gmxlib/orires.c @@ -588,9 +588,9 @@ real calc_orires_dev(const gmx_multisim_t *ms, real orires(int nfa, const t_iatom forceatoms[], const t_iparams ip[], const rvec x[], rvec f[], rvec fshift[], const t_pbc *pbc, const t_graph *g, - real lambda, real *dvdlambda, - const t_mdatoms *md, t_fcdata *fcd, - int *global_atom_index) + real gmx_unused lambda, real gmx_unused *dvdlambda, + const t_mdatoms gmx_unused *md, t_fcdata *fcd, + int gmx_unused *global_atom_index) { atom_id ai, aj; int fa, d, i, type, ex, power, ki = CENTRAL; diff --git a/src/gromacs/gmxlib/random.c b/src/gromacs/gmxlib/random.c index 1002e7d5f7..6cc4eb4378 100644 --- a/src/gromacs/gmxlib/random.c +++ b/src/gromacs/gmxlib/random.c @@ -115,7 +115,7 @@ void maxwell_speed(real tempi, int seed, gmx_mtop_t *mtop, rvec v[]) gmx_rng_destroy(rng); } -real calc_cm(FILE *log, int natoms, real mass[], rvec x[], rvec v[], +real calc_cm(int natoms, real mass[], rvec x[], rvec v[], rvec xcm, rvec vcm, rvec acm, matrix L) { rvec dx, a0; @@ -179,7 +179,7 @@ real calc_cm(FILE *log, int natoms, real mass[], rvec x[], rvec v[], return tm; } -void stop_cm(FILE *log, int natoms, real mass[], rvec x[], rvec v[]) +void stop_cm(FILE gmx_unused *log, int natoms, real mass[], rvec x[], rvec v[]) { rvec xcm, vcm, acm; tensor L; @@ -188,7 +188,7 @@ void stop_cm(FILE *log, int natoms, real mass[], rvec x[], rvec v[]) #ifdef DEBUG fprintf(log, "stopping center of mass motion...\n"); #endif - (void)calc_cm(log, natoms, mass, x, v, xcm, vcm, acm, L); + (void)calc_cm(natoms, mass, x, v, xcm, vcm, acm, L); /* Subtract center of mass velocity */ for (i = 0; (i < natoms); i++) diff --git a/src/gromacs/gmxlib/readinp.c b/src/gromacs/gmxlib/readinp.c index c88fb73b82..96f5be0aff 100644 --- a/src/gromacs/gmxlib/readinp.c +++ b/src/gromacs/gmxlib/readinp.c @@ -55,7 +55,6 @@ static int search_einp(int ninp, const t_inpfile *inp, const char *name); t_inpfile *read_inpfile(const char *fn, int *ninp, - char **cppopts, warninp_t wi) { FILE *in; diff --git a/src/gromacs/gmxlib/rmpbc.c b/src/gromacs/gmxlib/rmpbc.c index 3560c53e07..0a251ba580 100644 --- a/src/gromacs/gmxlib/rmpbc.c +++ b/src/gromacs/gmxlib/rmpbc.c @@ -101,8 +101,7 @@ static t_graph *gmx_rmpbc_get_graph(gmx_rmpbc_t gpbc, int ePBC, int natoms) return gr->gr; } -gmx_rmpbc_t gmx_rmpbc_init(t_idef *idef, int ePBC, int natoms, - matrix box) +gmx_rmpbc_t gmx_rmpbc_init(t_idef *idef, int ePBC, int natoms) { gmx_rmpbc_t gpbc; diff --git a/src/gromacs/gmxlib/sfactor.c b/src/gromacs/gmxlib/sfactor.c index 7cafc73c04..574bd3c49f 100644 --- a/src/gromacs/gmxlib/sfactor.c +++ b/src/gromacs/gmxlib/sfactor.c @@ -530,7 +530,7 @@ extern int do_scattering_intensity (const char* fnTPS, const char* fnNDX, index_atp[i] = create_indexed_atom_type (red[i], isize[i]); } - sf_table = compute_scattering_factor_table (gmx_sf, (structure_factor_t *)sf, &nsftable); + sf_table = compute_scattering_factor_table (gmx_sf, (structure_factor_t *)sf); /* This is the main loop over frames */ @@ -718,7 +718,7 @@ extern void gmx_structurefactors_done(gmx_structurefactors_t *gsf) } -extern real **compute_scattering_factor_table (gmx_structurefactors_t *gsf, structure_factor_t *sft, int *nsftable) +extern real **compute_scattering_factor_table (gmx_structurefactors_t *gsf, structure_factor_t *sft) { /* * this function build up a table of scattering factors for every atom diff --git a/src/gromacs/gmxlib/shift_util.c b/src/gromacs/gmxlib/shift_util.c index 9f5aeb2e38..75711d56d1 100644 --- a/src/gromacs/gmxlib/shift_util.c +++ b/src/gromacs/gmxlib/shift_util.c @@ -65,7 +65,7 @@ static tMPI_Thread_mutex_t shift_mutex = TMPI_THREAD_MUTEX_INITIALIZER; #endif -void set_shift_consts(FILE *log, real r1, real rc, rvec box, t_forcerec *fr) +void set_shift_consts(real r1, real rc, rvec box) { #ifdef GMX_THREAD_MPI /* at the very least we shouldn't allow multiple threads to set these diff --git a/src/gromacs/gmxlib/smalloc.c b/src/gromacs/gmxlib/smalloc.c index a21cd8a32f..9ebdd67080 100644 --- a/src/gromacs/gmxlib/smalloc.c +++ b/src/gromacs/gmxlib/smalloc.c @@ -243,7 +243,7 @@ void *save_realloc(const char *name, const char *file, int line, void *ptr, return p; } -void save_free(const char *name, const char *file, int line, void *ptr) +void save_free(const char gmx_unused *name, const char gmx_unused *file, int gmx_unused line, void gmx_unused *ptr) { #ifdef DEBUG log_action(0, name, file, line, 0, 0, ptr); diff --git a/src/gromacs/gmxlib/splitter.c b/src/gromacs/gmxlib/splitter.c index 80f1262564..d296581e0f 100644 --- a/src/gromacs/gmxlib/splitter.c +++ b/src/gromacs/gmxlib/splitter.c @@ -481,7 +481,7 @@ static t_border *mk_border(FILE *fp, int natom, atom_id *invcgs, return bor; } -static void split_blocks(FILE *fp, t_inputrec *ir, int nnodes, +static void split_blocks(FILE *fp, int nnodes, t_block *cgs, t_blocka *sblock, real capacity[], int *multinr_cgs) { @@ -600,7 +600,7 @@ static int sid_comp(const void *a, const void *b) } } -static int mk_grey(int nnodes, egCol egc[], t_graph *g, int *AtomI, +static int mk_grey(egCol egc[], t_graph *g, int *AtomI, int maxsid, t_sid sid[]) { int j, ng, ai, aj, g0; @@ -735,7 +735,7 @@ static int mk_sblocks(FILE *fp, t_graph *g, int maxsid, t_sid sid[]) /* Make all the neighbours of this black node grey * and set their block number */ - ng = mk_grey(nnodes, egc, g, &fG, maxsid, sid); + ng = mk_grey(egc, g, &fG, maxsid, sid); /* ng is the number of white nodes made grey */ nG += ng; nW -= ng; @@ -773,7 +773,7 @@ static int ms_comp(const void *a, const void *b) } } -static int merge_sid(int i0, int at_start, int at_end, int nsid, t_sid sid[], +static int merge_sid(int at_start, int at_end, int nsid, t_sid sid[], t_blocka *sblock) { int i, j, k, n, isid, ndel; @@ -941,7 +941,7 @@ void gen_sblocks(FILE *fp, int at_start, int at_end, * part of the shake block too. There may be cases where blocks overlap * and they will have to be merged. */ - nsid = merge_sid(i0, at_start, at_end, nsid, sid, sblock); + nsid = merge_sid(at_start, at_end, nsid, sid, sblock); /* Now sort the shake blocks again... */ /*qsort(sid,natoms,(size_t)sizeof(sid[0]),sid_comp);*/ @@ -1116,7 +1116,7 @@ void split_top(FILE *fp, int nnodes, gmx_localtop_t *top, t_inputrec *ir, t_bloc #endif } - split_blocks(fp, ir, nnodes, &top->cgs, &sblock, capacity, multinr_cgs); + split_blocks(fp, nnodes, &top->cgs, &sblock, capacity, multinr_cgs); homeind = home_index(nnodes, &top->cgs, multinr_cgs); diff --git a/src/gromacs/gmxlib/statutil.cpp b/src/gromacs/gmxlib/statutil.cpp index a4c39f0cd2..1545372773 100644 --- a/src/gromacs/gmxlib/statutil.cpp +++ b/src/gromacs/gmxlib/statutil.cpp @@ -142,7 +142,7 @@ gmx_bool bRmod_fd(double a, double b, double c, gmx_bool bDouble) } } -int check_times2(real t, real t0, real tp, real tpp, gmx_bool bDouble) +int check_times2(real t, real t0, gmx_bool bDouble) { int r; @@ -178,7 +178,7 @@ int check_times2(real t, real t0, real tp, real tpp, gmx_bool bDouble) int check_times(real t) { - return check_times2(t, t, t, t, FALSE); + return check_times2(t, t, FALSE); } diff --git a/src/gromacs/gmxlib/symtab.c b/src/gromacs/gmxlib/symtab.c index 9bd27f9f00..7961ec24f8 100644 --- a/src/gromacs/gmxlib/symtab.c +++ b/src/gromacs/gmxlib/symtab.c @@ -206,7 +206,7 @@ void open_symtab(t_symtab *symtab) symtab->symbuf = NULL; } -void close_symtab(t_symtab *symtab) +void close_symtab(t_symtab gmx_unused *symtab) { } diff --git a/src/gromacs/gmxlib/tpxio.c b/src/gromacs/gmxlib/tpxio.c index 387d429a7d..2999c66b23 100644 --- a/src/gromacs/gmxlib/tpxio.c +++ b/src/gromacs/gmxlib/tpxio.c @@ -582,7 +582,7 @@ static void do_pull(t_fileio *fio, t_pull *pull, gmx_bool bRead, int file_versio } -static void do_rotgrp(t_fileio *fio, t_rotgrp *rotg, gmx_bool bRead, int file_version) +static void do_rotgrp(t_fileio *fio, t_rotgrp *rotg, gmx_bool bRead) { int i; @@ -611,7 +611,7 @@ static void do_rotgrp(t_fileio *fio, t_rotgrp *rotg, gmx_bool bRead, int file_ve gmx_fio_do_real(fio, rotg->PotAngle_step); } -static void do_rot(t_fileio *fio, t_rot *rot, gmx_bool bRead, int file_version) +static void do_rot(t_fileio *fio, t_rot *rot, gmx_bool bRead) { int g; @@ -624,7 +624,7 @@ static void do_rot(t_fileio *fio, t_rot *rot, gmx_bool bRead, int file_version) } for (g = 0; g < rot->ngrp; g++) { - do_rotgrp(fio, &rot->grp[g], bRead, file_version); + do_rotgrp(fio, &rot->grp[g], bRead); } } @@ -1357,7 +1357,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir, gmx_bool bRead, { snew(ir->rot, 1); } - do_rot(fio, ir->rot, bRead, file_version); + do_rot(fio, ir->rot, bRead); } } else @@ -1565,7 +1565,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir, gmx_bool bRead, } -static void do_harm(t_fileio *fio, t_iparams *iparams, gmx_bool bRead) +static void do_harm(t_fileio *fio, t_iparams *iparams) { gmx_fio_do_real(fio, iparams->harmonic.rA); gmx_fio_do_real(fio, iparams->harmonic.krA); @@ -1591,7 +1591,7 @@ void do_iparams(t_fileio *fio, t_functype ftype, t_iparams *iparams, case F_G96BONDS: case F_HARMONIC: case F_IDIHS: - do_harm(fio, iparams, bRead); + do_harm(fio, iparams); if ((ftype == F_ANGRES || ftype == F_ANGRESZ) && bRead) { /* Correct incorrect storage of parameters */ @@ -2358,7 +2358,7 @@ static void do_groups(t_fileio *fio, gmx_groups_t *groups, } static void do_atomtypes(t_fileio *fio, t_atomtypes *atomtypes, gmx_bool bRead, - t_symtab *symtab, int file_version) + int file_version) { int i, j; @@ -2553,8 +2553,7 @@ static void do_moltype(t_fileio *fio, gmx_moltype_t *molt, gmx_bool bRead, do_blocka(fio, &molt->excls, bRead, file_version); } -static void do_molblock(t_fileio *fio, gmx_molblock_t *molb, gmx_bool bRead, - int file_version) +static void do_molblock(t_fileio *fio, gmx_molblock_t *molb, gmx_bool bRead) { int i; @@ -2787,7 +2786,7 @@ static void do_mtop(t_fileio *fio, gmx_mtop_t *mtop, gmx_bool bRead, { for (mb = 0; mb < mtop->nmolblock; mb++) { - do_molblock(fio, &mtop->molblock[mb], bRead, file_version); + do_molblock(fio, &mtop->molblock[mb], bRead); } gmx_fio_do_int(fio, mtop->natoms); } @@ -2800,7 +2799,7 @@ static void do_mtop(t_fileio *fio, gmx_mtop_t *mtop, gmx_bool bRead, mtop->molblock[0].nposres_xB = 0; } - do_atomtypes (fio, &(mtop->atomtypes), bRead, &(mtop->symtab), file_version); + do_atomtypes (fio, &(mtop->atomtypes), bRead, file_version); if (bRead && debug) { pr_atomtypes(debug, 0, "atomtypes", &mtop->atomtypes, TRUE); @@ -2996,7 +2995,7 @@ static void do_tpxheader(t_fileio *fio, gmx_bool bRead, t_tpxheader *tpx, if ((fver <= tpx_incompatible_version) || ((fver > tpx_version) && !TopOnlyOK) || - (fgen > tpx_generation) || + (fgen > tpx_generation) || tpx_version == 80) /*80 was used by both 5.0-dev and 4.6-dev*/ { gmx_fatal(FARGS, "reading tpx file (%s) version %d with version %d program", diff --git a/src/gromacs/gmxlib/trnio.c b/src/gromacs/gmxlib/trnio.c index 90bb016eec..c8784a5377 100644 --- a/src/gromacs/gmxlib/trnio.c +++ b/src/gromacs/gmxlib/trnio.c @@ -168,7 +168,7 @@ void pr_trnheader(FILE *fp, int indent, char *title, t_trnheader *sh) } } -static gmx_bool do_htrn(t_fileio *fio, gmx_bool bRead, t_trnheader *sh, +static gmx_bool do_htrn(t_fileio *fio, t_trnheader *sh, rvec *box, rvec *x, rvec *v, rvec *f) { matrix pv; @@ -249,7 +249,7 @@ static gmx_bool do_trn(t_fileio *fio, gmx_bool bRead, int *step, real *t, real * gmx_file("symbol table in trn file"); } } - bOK = do_htrn(fio, bRead, sh, box, x, v, f); + bOK = do_htrn(fio, sh, box, x, v, f); sfree(sh); @@ -319,7 +319,7 @@ gmx_bool fread_trn(t_fileio *fio, int *step, real *t, real *lambda, gmx_bool fread_htrn(t_fileio *fio, t_trnheader *trn, rvec *box, rvec *x, rvec *v, rvec *f) { - return do_htrn(fio, TRUE, trn, box, x, v, f); + return do_htrn(fio, trn, box, x, v, f); } t_fileio *open_trn(const char *fn, const char *mode) diff --git a/src/gromacs/gmxlib/trxio.c b/src/gromacs/gmxlib/trxio.c index 46c9d001af..367c2b1210 100644 --- a/src/gromacs/gmxlib/trxio.c +++ b/src/gromacs/gmxlib/trxio.c @@ -870,7 +870,7 @@ gmx_bool read_next_frame(const output_env_t oenv, t_trxstatus *status, t_trxfram break; default: #ifdef GMX_USE_PLUGINS - bRet = read_next_vmd_frame(dummy, fr); + bRet = read_next_vmd_frame(fr); #else gmx_fatal(FARGS, "DEATH HORROR in read_next_frame ftp=%s,status=%s", ftp2ext(gmx_fio_getftp(status->fio)), @@ -886,7 +886,7 @@ gmx_bool read_next_frame(const output_env_t oenv, t_trxstatus *status, t_trxfram bSkip = FALSE; if (!bMissingData) { - ct = check_times2(fr->time, fr->t0, fr->tpf, fr->tppf, fr->bDouble); + ct = check_times2(fr->time, fr->t0, fr->bDouble); if (ct == 0 || ((fr->flags & TRX_DONT_SKIP) && ct < 0)) { printcount(status, oenv, fr->time, FALSE); @@ -1029,7 +1029,7 @@ int read_first_frame(const output_env_t oenv, t_trxstatus **status, "GROMACS will now assume it to be a trajectory and will try to open it using the VMD plug-ins.\n" "This will only work in case the VMD plugins are found and it is a trajectory format supported by VMD.\n", fn); gmx_fio_fp_close(fio); /*only close the file without removing FIO entry*/ - if (!read_first_vmd_frame(&dummy, fn, fr, flags)) + if (!read_first_vmd_frame(fn, fr)) { gmx_fatal(FARGS, "Not supported in read_first_frame: %s", fn); } @@ -1082,7 +1082,7 @@ int read_first_x(const output_env_t oenv, t_trxstatus **status, const char *fn, } gmx_bool read_next_x(const output_env_t oenv, t_trxstatus *status, real *t, - int natoms, rvec x[], matrix box) + rvec x[], matrix box) { gmx_bool bRet; diff --git a/src/gromacs/gmxlib/txtdump.c b/src/gromacs/gmxlib/txtdump.c index f5c3966b5f..c65b8ff8a0 100644 --- a/src/gromacs/gmxlib/txtdump.c +++ b/src/gromacs/gmxlib/txtdump.c @@ -563,7 +563,7 @@ static void pr_pullgrp(FILE *fp, int indent, int g, t_pullgrp *pg) PR("kB", pg->kB); } -static void pr_simtempvals(FILE *fp, int indent, t_simtemp *simtemp, int n_lambda, gmx_bool bMDPformat) +static void pr_simtempvals(FILE *fp, int indent, t_simtemp *simtemp, int n_lambda) { PR("simtemp_low", simtemp->simtemp_low); PR("simtemp_high", simtemp->simtemp_high); @@ -571,7 +571,7 @@ static void pr_simtempvals(FILE *fp, int indent, t_simtemp *simtemp, int n_lambd pr_rvec(fp, indent, "simulated tempering temperatures", simtemp->temperatures, n_lambda, TRUE); } -static void pr_expandedvals(FILE *fp, int indent, t_expanded *expand, int n_lambda, gmx_bool bMDPformat) +static void pr_expandedvals(FILE *fp, int indent, t_expanded *expand, int n_lambda) { PI("nstexpanded", expand->nstexpanded); @@ -843,7 +843,7 @@ void pr_inputrec(FILE *fp, int indent, const char *title, t_inputrec *ir, PS("bSimTemp", EBOOL(ir->bSimTemp)); if (ir->bSimTemp) { - pr_simtempvals(fp, indent, ir->simtempvals, ir->fepvals->n_lambda, bMDPformat); + pr_simtempvals(fp, indent, ir->simtempvals, ir->fepvals->n_lambda); } PS("free-energy", EFEPTYPE(ir->efep)); if (ir->efep != efepNO || ir->bSimTemp) @@ -852,7 +852,7 @@ void pr_inputrec(FILE *fp, int indent, const char *title, t_inputrec *ir, } if (ir->bExpanded) { - pr_expandedvals(fp, indent, ir->expandedvals, ir->fepvals->n_lambda, bMDPformat); + pr_expandedvals(fp, indent, ir->expandedvals, ir->fepvals->n_lambda); } PI("nwall", ir->nwall); @@ -1530,8 +1530,7 @@ static void pr_atom(FILE *fp, int indent, const char *title, t_atom *atom, int n } } -static void pr_grps(FILE *fp, int indent, const char *title, t_grps grps[], - char **grpname[], gmx_bool bShowNumbers) +static void pr_grps(FILE *fp, const char *title, t_grps grps[], char **grpname[]) { int i, j; @@ -1546,14 +1545,14 @@ static void pr_grps(FILE *fp, int indent, const char *title, t_grps grps[], } } -static void pr_groups(FILE *fp, int indent, const char *title, +static void pr_groups(FILE *fp, int indent, gmx_groups_t *groups, gmx_bool bShowNumbers) { int grpnr[egcNR]; int nat_max, i, g; - pr_grps(fp, indent, "grp", groups->grps, groups->grpname, bShowNumbers); + pr_grps(fp, "grp", groups->grps, groups->grpname); pr_strings(fp, indent, "grpname", groups->grpname, groups->ngrpname, bShowNumbers); (void) pr_indent(fp, indent); @@ -1655,8 +1654,7 @@ static void pr_moltype(FILE *fp, int indent, const char *title, static void pr_molblock(FILE *fp, int indent, const char *title, gmx_molblock_t *molb, int n, - gmx_moltype_t *molt, - gmx_bool bShowNumbers) + gmx_moltype_t *molt) { indent = pr_title_n(fp, indent, title, n); (void) pr_indent(fp, indent); @@ -1690,8 +1688,7 @@ void pr_mtop(FILE *fp, int indent, const char *title, gmx_mtop_t *mtop, pr_int(fp, indent, "#molblock", mtop->nmolblock); for (mb = 0; mb < mtop->nmolblock; mb++) { - pr_molblock(fp, indent, "molblock", &mtop->molblock[mb], mb, - mtop->moltype, bShowNumbers); + pr_molblock(fp, indent, "molblock", &mtop->molblock[mb], mb, mtop->moltype); } pr_ffparams(fp, indent, "ffparams", &(mtop->ffparams), bShowNumbers); pr_atomtypes(fp, indent, "atomtypes", &(mtop->atomtypes), bShowNumbers); @@ -1700,7 +1697,7 @@ void pr_mtop(FILE *fp, int indent, const char *title, gmx_mtop_t *mtop, pr_moltype(fp, indent, "moltype", &mtop->moltype[mt], mt, &mtop->ffparams, bShowNumbers); } - pr_groups(fp, indent, "groups", &mtop->groups, bShowNumbers); + pr_groups(fp, indent, &mtop->groups, bShowNumbers); } } diff --git a/src/gromacs/gmxlib/vmdio.c b/src/gromacs/gmxlib/vmdio.c index aa9b9def64..b27e02ae69 100644 --- a/src/gromacs/gmxlib/vmdio.c +++ b/src/gromacs/gmxlib/vmdio.c @@ -156,7 +156,7 @@ static int load_sharedlibrary_plugins(const char *fullpath, t_gmxvmdplugin* vmdp } /*return: 1: success, 0: last frame, -1: error*/ -gmx_bool read_next_vmd_frame(int status, t_trxframe *fr) +gmx_bool read_next_vmd_frame(t_trxframe *fr) { int rc, i; rvec vec, angle; @@ -367,7 +367,7 @@ static int load_vmd_library(const char *fn, t_gmxvmdplugin *vmdplugin) } -int read_first_vmd_frame(int *status, const char *fn, t_trxframe *fr, int flags) +int read_first_vmd_frame(const char *fn, t_trxframe *fr) { molfile_timestep_metadata_t *metadata = NULL; diff --git a/src/gromacs/gmxlib/vmdio.h b/src/gromacs/gmxlib/vmdio.h index ca270f9a83..166b8b327e 100644 --- a/src/gromacs/gmxlib/vmdio.h +++ b/src/gromacs/gmxlib/vmdio.h @@ -34,8 +34,8 @@ struct gmxvmdplugin gmx_bool bV; }; -int read_first_vmd_frame(int *status, const char *fn, struct trxframe *fr, int flags); -gmx_bool read_next_vmd_frame(int status, struct trxframe *fr); +int read_first_vmd_frame(const char *fn, struct trxframe *fr); +gmx_bool read_next_vmd_frame(struct trxframe *fr); #ifdef __cplusplus } diff --git a/src/gromacs/gmxlib/xdrd.c b/src/gromacs/gmxlib/xdrd.c index d5181e4797..1746883557 100644 --- a/src/gromacs/gmxlib/xdrd.c +++ b/src/gromacs/gmxlib/xdrd.c @@ -92,7 +92,7 @@ int xdr3drcoord(XDR *xdrs, real *fp, int *size, real *precision) #endif } -int xdr_gmx_large_int(XDR *xdrs, gmx_large_int_t *i, const char *warn) +int xdr_gmx_large_int(XDR *xdrs, gmx_large_int_t *i) { /* This routine stores values compatible with xdr_int64_t */ diff --git a/src/gromacs/gmxlib/xtcio.c b/src/gromacs/gmxlib/xtcio.c index 36a1deebc1..2e1d7d6204 100644 --- a/src/gromacs/gmxlib/xtcio.c +++ b/src/gromacs/gmxlib/xtcio.c @@ -49,7 +49,7 @@ #define XTC_MAGIC 1995 -static int xdr_r2f(XDR *xdrs, real *r, gmx_bool bRead) +static int xdr_r2f(XDR *xdrs, real *r, gmx_bool gmx_unused bRead) { #ifdef GMX_DOUBLE float f; diff --git a/src/gromacs/gmxpreprocess/readir.c b/src/gromacs/gmxpreprocess/readir.c index bc8a72ab64..a0221554e5 100644 --- a/src/gromacs/gmxpreprocess/readir.c +++ b/src/gromacs/gmxpreprocess/readir.c @@ -1671,7 +1671,7 @@ void get_ir(const char *mdparin, const char *mdparout, t_lambda *fep = ir->fepvals; t_expanded *expand = ir->expandedvals; - inp = read_inpfile(mdparin, &ninp, NULL, wi); + inp = read_inpfile(mdparin, &ninp, wi); snew(dumstr[0], STRLEN); snew(dumstr[1], STRLEN); diff --git a/src/gromacs/legacyheaders/coulomb.h b/src/gromacs/legacyheaders/coulomb.h index 7347f7aa63..9b76c6601e 100644 --- a/src/gromacs/legacyheaders/coulomb.h +++ b/src/gromacs/legacyheaders/coulomb.h @@ -47,7 +47,7 @@ extern "C" { /* Ewald related stuff */ void -init_ewald_tab(ewald_tab_t *et, const t_commrec *cr, const t_inputrec *ir, +init_ewald_tab(ewald_tab_t *et, const t_inputrec *ir, FILE *fp); /* initialize the ewald table (as found in the t_forcerec) */ @@ -69,8 +69,7 @@ do_ewald(FILE *log, gmx_bool bVerbose, /* Do an Ewald calculation for the long range electrostatics. */ real -ewald_LRcorrection(FILE *fp, - int start, int end, +ewald_LRcorrection(int start, int end, t_commrec *cr, int thread, t_forcerec *fr, real *chargeA, real *chargeB, gmx_bool calc_excl_corr, @@ -95,8 +94,7 @@ ewald_charge_correction(t_commrec *cr, t_forcerec *fr, real lambda, matrix box, * of potentials and forces. */ void -set_shift_consts(FILE *log, real r1, real rc, rvec box, - t_forcerec *fr); +set_shift_consts(real r1, real rc, rvec box); #ifdef __cplusplus } diff --git a/src/gromacs/legacyheaders/gmx_thread_affinity.h b/src/gromacs/legacyheaders/gmx_thread_affinity.h index bb4b9a07a9..d120a322c2 100644 --- a/src/gromacs/legacyheaders/gmx_thread_affinity.h +++ b/src/gromacs/legacyheaders/gmx_thread_affinity.h @@ -51,9 +51,7 @@ void gmx_set_thread_affinity(FILE *fplog, const t_commrec *cr, gmx_hw_opt_t *hw_opt, - int nthreads_pme, - const gmx_hw_info_t *hwinfo, - const t_inputrec *inputrec); + const gmx_hw_info_t *hwinfo); /* Check the process affinity mask and if it is found to be non-zero, * will honor it and disable mdrun internal affinity setting. diff --git a/src/gromacs/legacyheaders/gpu_utils.h b/src/gromacs/legacyheaders/gpu_utils.h index 8be754de4d..33fe41482c 100644 --- a/src/gromacs/legacyheaders/gpu_utils.h +++ b/src/gromacs/legacyheaders/gpu_utils.h @@ -54,42 +54,42 @@ extern "C" { #endif FUNC_QUALIFIER -int do_quick_memtest(int dev_id) FUNC_TERM_INT +int do_quick_memtest(int gmx_unused dev_id) FUNC_TERM_INT FUNC_QUALIFIER -int do_full_memtest(int dev_id) FUNC_TERM_INT +int do_full_memtest(int gmx_unused dev_id) FUNC_TERM_INT FUNC_QUALIFIER -int do_timed_memtest(int dev_id, int time_limit) FUNC_TERM_INT +int do_timed_memtest(int gmx_unused dev_id, int gmx_unused time_limit) FUNC_TERM_INT FUNC_QUALIFIER -int detect_cuda_gpus(gmx_gpu_info_t *gpu_info, char *err_str) FUNC_TERM_INT +int detect_cuda_gpus(gmx_gpu_info_t gmx_unused *gpu_info, char gmx_unused *err_str) FUNC_TERM_INT FUNC_QUALIFIER -void pick_compatible_gpus(gmx_gpu_info_t *gpu_info) FUNC_TERM_VOID +void pick_compatible_gpus(gmx_gpu_info_t gmx_unused *gpu_info) FUNC_TERM_VOID FUNC_QUALIFIER -gmx_bool check_select_cuda_gpus(int *checkres, gmx_gpu_info_t *gpu_info, - const int *requested_devs, int count) FUNC_TERM_INT +gmx_bool check_select_cuda_gpus(int gmx_unused *checkres, gmx_gpu_info_t gmx_unused *gpu_info, + const int gmx_unused *requested_devs, int gmx_unused count) FUNC_TERM_INT FUNC_QUALIFIER -void free_gpu_info(const gmx_gpu_info_t *gpu_info) FUNC_TERM_VOID +void free_gpu_info(const gmx_gpu_info_t gmx_unused *gpu_info) FUNC_TERM_VOID FUNC_QUALIFIER -gmx_bool init_gpu(int mygpu, char *result_str, const gmx_gpu_info_t *gpu_info) FUNC_TERM_INT +gmx_bool init_gpu(int gmx_unused mygpu, char gmx_unused *result_str, const gmx_gpu_info_t gmx_unused *gpu_info) FUNC_TERM_INT FUNC_QUALIFIER -gmx_bool free_gpu(char *result_str) FUNC_TERM_INT +gmx_bool free_gpu(char gmx_unused *result_str) FUNC_TERM_INT /*! \brief Returns the device ID of the GPU currently in use.*/ FUNC_QUALIFIER int get_current_gpu_device_id(void) FUNC_TERM_INT FUNC_QUALIFIER -int get_gpu_device_id(const gmx_gpu_info_t *gpu_info, int index) FUNC_TERM_INT +int get_gpu_device_id(const gmx_gpu_info_t gmx_unused *gpu_info, int gmx_unused index) FUNC_TERM_INT FUNC_QUALIFIER -void get_gpu_device_info_string(char *s, const gmx_gpu_info_t *gpu_info, int index) FUNC_TERM_VOID +void get_gpu_device_info_string(char gmx_unused *s, const gmx_gpu_info_t gmx_unused *gpu_info, int gmx_unused index) FUNC_TERM_VOID #ifdef __cplusplus } diff --git a/src/gromacs/legacyheaders/nrnb.h b/src/gromacs/legacyheaders/nrnb.h index 62cbc70c8e..14b90e1477 100644 --- a/src/gromacs/legacyheaders/nrnb.h +++ b/src/gromacs/legacyheaders/nrnb.h @@ -65,10 +65,9 @@ void print_flop(FILE *out, t_nrnb *nrnb, double *nbfs, double *mflop); * When out!=NULL also prints the full count table. */ -void print_perf(FILE *out, double nodetime, double realtime, int nprocs, +void print_perf(FILE *out, double nodetime, double realtime, gmx_large_int_t nsteps, real delta_t, - double nbfs, double mflop, - int omp_nth_pp); + double nbfs, double mflop); /* Prints the performance, nbfs and mflop come from print_flop */ void pr_load(FILE *log, t_commrec *cr, t_nrnb nrnb[]); diff --git a/src/gromacs/legacyheaders/random.h b/src/gromacs/legacyheaders/random.h index f04c84faf8..df1706ec67 100644 --- a/src/gromacs/legacyheaders/random.h +++ b/src/gromacs/legacyheaders/random.h @@ -54,7 +54,7 @@ void maxwell_speed(real tempi, int seed, gmx_mtop_t *mtop, rvec v[]); /* Generate velocites according to a maxwellian distribution */ -real calc_cm(FILE *log, int natoms, real mass[], rvec x[], rvec v[], +real calc_cm(int natoms, real mass[], rvec x[], rvec v[], rvec xcm, rvec vcm, rvec acm, matrix L); /* Calculate the c.o.m. position, velocity, acceleration and the * moment of Inertia. Returns the total mass. diff --git a/src/gromacs/legacyheaders/readinp.h b/src/gromacs/legacyheaders/readinp.h index a3564265e3..5bfc294ad7 100644 --- a/src/gromacs/legacyheaders/readinp.h +++ b/src/gromacs/legacyheaders/readinp.h @@ -60,7 +60,6 @@ typedef struct { t_inpfile *read_inpfile(const char *fn, int *ninp, - char **cppopts, warninp_t wi); /* Create & populate a t_inpfile struct from values in file fn. fn = the file name diff --git a/src/gromacs/legacyheaders/rmpbc.h b/src/gromacs/legacyheaders/rmpbc.h index 035cad322f..523e10edc8 100644 --- a/src/gromacs/legacyheaders/rmpbc.h +++ b/src/gromacs/legacyheaders/rmpbc.h @@ -44,8 +44,7 @@ extern "C" { typedef struct gmx_rmpbc *gmx_rmpbc_t; -gmx_rmpbc_t gmx_rmpbc_init(t_idef *idef, int ePBC, int natoms, - matrix box); +gmx_rmpbc_t gmx_rmpbc_init(t_idef *idef, int ePBC, int natoms); void gmx_rmpbc_done(gmx_rmpbc_t gpbc); diff --git a/src/gromacs/legacyheaders/sfactor.h b/src/gromacs/legacyheaders/sfactor.h index 03fab42f71..0a99bc7320 100644 --- a/src/gromacs/legacyheaders/sfactor.h +++ b/src/gromacs/legacyheaders/sfactor.h @@ -88,7 +88,7 @@ int do_scattering_intensity (const char* fnTPS, const char* fnNDX, t_complex *** rc_tensor_allocation(int x, int y, int z); -real **compute_scattering_factor_table (gmx_structurefactors_t *gsf, structure_factor_t * sft, int *nsftable); +real **compute_scattering_factor_table (gmx_structurefactors_t *gsf, structure_factor_t * sft); #ifdef __cplusplus } diff --git a/src/gromacs/legacyheaders/statutil.h b/src/gromacs/legacyheaders/statutil.h index f0525396b7..d20669c43f 100644 --- a/src/gromacs/legacyheaders/statutil.h +++ b/src/gromacs/legacyheaders/statutil.h @@ -157,7 +157,7 @@ gmx_bool bRmod_fd(double a, double b, double c, gmx_bool bDouble); #define bRmod(a, b, c) bRmod_fd(a, b, c, FALSE) #endif -int check_times2(real t, real t0, real tp, real tpp, gmx_bool bDouble); +int check_times2(real t, real t0, gmx_bool bDouble); /* This routine checkes if the read-in time is correct or not; * returns -1 if texcl_load[t], fr->excl_load[t+1], + ewald_LRcorrection(fr->excl_load[t], fr->excl_load[t+1], cr, t, fr, md->chargeA, md->nChargePerturbed ? md->chargeB : NULL, diff --git a/src/gromacs/mdlib/forcerec.c b/src/gromacs/mdlib/forcerec.c index 0751b57db4..6d0c97c466 100644 --- a/src/gromacs/mdlib/forcerec.c +++ b/src/gromacs/mdlib/forcerec.c @@ -2454,7 +2454,7 @@ void init_forcerec(FILE *fp, } } fr->ewaldcoeff = calc_ewaldcoeff(ir->rcoulomb, ir->ewald_rtol); - init_ewald_tab(&(fr->ewald_table), cr, ir, fp); + init_ewald_tab(&(fr->ewald_table), ir, fp); if (fp) { fprintf(fp, "Using a Gaussian width (1/beta) of %g nm for Ewald\n", @@ -2486,7 +2486,7 @@ void init_forcerec(FILE *fp, if ((fr->eeltype == eelSHIFT && fr->rcoulomb > fr->rcoulomb_switch)) { - set_shift_consts(fp, fr->rcoulomb_switch, fr->rcoulomb, box_size, fr); + set_shift_consts(fr->rcoulomb_switch, fr->rcoulomb, box_size); } } diff --git a/src/gromacs/mdlib/sim_util.c b/src/gromacs/mdlib/sim_util.c index 62081692fd..c0fd4cd007 100644 --- a/src/gromacs/mdlib/sim_util.c +++ b/src/gromacs/mdlib/sim_util.c @@ -2584,16 +2584,12 @@ void finish_run(FILE *fplog, t_commrec *cr, const char *confout, if (fplog) { print_perf(fplog, runtime->proctime, runtime->realtime, - cr->nnodes-cr->npmenodes, - runtime->nsteps_done, delta_t, nbfs, mflop, - omp_nth_pp); + runtime->nsteps_done, delta_t, nbfs, mflop); } if (bWriteStat) { print_perf(stderr, runtime->proctime, runtime->realtime, - cr->nnodes-cr->npmenodes, - runtime->nsteps_done, delta_t, nbfs, mflop, - omp_nth_pp); + runtime->nsteps_done, delta_t, nbfs, mflop); } } } diff --git a/src/gromacs/mdlib/tpi.c b/src/gromacs/mdlib/tpi.c index 652f3a9a02..313da318d5 100644 --- a/src/gromacs/mdlib/tpi.c +++ b/src/gromacs/mdlib/tpi.c @@ -115,22 +115,22 @@ static void realloc_bins(double **bin, int *nbin, int nbin_new) double do_tpi(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[], - const output_env_t oenv, gmx_bool bVerbose, gmx_bool bCompact, - int nstglobalcomm, - gmx_vsite_t *vsite, gmx_constr_t constr, - int stepout, + const output_env_t oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact, + int gmx_unused nstglobalcomm, + gmx_vsite_t gmx_unused *vsite, gmx_constr_t gmx_unused constr, + int gmx_unused stepout, t_inputrec *inputrec, gmx_mtop_t *top_global, t_fcdata *fcd, t_state *state, t_mdatoms *mdatoms, t_nrnb *nrnb, gmx_wallcycle_t wcycle, - gmx_edsam_t ed, + gmx_edsam_t gmx_unused ed, t_forcerec *fr, - int repl_ex_nst, int repl_ex_nex, int repl_ex_seed, - gmx_membed_t membed, - real cpt_period, real max_hours, - const char *deviceOptions, - unsigned long Flags, + int gmx_unused repl_ex_nst, int gmx_unused repl_ex_nex, int gmx_unused repl_ex_seed, + gmx_membed_t gmx_unused membed, + real gmx_unused cpt_period, real gmx_unused max_hours, + const char gmx_unused *deviceOptions, + unsigned long gmx_unused Flags, gmx_runtime_t *runtime) { const char *TPI = "Test Particle Insertion"; diff --git a/src/gromacs/trajectoryanalysis/runnercommon.cpp b/src/gromacs/trajectoryanalysis/runnercommon.cpp index 91896fa9f2..047bbbc024 100644 --- a/src/gromacs/trajectoryanalysis/runnercommon.cpp +++ b/src/gromacs/trajectoryanalysis/runnercommon.cpp @@ -417,7 +417,7 @@ TrajectoryAnalysisRunnerCommon::initFirstFrame() if (top.hasTopology() && impl_->settings_.hasRmPBC()) { impl_->gpbc_ = gmx_rmpbc_init(&top.topology()->idef, top.ePBC(), - impl_->fr->natoms, impl_->fr->box); + impl_->fr->natoms); } } diff --git a/src/programs/mdrun/gctio.c b/src/programs/mdrun/gctio.c index 9f39277ca9..f6207b19b4 100644 --- a/src/programs/mdrun/gctio.c +++ b/src/programs/mdrun/gctio.c @@ -499,7 +499,7 @@ void read_gct(const char *fn, t_coupl_rec *tcr) wi = init_warning(FALSE, 0); - inp = read_inpfile(fn, &ninp, NULL, wi); + inp = read_inpfile(fn, &ninp, wi); for (i = 0; (i < eoObsNR); i++) { diff --git a/src/programs/mdrun/membed.c b/src/programs/mdrun/membed.c index 49d5e338c1..52ce5b8b8b 100644 --- a/src/programs/mdrun/membed.c +++ b/src/programs/mdrun/membed.c @@ -233,7 +233,7 @@ static void get_input(const char *membed_input, real *xy_fac, real *xy_max, real wi = init_warning(TRUE, 0); - inp = read_inpfile(membed_input, &ninp, NULL, wi); + inp = read_inpfile(membed_input, &ninp, wi); ITYPE ("nxy", *it_xy, 1000); ITYPE ("nz", *it_z, 0); RTYPE ("xyinit", *xy_fac, 0.5); diff --git a/src/programs/mdrun/runner.c b/src/programs/mdrun/runner.c index 74443871a5..7db1f502da 100644 --- a/src/programs/mdrun/runner.c +++ b/src/programs/mdrun/runner.c @@ -1511,7 +1511,7 @@ int mdrunner(gmx_hw_opt_t *hw_opt, hw_opt, hwinfo->nthreads_hw_avail, TRUE); /* Set the CPU affinity */ - gmx_set_thread_affinity(fplog, cr, hw_opt, nthreads_pme, hwinfo, inputrec); + gmx_set_thread_affinity(fplog, cr, hw_opt, hwinfo); } /* Initiate PME if necessary, -- 2.22.0