diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index ce44fb4e93..54fb83f0aa 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -1629,7 +1629,7 @@ int FixRigidSmall::rendezvous_body(int n, char *inbuf, int &rflag, int *&proclist, char *&outbuf, void *ptr) { - int i,j,m; + int i,m; double delx,dely,delz,rsq; int *iclose; tagint *idclose; diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 6293028090..1e8414d321 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -694,10 +694,9 @@ int FixShake::dof(int igroup) void FixShake::find_clusters() { int i,j,m,n,imol,iatom; - int flag,flag_all,nbuf,size; + int flag,flag_all; tagint tagprev; double massone; - tagint *buf; if (me == 0 && screen) { if (!rattle) fprintf(screen,"Finding SHAKE clusters ...\n"); @@ -794,7 +793,7 @@ void FixShake::find_clusters() // ----------------------------------------------------- partner_info(npartner,partner_tag,partner_mask,partner_type, - partner_massflag,partner_bondtype); + partner_massflag,partner_bondtype); // error check for unfilled partner info // if partner_type not set, is an error @@ -1083,8 +1082,8 @@ void FixShake::atom_owners() ------------------------------------------------------------------------- */ void FixShake::partner_info(int *npartner, tagint **partner_tag, - int **partner_mask, int **partner_type, - int **partner_massflag, int **partner_bondtype) + int **partner_mask, int **partner_type, + int **partner_massflag, int **partner_bondtype) { int i,j,m,n; int nlocal = atom->nlocal; @@ -1144,29 +1143,29 @@ void FixShake::partner_info(int *npartner, tagint **partner_tag, n = bondtype_findset(m,tag[i],partner_tag[i][j],0); if (n) partner_bondtype[i][j] = n; } - + } else { - proclist[nsend] = partner_tag[i][j] % nprocs; - inbuf[nsend].atomID = partner_tag[i][j]; - inbuf[nsend].partnerID = tag[i]; - inbuf[nsend].mask = mask[i]; - inbuf[nsend].type = type[i]; + proclist[nsend] = partner_tag[i][j] % nprocs; + inbuf[nsend].atomID = partner_tag[i][j]; + inbuf[nsend].partnerID = tag[i]; + inbuf[nsend].mask = mask[i]; + inbuf[nsend].type = type[i]; if (nmass) { if (rmass) massone = rmass[i]; else massone = mass[type[i]]; - inbuf[nsend].massflag = masscheck(massone); + inbuf[nsend].massflag = masscheck(massone); } else inbuf[nsend].massflag = 0; - // my atom may own bond, in which case set partner_bondtype - // else receiver of this datum will own the bond and return the value - + // my atom may own bond, in which case set partner_bondtype + // else receiver of this datum will own the bond and return the value + n = bondtype_findset(i,tag[i],partner_tag[i][j],0); if (n) { - partner_bondtype[i][j] = n; - inbuf[nsend].bondtype = n; - } else inbuf[nsend].bondtype = 0; - - nsend++; + partner_bondtype[i][j] = n; + inbuf[nsend].bondtype = n; + } else inbuf[nsend].bondtype = 0; + + nsend++; } } } @@ -1213,9 +1212,9 @@ void FixShake::partner_info(int *npartner, tagint **partner_tag, ------------------------------------------------------------------------- */ void FixShake::nshake_info(int *npartner, tagint **partner_tag, - int **partner_nshake) + int **partner_nshake) { - int i,j,m,n; + int i,j,m; int nlocal = atom->nlocal; // nsend = # of my datums to send @@ -1251,11 +1250,11 @@ void FixShake::nshake_info(int *npartner, tagint **partner_tag, if (m >= 0 && m < nlocal) { partner_nshake[i][j] = nshake[m]; } else { - proclist[nsend] = partner_tag[i][j] % nprocs; - inbuf[nsend].atomID = partner_tag[i][j]; - inbuf[nsend].partnerID = tag[i]; - inbuf[nsend].nshake = nshake[i]; - nsend++; + proclist[nsend] = partner_tag[i][j] % nprocs; + inbuf[nsend].atomID = partner_tag[i][j]; + inbuf[nsend].partnerID = tag[i]; + inbuf[nsend].nshake = nshake[i]; + nsend++; } } } @@ -1292,9 +1291,9 @@ void FixShake::nshake_info(int *npartner, tagint **partner_tag, ------------------------------------------------------------------------- */ void FixShake::shake_info(int *npartner, tagint **partner_tag, - int **partner_shake) + int **partner_shake) { - int i,j,m,n; + int i,j,m; int nlocal = atom->nlocal; // nsend = # of my datums to send @@ -1338,8 +1337,8 @@ void FixShake::shake_info(int *npartner, tagint **partner_tag, shake_type[m][2] = shake_type[i][2]; } else { - proclist[nsend] = partner_tag[i][j] % nprocs; - inbuf[nsend].atomID = partner_tag[i][j]; + proclist[nsend] = partner_tag[i][j] % nprocs; + inbuf[nsend].atomID = partner_tag[i][j]; inbuf[nsend].shake_flag = shake_flag[i]; inbuf[nsend].shake_atom[0] = shake_atom[i][0]; inbuf[nsend].shake_atom[1] = shake_atom[i][1]; @@ -1348,7 +1347,7 @@ void FixShake::shake_info(int *npartner, tagint **partner_tag, inbuf[nsend].shake_type[0] = shake_type[i][0]; inbuf[nsend].shake_type[1] = shake_type[i][1]; inbuf[nsend].shake_type[2] = shake_type[i][2]; - nsend++; + nsend++; } } } @@ -1391,8 +1390,8 @@ void FixShake::shake_info(int *npartner, tagint **partner_tag, ------------------------------------------------------------------------- */ int FixShake::rendezvous_ids(int n, char *inbuf, - int &flag, int *&proclist, char *&outbuf, - void *ptr) + int &flag, int *&proclist, char *&outbuf, + void *ptr) { FixShake *fsptr = (FixShake *) ptr; Memory *memory = fsptr->memory; @@ -1429,8 +1428,8 @@ int FixShake::rendezvous_ids(int n, char *inbuf, ------------------------------------------------------------------------- */ int FixShake::rendezvous_partners_info(int n, char *inbuf, - int &flag, int *&proclist, char *&outbuf, - void *ptr) + int &flag, int *&proclist, char *&outbuf, + void *ptr) { int i,m; @@ -1458,9 +1457,6 @@ int FixShake::rendezvous_partners_info(int n, char *inbuf, int *procowner = fsptr->procowner; memory->create(proclist,n,"shake:proclist"); - double massone; - int nmass = fsptr->nmass; - for (i = 0; i < n; i++) { m = atom->map(in[i].atomID); proclist[i] = procowner[m]; @@ -1487,10 +1483,10 @@ int FixShake::rendezvous_partners_info(int n, char *inbuf, ------------------------------------------------------------------------- */ int FixShake::rendezvous_nshake(int n, char *inbuf, - int &flag, int *&proclist, char *&outbuf, - void *ptr) + int &flag, int *&proclist, char *&outbuf, + void *ptr) { - int i,j,m; + int i,m; FixShake *fsptr = (FixShake *) ptr; Atom *atom = fsptr->atom; @@ -1544,7 +1540,7 @@ int FixShake::rendezvous_shake(int n, char *inbuf, int &flag, int *&proclist, char *&outbuf, void *ptr) { - int i,j,m; + int i,m; FixShake *fsptr = (FixShake *) ptr; Atom *atom = fsptr->atom; diff --git a/src/comm.cpp b/src/comm.cpp index dc117d2631..8389e4993d 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -1121,9 +1121,7 @@ void Comm::rendezvous_stats(int n, int nout, int nrvous, int nrvous_out, size_out_all/outsize,1.0*size_out_all/nprocs/outsize, size_out_max/outsize,size_out_min/outsize); else - fprintf(screen," output datum count: " - BIGINT_FORMAT " %g " BIGINT_FORMAT " " BIGINT_FORMAT "\n", - 0,0.0,0,0); + fprintf(screen," output datum count: %d %g %d %d\n",0,0.0,0,0); fprintf(screen," output data (MB): %g %g %g %g\n", 1.0*size_out_all/mbytes,1.0*size_out_all/nprocs/mbytes, 1.0*size_out_max/mbytes,1.0*size_out_min/mbytes); @@ -1140,9 +1138,7 @@ void Comm::rendezvous_stats(int n, int nout, int nrvous, int nrvous_out, size_outrvous_all/outsize,1.0*size_outrvous_all/nprocs/outsize, size_outrvous_max/outsize,size_outrvous_min/outsize); else - fprintf(screen," output rvous datum count: " - BIGINT_FORMAT " %g " BIGINT_FORMAT " " BIGINT_FORMAT "\n", - 0,0.0,0,0); + fprintf(screen," output rvous datum count: %d %g %d %d\n",0,0.0,0,0); fprintf(screen," output rvous data (MB): %g %g %g %g\n", 1.0*size_outrvous_all/mbytes,1.0*size_outrvous_all/nprocs/mbytes, 1.0*size_outrvous_max/mbytes,1.0*size_outrvous_min/mbytes); diff --git a/src/hashlittle.cpp b/src/hashlittle.cpp index b6932efa8d..0abcd2bcc5 100644 --- a/src/hashlittle.cpp +++ b/src/hashlittle.cpp @@ -155,7 +155,6 @@ uint32_t hashlittle( const void *key, size_t length, uint32_t initval) u.ptr = key; if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) { const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */ - const uint8_t *k8; /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */ while (length > 12) @@ -199,7 +198,7 @@ uint32_t hashlittle( const void *key, size_t length, uint32_t initval) #else /* make valgrind happy */ - k8 = (const uint8_t *)k; + const uint8_t *k8 = (const uint8_t *)k; switch(length) { case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; diff --git a/src/special.cpp b/src/special.cpp index ed505ff957..22022519a2 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -334,7 +334,6 @@ void Special::onethree_build() { int i,j,k,m,proc; - tagint *tag = atom->tag; int **nspecial = atom->nspecial; int nlocal = atom->nlocal; @@ -440,7 +439,6 @@ void Special::onefour_build() { int i,j,k,m,proc; - tagint *tag = atom->tag; int **nspecial = atom->nspecial; int nlocal = atom->nlocal;