if(NOT GMX_OPENMP)
GMX_TEST_CFLAG(CFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CFLAGS)
endif()
- GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused -Wunused-value" GMXC_CFLAGS)
+ GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused -Wunused-value -Wunused-parameter" GMXC_CFLAGS)
GMX_TEST_CFLAG(CFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wno-sign-compare" GMXC_CFLAGS)
# new in gcc 4.5
GMX_TEST_CFLAG(CFLAGS_EXCESS_PREC "-fexcess-precision=fast" GMXC_CFLAGS_RELEASE)
if(NOT GMX_OPENMP)
GMX_TEST_CFLAG(CFLAGS_PRAGMA "-Wno-unknown-pragmas" GMXC_CFLAGS)
endif()
- GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused -Wunused-value" GMXC_CFLAGS)
+ GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused -Wunused-value -Wunused-parameter" GMXC_CFLAGS)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
#include <errno.h>
#include "gromacs/fft/fft.h"
+#include "gromacs/legacyheaders/types/simple.h"
#include "gmx_fatal.h"
#include "external/fftpack/fftpack.h"
int
gmx_fft_init_1d(gmx_fft_t * pfft,
int nx,
- int flags)
+ int gmx_unused flags)
{
gmx_fft_t fft;
int
gmx_fft_init_1d_real(gmx_fft_t * pfft,
int nx,
- int flags)
+ int gmx_unused flags)
{
gmx_fft_t fft;
static xdr_int32_t *
xdrstdio_inline (XDR *xdrs, int len)
{
+ (void)xdrs;
+ (void)len;
/*
* Must do some work to implement this: must insure
* enough data in the underlying stdio buffer,
static real* d2r(const double *d, const int nn);
-extern real fitGemRecomb(double *ct, double *time, double **ctFit,
- const int nData, t_gemParams *params)
+extern real fitGemRecomb(double gmx_unused *ct,
+ double gmx_unused *time,
+ double gmx_unused **ctFit,
+ const int gmx_unused nData,
+ t_gemParams gmx_unused *params)
{
int nThreads, i, iter, status, maxiter;
/* Removes the ballistic term from the beginning of the ACF,
* just like in Omer's paper.
*/
-extern void takeAwayBallistic(double *ct, double *t, int len, real tMax, int nexp, gmx_bool bDerivative)
+extern void takeAwayBallistic(double gmx_unused *ct, double *t, int len, real tMax, int nexp, gmx_bool gmx_unused bDerivative)
{
/* Use nonlinear regression with GSL instead.
}
#else
-static real optimize_luzar_parameters(FILE *fp, t_luzar *tl, int maxiter,
- real tol)
+static real optimize_luzar_parameters(FILE gmx_unused *fp,
+ t_luzar gmx_unused *tl,
+ int gmx_unused maxiter,
+ real gmx_unused tol)
{
fprintf(stderr, "This program needs the GNU scientific library to work.\n");
return -1;
}
-static real quality_of_fit(real chi2, int N)
+static real quality_of_fit(real gmx_unused chi2, int gmx_unused N)
{
fprintf(stderr, "This program needs the GNU scientific library to work.\n");
static int gmx_count_gpu_dev_unique(const gmx_gpu_info_t *gpu_info,
const gmx_gpu_opt_t *gpu_opt);
-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];
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);
}
}
}
-static void parse_gpu_id_csv_string(const char *idstr, int *nid, int *idlist)
+static void parse_gpu_id_csv_string(const char gmx_unused *idstr, int gmx_unused *nid, int gmx_unused *idlist)
{
/* XXX implement cvs format to support more than 10 different GPUs in a box. */
gmx_incons("Not implemented yet");
* 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(const t_commrec gmx_unused *cr)
{
int ret = 0;
return ret;
}
-static void gmx_detect_gpus(FILE *fplog, const t_commrec *cr,
- gmx_gpu_info_t *gpu_info)
+static void gmx_detect_gpus(FILE *fplog, const t_commrec *cr)
{
#ifdef GMX_LIB_MPI
int rank_world;
}
/* detect number of hardware threads */
- hwinfo_g->nthreads_hw_avail = get_nthreads_hw_avail(fplog, cr);
+ hwinfo_g->nthreads_hw_avail = get_nthreads_hw_avail(cr);
/* detect GPUs */
hwinfo_g->gpu_info.ncuda_dev = 0;
getenv("GMX_DISABLE_GPU_DETECTION") == NULL);
if (hwinfo_g->gpu_info.bDetectGPUs)
{
- gmx_detect_gpus(fplog, cr, &hwinfo_g->gpu_info);
+ gmx_detect_gpus(fplog, cr);
}
}
/* increase the reference counter */
* Note that this will only work on Linux as we use a GNU feature.
*/
void
-gmx_check_thread_affinity_set(FILE *fplog, const t_commrec *cr,
- gmx_hw_opt_t *hw_opt, int ncpus,
- gmx_bool bAfterOpenmpInit)
+gmx_check_thread_affinity_set(FILE gmx_unused *fplog,
+ const t_commrec gmx_unused *cr,
+ gmx_hw_opt_t gmx_unused *hw_opt,
+ int gmx_unused ncpus,
+ gmx_bool gmx_unused bAfterOpenmpInit)
{
#ifdef HAVE_SCHED_GETAFFINITY
cpu_set_t mask_current;
}
-gmx_bool gmx_isfinite(real x)
+gmx_bool gmx_isfinite(real gmx_unused x)
{
gmx_bool returnval = TRUE;
/* If no suitable function was found, assume the value is
#endif
}
-void gmx_fill_commrec_from_mpi(t_commrec *cr)
+void gmx_fill_commrec_from_mpi(t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_fill_commrec_from_mpi");
return cr;
}
-t_commrec *reinitialize_commrec_for_this_thread(const t_commrec *cro)
+t_commrec *reinitialize_commrec_for_this_thread(const t_commrec gmx_unused *cro)
{
#ifdef GMX_THREAD_MPI
t_commrec *cr;
}
-void gmx_barrier(const t_commrec *cr)
+void gmx_barrier(const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_barrier");
#endif
}
-void gmx_bcast(int nbytes, void *b, const t_commrec *cr)
+void gmx_bcast(int gmx_unused nbytes, void gmx_unused *b, const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_bast");
#endif
}
-void gmx_bcast_sim(int nbytes, void *b, const t_commrec *cr)
+void gmx_bcast_sim(int gmx_unused nbytes, void gmx_unused *b, const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_bast");
#endif
}
-void gmx_sumd(int nr, double r[], const t_commrec *cr)
+void gmx_sumd(int gmx_unused nr, double gmx_unused r[], const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_sumd");
#endif
}
-void gmx_sumf(int nr, float r[], const t_commrec *cr)
+void gmx_sumf(int gmx_unused nr, float gmx_unused r[], const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_sumf");
#endif
}
-void gmx_sumi(int nr, int r[], const t_commrec *cr)
+void gmx_sumi(int gmx_unused nr, int gmx_unused r[], const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_sumi");
#endif
}
-void gmx_sumli(int nr, gmx_large_int_t r[], const t_commrec *cr)
+void gmx_sumli(int gmx_unused nr, gmx_large_int_t gmx_unused r[], const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_sumli");
}
#endif
-void gmx_sumd_sim(int nr, double r[], const gmx_multisim_t *ms)
+void gmx_sumd_sim(int gmx_unused nr, double gmx_unused r[], const gmx_multisim_t gmx_unused *ms)
{
#ifndef GMX_MPI
gmx_call("gmx_sumd_sim");
#endif
}
-void gmx_sumf_sim(int nr, float r[], const gmx_multisim_t *ms)
+void gmx_sumf_sim(int gmx_unused nr, float gmx_unused r[], const gmx_multisim_t gmx_unused *ms)
{
#ifndef GMX_MPI
gmx_call("gmx_sumf_sim");
#endif
}
-void gmx_sumi_sim(int nr, int r[], const gmx_multisim_t *ms)
+void gmx_sumi_sim(int gmx_unused nr, int gmx_unused r[], const gmx_multisim_t gmx_unused *ms)
{
#ifndef GMX_MPI
gmx_call("gmx_sumi_sim");
#endif
}
-void gmx_sumli_sim(int nr, gmx_large_int_t r[], const gmx_multisim_t *ms)
+void gmx_sumli_sim(int gmx_unused nr, gmx_large_int_t gmx_unused r[], const gmx_multisim_t gmx_unused *ms)
{
#ifndef GMX_MPI
gmx_call("gmx_sumli_sim");
FUNC_QUALIFIER
int get_gpu_device_id(const gmx_gpu_info_t gmx_unused *gpu_info,
const gmx_gpu_opt_t gmx_unused *gpu_opt,
- int index) FUNC_TERM_INT
+ int gmx_unused index) FUNC_TERM_INT
FUNC_QUALIFIER
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
}
#endif
-void dd_setup_dlb_resource_sharing(t_commrec *cr,
- const gmx_hw_info_t *hwinfo,
- const gmx_hw_opt_t *hw_opt)
+void dd_setup_dlb_resource_sharing(t_commrec gmx_unused *cr,
+ const gmx_hw_info_t gmx_unused *hwinfo,
+ const gmx_hw_opt_t gmx_unused *hw_opt)
{
#ifdef GMX_MPI
int physicalnode_id_hash;
#endif
}
-static void make_load_communicators(gmx_domdec_t *dd)
+static void make_load_communicators(gmx_domdec_t gmx_unused *dd)
{
#ifdef GMX_MPI
int dim0, dim1, i, j;
}
}
-static void make_pp_communicator(FILE *fplog, t_commrec *cr, int reorder)
+static void make_pp_communicator(FILE *fplog, t_commrec *cr, int gmx_unused reorder)
{
gmx_domdec_t *dd;
gmx_domdec_comm_t *comm;
return ma;
}
-static void split_communicator(FILE *fplog, t_commrec *cr, int dd_node_order,
- int reorder)
+static void split_communicator(FILE *fplog, t_commrec *cr, int gmx_unused dd_node_order,
+ int gmx_unused reorder)
{
gmx_domdec_t *dd;
gmx_domdec_comm_t *comm;
#define DDMASTERRANK(dd) (dd->masterrank)
-void dd_sendrecv_int(const gmx_domdec_t *dd,
- int ddimind, int direction,
- int *buf_s, int n_s,
- int *buf_r, int n_r)
+void dd_sendrecv_int(const gmx_domdec_t gmx_unused *dd,
+ int gmx_unused ddimind, int gmx_unused direction,
+ int gmx_unused *buf_s, int gmx_unused n_s,
+ int gmx_unused *buf_r, int gmx_unused n_r)
{
#ifdef GMX_MPI
int rank_s, rank_r;
#endif
}
-void dd_sendrecv_real(const gmx_domdec_t *dd,
- int ddimind, int direction,
- real *buf_s, int n_s,
- real *buf_r, int n_r)
+void dd_sendrecv_real(const gmx_domdec_t gmx_unused *dd,
+ int gmx_unused ddimind, int gmx_unused direction,
+ real gmx_unused *buf_s, int gmx_unused n_s,
+ real gmx_unused *buf_r, int gmx_unused n_r)
{
#ifdef GMX_MPI
int rank_s, rank_r;
#endif
}
-void dd_sendrecv_rvec(const gmx_domdec_t *dd,
- int ddimind, int direction,
- rvec *buf_s, int n_s,
- rvec *buf_r, int n_r)
+void dd_sendrecv_rvec(const gmx_domdec_t gmx_unused *dd,
+ int gmx_unused ddimind, int gmx_unused direction,
+ rvec gmx_unused *buf_s, int gmx_unused n_s,
+ rvec gmx_unused *buf_r, int gmx_unused n_r)
{
#ifdef GMX_MPI
int rank_s, rank_r;
#endif
}
-void dd_sendrecv2_rvec(const gmx_domdec_t *dd,
- int ddimind,
- rvec *buf_s_fw, int n_s_fw,
- rvec *buf_r_fw, int n_r_fw,
- rvec *buf_s_bw, int n_s_bw,
- rvec *buf_r_bw, int n_r_bw)
+void dd_sendrecv2_rvec(const gmx_domdec_t gmx_unused *dd,
+ int gmx_unused ddimind,
+ rvec gmx_unused *buf_s_fw, int gmx_unused n_s_fw,
+ rvec gmx_unused *buf_r_fw, int gmx_unused n_r_fw,
+ rvec gmx_unused *buf_s_bw, int gmx_unused n_s_bw,
+ rvec gmx_unused *buf_r_bw, int gmx_unused n_r_bw)
{
#ifdef GMX_MPI
int rank_fw, rank_bw, nreq;
* called during DD setup and partition.
*/
-void dd_bcast(gmx_domdec_t *dd, int nbytes, void *data)
+void dd_bcast(gmx_domdec_t gmx_unused *dd, int gmx_unused nbytes, void gmx_unused *data)
{
#ifdef GMX_MPI
#ifdef GMX_BLUEGENE
#endif
}
-void dd_scatter(gmx_domdec_t *dd, int nbytes, void *src, void *dest)
+void dd_scatter(gmx_domdec_t gmx_unused *dd, int gmx_unused nbytes, void gmx_unused *src, void gmx_unused *dest)
{
#ifdef GMX_MPI
MPI_Scatter(src, nbytes, MPI_BYTE,
#endif
}
-void dd_gather(gmx_domdec_t *dd, int nbytes, void *src, void *dest)
+void dd_gather(gmx_domdec_t gmx_unused *dd, int gmx_unused nbytes, void gmx_unused *src, void gmx_unused *dest)
{
#ifdef GMX_MPI
MPI_Gather(src, nbytes, MPI_BYTE,
#endif
}
-void dd_scatterv(gmx_domdec_t *dd,
- int *scounts, int *disps, void *sbuf,
- int rcount, void *rbuf)
+void dd_scatterv(gmx_domdec_t gmx_unused *dd,
+ int gmx_unused *scounts, int gmx_unused *disps, void gmx_unused *sbuf,
+ int gmx_unused rcount, void gmx_unused *rbuf)
{
#ifdef GMX_MPI
int dum;
#endif
}
-void dd_gatherv(gmx_domdec_t *dd,
- int scount, void *sbuf,
- int *rcounts, int *disps, void *rbuf)
+void dd_gatherv(gmx_domdec_t gmx_unused *dd,
+ int gmx_unused scount, void gmx_unused *sbuf,
+ int gmx_unused *rcounts, int gmx_unused *disps, void gmx_unused *rbuf)
{
#ifdef GMX_MPI
int dum;
}
static void init_interaction_const(FILE *fp,
- const t_commrec *cr,
+ const t_commrec gmx_unused *cr,
interaction_const_t **interaction_const,
const t_forcerec *fr,
real rtab)
return 0;
}
-void gb_pd_send(t_commrec *cr, real *send_data, int nr)
+void gb_pd_send(t_commrec gmx_unused *cr, real gmx_unused *send_data, int gmx_unused nr)
{
#ifdef GMX_MPI
int i, cur;
fr->invsqrta, fr->dvda, fr->gbtab.data, idef, born->epsilon_r, born->gb_epsilon_solvent, fr->epsfac, pbc_null, graph);
/* Calculate self corrections to the GB energies - currently only A state used! (FIXME) */
- enerd->term[F_GBPOL] += calc_gb_selfcorrections(cr, born->nr, md->chargeA, born, fr->dvda,fr->epsfac);
+ enerd->term[F_GBPOL] += calc_gb_selfcorrections(cr, born->nr, md->chargeA, born, fr->dvda, fr->epsfac);
/* If parallel, sum the derivative of the potential w.r.t the born radii */
if (PARTDECOMP(cr))
#ifndef _nbnxn_kernel_simd_utils_h_
#define _nbnxn_kernel_simd_utils_h_
+#include "gromacs/legacyheaders/types/simple.h"
+
/*! \brief Provides hardware-specific utility routines for the SIMD kernels.
*
* Defines all functions, typedefs, constants and macros that have
* full-width AVX_256 use the array, but other implementations do
* not. */
static gmx_inline int *
-prepare_table_load_buffer(const int *array)
+prepare_table_load_buffer(const int gmx_unused *array)
{
#if defined GMX_X86_AVX_256 && !defined GMX_USE_HALF_WIDTH_SIMD_HERE
return gmx_simd_align_int(array);
#ifndef _nbnxn_kernel_simd_utils_x86_128d_h_
#define _nbnxn_kernel_simd_utils_x86_128d_h_
+#include "gromacs/legacyheaders/types/simple.h"
+
/* This files contains all functions/macros for the SIMD kernels
* which have explicit dependencies on the j-cluster size and/or SIMD-width.
* The functionality which depends on the j-cluster size is:
* AVX_256. */
static gmx_inline void
-load_table_f(const real *tab_coul_F, gmx_epi32 ti_S, int *ti,
+load_table_f(const real *tab_coul_F, gmx_epi32 ti_S, int gmx_unused *ti,
__m128d *ctab0_S, __m128d *ctab1_S)
{
int idx[2];
static gmx_inline void
load_table_f_v(const real *tab_coul_F, const real *tab_coul_V,
- gmx_epi32 ti_S, int *ti,
+ gmx_epi32 ti_S, int gmx_unused *ti,
__m128d *ctab0_S, __m128d *ctab1_S, __m128d *ctabv_S)
{
int idx[2];
#ifndef _nbnxn_kernel_simd_utils_x86_128s_h_
#define _nbnxn_kernel_simd_utils_x86_128s_h_
+#include "gromacs/legacyheaders/types/simple.h"
+
/* This files contains all functions/macros for the SIMD kernels
* which have explicit dependencies on the j-cluster size and/or SIMD-width.
* The functionality which depends on the j-cluster size is:
* AVX_256. */
static gmx_inline void
-load_table_f(const real *tab_coul_FDV0, gmx_epi32 ti_S, int *ti,
+load_table_f(const real *tab_coul_FDV0, gmx_epi32 ti_S, int gmx_unused *ti,
__m128 *ctab0_S, __m128 *ctab1_S)
{
int idx[4];
}
static gmx_inline void
-load_table_f_v(const real *tab_coul_FDV0, gmx_epi32 ti_S, int *ti,
+load_table_f_v(const real *tab_coul_FDV0, gmx_epi32 ti_S, int gmx_unused *ti,
__m128 *ctab0_S, __m128 *ctab1_S, __m128 *ctabv_S)
{
int idx[4];
#include "../nbnxn_kernel_simd_utils.h"
static inline void
-gmx_load_simd_4xn_interactions(int excl,
- gmx_exclfilter filter_S0,
- gmx_exclfilter filter_S1,
- gmx_exclfilter filter_S2,
- gmx_exclfilter filter_S3,
- const char *interaction_mask_indices,
- real *simd_interaction_array,
- gmx_mm_pb *interact_S0,
- gmx_mm_pb *interact_S1,
- gmx_mm_pb *interact_S2,
- gmx_mm_pb *interact_S3)
+gmx_load_simd_4xn_interactions(int excl,
+ gmx_exclfilter filter_S0,
+ gmx_exclfilter filter_S1,
+ gmx_exclfilter filter_S2,
+ gmx_exclfilter filter_S3,
+ const char gmx_unused *interaction_mask_indices,
+ real gmx_unused *simd_interaction_array,
+ gmx_mm_pb *interact_S0,
+ gmx_mm_pb *interact_S1,
+ gmx_mm_pb *interact_S2,
+ gmx_mm_pb *interact_S3)
{
#ifdef GMX_X86_SSE2
/* Load integer interaction mask */
* or easier, allocate at least n*SGSF elements.
*/
static void sort_atoms(int dim, gmx_bool Backwards,
- int dd_zone,
+ int gmx_unused dd_zone,
int *a, int n, rvec *x,
real h0, real invh, int n_per_h,
int *sort)
gmx_simd4_pr bb_0_S, bb_1_S;
gmx_simd4_pr x_S;
- int i;
+ int i;
bb_0_S = gmx_simd4_load_bb_pr(x);
bb_1_S = bb_0_S;
/* Calculate bb bounding distances of bb_i[si,...,si+3] and store them in d2 */
#define SUBC_BB_DIST2_SIMD4_XXXX_INNER(si, bb_i, d2) \
{ \
- int shi; \
+ int shi; \
\
gmx_simd4_pr dx_0, dy_0, dz_0; \
gmx_simd4_pr dx_1, dy_1, dz_1; \
gmx_simd4_pr rc2_S;
- int dim_stride;
- int j0, j1;
+ int dim_stride;
+ int j0, j1;
rc2_S = gmx_simd4_set1_pr(rl2);
#ifdef NBNXN_BBXXXX
/* Determine all ci1 bb distances in one call with SIMD4 */
subc_bb_dist2_simd4_xxxx(gridj->pbb+(cj>>STRIDE_PBB_2LOG)*NNBSBB_XXXX+(cj & (STRIDE_PBB-1)),
- ci1, pbb_ci, d2l);
+ ci1, pbb_ci, d2l);
*ndistc += na_c*2;
#endif
} gmx_partdec_t;
-void gmx_tx(const t_commrec *cr, int dir, void *buf, int bufsize)
+void gmx_tx(const t_commrec gmx_unused *cr, int gmx_unused dir, void gmx_unused *buf, int gmx_unused bufsize)
{
#ifndef GMX_MPI
gmx_call("gmx_tx");
#endif
}
-void gmx_tx_wait(const t_commrec *cr)
+void gmx_tx_wait(const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_tx_wait");
#endif
}
-void gmx_rx(const t_commrec *cr, int dir, void *buf, int bufsize)
+void gmx_rx(const t_commrec gmx_unused *cr, int gmx_unused dir, void gmx_unused *buf, int gmx_unused bufsize)
{
#ifndef GMX_MPI
gmx_call("gmx_rx");
#endif
}
-void gmx_rx_wait(const t_commrec *cr)
+void gmx_rx_wait(const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_rx_wait");
#endif
}
-void gmx_tx_rx_real(const t_commrec *cr,
- int send_dir, real *send_buf, int send_bufsize,
- int recv_dir, real *recv_buf, int recv_bufsize)
+void gmx_tx_rx_real(const t_commrec gmx_unused *cr,
+ int gmx_unused send_dir, real gmx_unused *send_buf, int gmx_unused send_bufsize,
+ int gmx_unused recv_dir, real gmx_unused *recv_buf, int gmx_unused recv_bufsize)
{
#ifndef GMX_MPI
gmx_call("gmx_tx_rx_real");
}
-void gmx_tx_rx_void(const t_commrec *cr,
- int send_dir, void *send_buf, int send_bufsize,
- int recv_dir, void *recv_buf, int recv_bufsize)
+void gmx_tx_rx_void(const t_commrec gmx_unused *cr,
+ int gmx_unused send_dir, void gmx_unused *send_buf, int gmx_unused send_bufsize,
+ int gmx_unused recv_dir, void gmx_unused *recv_buf, int gmx_unused recv_bufsize)
{
#ifndef GMX_MPI
gmx_call("gmx_tx_rx_void");
/*void gmx_wait(int dir_send,int dir_recv)*/
-void gmx_wait(const t_commrec *cr)
+void gmx_wait(const t_commrec gmx_unused *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_wait");
* This has not been tested for periodic molecules...
*/
void
-pd_move_x_constraints(t_commrec * cr,
- rvec * x0,
- rvec * x1)
+pd_move_x_constraints(t_commrec gmx_unused *cr,
+ rvec gmx_unused *x0,
+ rvec gmx_unused *x1)
{
#ifdef GMX_MPI
gmx_partdec_t *pd;
return do_comm;
}
-t_state *partdec_init_local_state(t_commrec *cr, t_state *state_global)
+t_state *partdec_init_local_state(t_commrec gmx_unused *cr, t_state *state_global)
{
int i;
t_state *state_local;
}
}
-static void pmeredist_pd(gmx_pme_t pme, gmx_bool forw,
- int n, gmx_bool bXF, rvec *x_f, real *charge,
- pme_atomcomm_t *atc)
+static void pmeredist_pd(gmx_pme_t pme, gmx_bool gmx_unused forw,
+ int n, gmx_bool gmx_unused bXF, rvec gmx_unused *x_f,
+ real gmx_unused *charge, pme_atomcomm_t *atc)
/* Redistribute particle data for PME calculation */
/* domain decomposition by x coordinate */
{
#endif
}
-static void pme_dd_sendrecv(pme_atomcomm_t *atc,
- gmx_bool bBackward, int shift,
- void *buf_s, int nbyte_s,
- void *buf_r, int nbyte_r)
+static void pme_dd_sendrecv(pme_atomcomm_t gmx_unused *atc,
+ gmx_bool gmx_unused bBackward, int gmx_unused shift,
+ void gmx_unused *buf_s, int gmx_unused nbyte_s,
+ void gmx_unused *buf_r, int gmx_unused nbyte_r)
{
#ifdef GMX_MPI
int dest, src;
-gmx_pme_pp_t gmx_pme_pp_init(t_commrec *cr)
+gmx_pme_pp_t gmx_pme_pp_init(t_commrec gmx_unused *cr)
{
struct gmx_pme_pp *pme_pp;
int rank;
/* This should be faster with a real non-blocking MPI implementation */
/* #define GMX_PME_DELAYED_WAIT */
-static void gmx_pme_send_q_x_wait(gmx_domdec_t *dd)
+static void gmx_pme_send_q_x_wait(gmx_domdec_t gmx_unused *dd)
{
#ifdef GMX_MPI
if (dd->nreq_pme)
}
static void gmx_pme_send_q_x(t_commrec *cr, int flags,
- real *chargeA, real *chargeB,
- matrix box, rvec *x,
+ real gmx_unused *chargeA, real gmx_unused *chargeB,
+ matrix box, rvec gmx_unused *x,
real lambda,
int maxshift_x, int maxshift_y,
gmx_large_int_t step)
gmx_pme_send_q_x(cr, flags, NULL, NULL, NULL, NULL, 0, 0, 0, -1);
}
-void gmx_pme_send_switchgrid(t_commrec *cr, ivec grid_size, real ewaldcoeff)
+void gmx_pme_send_switchgrid(t_commrec gmx_unused *cr, ivec gmx_unused grid_size, real gmx_unused ewaldcoeff)
{
#ifdef GMX_MPI
gmx_pme_comm_n_box_t cnb;
#endif
}
-void gmx_pme_send_resetcounters(t_commrec *cr, gmx_large_int_t step)
+void gmx_pme_send_resetcounters(t_commrec gmx_unused *cr, gmx_large_int_t gmx_unused step)
{
#ifdef GMX_MPI
gmx_pme_comm_n_box_t cnb;
int gmx_pme_recv_q_x(struct gmx_pme_pp *pme_pp,
int *natoms,
real **chargeA, real **chargeB,
- matrix box, rvec **x, rvec **f,
- int *maxshift_x, int *maxshift_y,
- gmx_bool *bFreeEnergy, real *lambda,
- gmx_bool *bEnerVir,
- gmx_large_int_t *step,
- ivec grid_size, real *ewaldcoeff)
+ matrix gmx_unused box, rvec **x, rvec **f,
+ int gmx_unused *maxshift_x, int gmx_unused *maxshift_y,
+ gmx_bool gmx_unused *bFreeEnergy, real gmx_unused *lambda,
+ gmx_bool gmx_unused *bEnerVir,
+ gmx_large_int_t gmx_unused *step,
+ ivec gmx_unused grid_size, real gmx_unused *ewaldcoeff)
{
gmx_pme_comm_n_box_t cnb;
int nat = 0, q, messages, sender;
}
void gmx_pme_send_force_vir_ener(struct gmx_pme_pp *pme_pp,
- rvec *f, matrix vir,
+ rvec gmx_unused *f, matrix vir,
real energy, real dvdlambda,
float cycles)
{
return gmx_cycles_have_counter();
}
-gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, t_commrec *cr,
+gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, t_commrec gmx_unused *cr,
int nthreads_pp, int nthreads_pme)
{
gmx_wallcycle_t wc;
#else
-void wallcycle_sub_start(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs) {}
-void wallcycle_sub_stop(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs) {}
+void wallcycle_sub_start(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs)
+{
+}
+void wallcycle_sub_stop(gmx_wallcycle_t gmx_unused wc, int gmx_unused ewcs)
+{
+}
#endif /* GMX_CYCLE_SUBCOUNTERS */
#include "statutil.h"
#include "string2.h"
+#include "common.h"
+
int gmx_omp_get_max_threads(void)
{
#ifdef GMX_OPENMP
#ifdef GMX_OPENMP
omp_set_num_threads(num_threads);
#else
- return;
+ GMX_UNUSED_VALUE(num_threads);
#endif
}
* when the first call is made into a compilation unit that contains OpenMP
* pragmas.
*/
-void gmx_omp_check_thread_affinity(FILE *fplog, const t_commrec *cr,
- gmx_hw_opt_t *hw_opt)
+void gmx_omp_check_thread_affinity(FILE *fplog,
+ const t_commrec *cr,
+ gmx_hw_opt_t *hw_opt)
{
- gmx_bool bKmpAffinitySet, bGompCpuAffinitySet;
- char *kmp_env, *gomp_env;
-
/* no need to worry if internal thread pinning is turned off */
if (hw_opt->thread_affinity == threadaffOFF)
{
return;
}
-#if defined(GMX_OPENMP)
-
+#ifndef GMX_OPENMP
+ GMX_UNUSED_VALUE(fplog);
+ GMX_UNUSED_VALUE(cr);
+#else
/* We assume that the affinity setting is available on all platforms
* gcc supports. Even if this is not the case (e.g. Mac OS) the user
- * will only get a warning.*/
- bGompCpuAffinitySet = FALSE;
- gomp_env = NULL;
-#if defined(__GNUC__)
- gomp_env = getenv("GOMP_CPU_AFFINITY");
- bGompCpuAffinitySet = (gomp_env != NULL);
-#endif /* __GNUC__ */
-
- bKmpAffinitySet = FALSE;
+ * will only get a warning. */
+#if defined(__GNUC__) || defined(__INTEL_COMPILER)
+ const char *const gomp_env = getenv("GOMP_CPU_AFFINITY");
+ const bool bGompCpuAffinitySet = (gomp_env != NULL);
+
+ /* turn off internal pinning if GOMP_CPU_AFFINITY is set & non-empty */
+ if (bGompCpuAffinitySet && *gomp_env != '\0')
+ {
+ /* TODO: with -pin auto we should only warn when using all cores */
+ md_print_warn(cr, fplog,
+ "NOTE: GOMP_CPU_AFFINITY set, will turn off %s internal affinity\n"
+ " setting as the two can conflict and cause performance degradation.\n"
+ " To keep using the %s internal affinity setting, unset the\n"
+ " GOMP_CPU_AFFINITY environment variable.",
+ ShortProgram(), ShortProgram());
+
+ hw_opt->thread_affinity = threadaffOFF;
+ }
+#endif /* __GNUC__ || __INTEL_COMPILER */
+
#if defined(__INTEL_COMPILER)
- kmp_env = getenv("KMP_AFFINITY");
- bKmpAffinitySet = (kmp_env != NULL);
+ const char *const kmp_env = getenv("KMP_AFFINITY");
+ const bool bKmpAffinitySet = (kmp_env != NULL);
/* disable Intel OpenMP affinity if neither KMP_AFFINITY nor
* GOMP_CPU_AFFINITY is set (Intel uses the GNU env. var as well) */
}
#endif /* __INTEL_COMPILER */
-#if defined(__INTEL_COMPILER) || defined(__GNUC__)
- /* turn off internal pinning f GOMP_CPU_AFFINITY is set & non-empty */
- if (bGompCpuAffinitySet && gomp_env != NULL && gomp_env != '\0')
- {
- /* TODO: with -pin auto we should only warn when using all cores */
- md_print_warn(cr, fplog,
- "NOTE: GOMP_CPU_AFFINITY set, will turn off %s internal affinity\n"
- " setting as the two can conflict and cause performance degradation.\n"
- " To keep using the %s internal affinity setting, unset the\n"
- " GOMP_CPU_AFFINITY environment variable.",
- ShortProgram(), ShortProgram());
-
- hw_opt->thread_affinity = threadaffOFF;
- }
-#endif /* __INTEL_COMPILER || __GNUC__ */
-
#endif /* GMX_OPENMP */
}
return re;
}
-static void exchange_reals(const gmx_multisim_t *ms, int b, real *v, int n)
+static void exchange_reals(const gmx_multisim_t gmx_unused *ms, int gmx_unused b, real *v, int n)
{
real *buf;
int i;
}
-static void exchange_ints(const gmx_multisim_t *ms, int b, int *v, int n)
+static void exchange_ints(const gmx_multisim_t gmx_unused *ms, int gmx_unused b, int *v, int n)
{
int *buf;
int i;
}
}
-static void exchange_doubles(const gmx_multisim_t *ms, int b, double *v, int n)
+static void exchange_doubles(const gmx_multisim_t gmx_unused *ms, int gmx_unused b, double *v, int n)
{
double *buf;
int i;
}
}
-static void exchange_rvecs(const gmx_multisim_t *ms, int b, rvec *v, int n)
+static void exchange_rvecs(const gmx_multisim_t gmx_unused *ms, int gmx_unused b, rvec *v, int n)
{
rvec *buf;
int i;
}
static void prepare_verlet_scheme(FILE *fplog,
- const gmx_hw_info_t *hwinfo,
t_commrec *cr,
t_inputrec *ir,
const gmx_mtop_t *mtop,
const char *ddcsx, const char *ddcsy, const char *ddcsz,
const char *nbpu_opt,
gmx_large_int_t nsteps_cmdline, int nstepout, int resetstep,
- int nmultisim, int repl_ex_nst, int repl_ex_nex,
+ int gmx_unused nmultisim, int repl_ex_nst, int repl_ex_nex,
int repl_ex_seed, real pforce, real cpt_period, real max_hours,
const char *deviceOptions, unsigned long Flags)
{
bUseGPU = (hwinfo->gpu_info.ncuda_dev_compatible > 0 ||
getenv("GMX_EMULATE_GPU") != NULL);
- prepare_verlet_scheme(fplog, hwinfo, cr,
+ prepare_verlet_scheme(fplog, cr,
inputrec, mtop, state->box,
bUseGPU);
}