rvec xcm;
real tm,mm;
+ if (ndim>DIM)
+ {
+ gmx_incons("More than 3 dimensions not supported.");
+ }
tm = 0.0;
clear_rvec(xcm);
if (ind_cm != NULL)
b->index[b->nr]=b->index[b->nr-1];
(*grpname)[b->nr-1]=strdup(str);
} else {
+ if (b->nr==0)
+ {
+ gmx_fatal(FARGS,"The first header of your indexfile is invalid");
+ }
pt=line;
while (sscanf(pt,"%s",str) == 1) {
i=b->index[b->nr];
#include <ctype.h>
+#include <assert.h>
#include "sysstuff.h"
#include "macros.h"
#include "string2.h"
oenv->program_name=NULL;
if (argv)
+ {
argvzero=argv[0];
-
+ assert(argvzero);
+ }
/* set program name */
/* When you run a dynamically linked program before installing
* it, libtool uses wrapper scripts and prefixes the name with "lt-".
#include <pwd.h>
#endif
#include <time.h>
+#include <assert.h>
#include "typedefs.h"
#include "smalloc.h"
*/
{
int sl;
+ assert(s);
rtrim(s);
sl = strlen(s);
{
char buf[STRLEN],buf2[22],buf3[STRLEN];
int i,warn,p_imax,error;
- real ncons_loc,p_ssd,p_max;
+ real ncons_loc,p_ssd,p_max=0;
t_pbc pbc,*pbc_null;
rvec dx;
gmx_bool bOK;
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <assert.h>
#include "typedefs.h"
#include "smalloc.h"
dtc = ir->nsttcouple*ir->delta_t;
opts = &(ir->opts); /* just for ease of referencing */
ngtc = opts->ngtc;
+ assert(ngtc>0);
snew(scalefac,opts->ngtc);
for (i=0;i<ngtc;i++)
{
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <assert.h>
#include "smalloc.h"
#include "vec.h"
/* Check to not ask for the same atom more than once */
if (dc->ga2la[offset+a] == -1)
{
+ assert(dcc);
/* Add this non-home atom to the list */
if (dcc->nind_req+1 > dcc->ind_req_nalloc)
{
#endif
#include <stdio.h>
+#include <assert.h>
#include "domdec.h"
#include "network.h"
#include "perf_est.h"
return -1;
}
+ assert(ddbox->npbcdim<=DIM);
+
/* Check if the triclinic requirements are met */
for(i=0; i<DIM; i++)
{
#include <math.h>
#include <string.h>
+#include <assert.h>
#include "sysstuff.h"
#include "typedefs.h"
#include "macros.h"
case eelP3M_AD:
if (cr->duty & DUTY_PME)
{
+ assert(fr->n_tpi >= 0);
if (fr->n_tpi == 0 || (flags & GMX_FORCE_STATECHANGED))
{
pme_flags = GMX_PME_SPREAD_Q | GMX_PME_SOLVE;