From ae255c847bf7a5dfb6f83d7ffedd0dab2c7cc1ba Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 27 Jul 2016 22:51:18 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15375 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/KSPACE/pair_lj_charmm_coul_long.cpp | 5 +++-- src/RIGID/fix_shake.cpp | 9 +++++++++ src/STUBS/mpi.c | 8 ++++---- src/STUBS/mpi.h | 8 ++++---- src/USER-QMMM/fix_qmmm.cpp | 2 +- src/fix_nh.cpp | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index c9ceaa92df..7fad9c5eef 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -733,8 +733,9 @@ void PairLJCharmmCoulLong::init_style() cut_coulsq = cut_coul * cut_coul; cut_bothsq = MAX(cut_ljsq,cut_coulsq); - denom_lj_inv = 1.0 / ( (cut_ljsq-cut_lj_innersq) * (cut_ljsq-cut_lj_innersq) * - (cut_ljsq-cut_lj_innersq) ); + denom_lj = ( (cut_ljsq-cut_lj_innersq) * (cut_ljsq-cut_lj_innersq) * + (cut_ljsq-cut_lj_innersq) ); + denom_lj_inv = 1.0 / denom_lj; // set & error check interior rRESPA cutoffs diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 81b10d1afb..c71fefc63b 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -446,6 +446,15 @@ void FixShake::setup(int vflag) else respa = 1; + if (!respa) { + dtv = update->dt; + dtfsq = 0.5 * update->dt * update->dt * force->ftm2v; + if (!rattle) dtfsq = update->dt * update->dt * force->ftm2v; + } else { + dtv = step_respa[0]; + dtf_innerhalf = 0.5 * step_respa[0] * force->ftm2v; + dtf_inner = dtf_innerhalf; + } // correct geometry of cluster if necessary diff --git a/src/STUBS/mpi.c b/src/STUBS/mpi.c index f23d5e904a..ca0e921e13 100644 --- a/src/STUBS/mpi.c +++ b/src/STUBS/mpi.c @@ -190,7 +190,7 @@ int MPI_Type_size(MPI_Datatype datatype, int *size) /* ---------------------------------------------------------------------- */ -int MPI_Send(void *buf, int count, MPI_Datatype datatype, +int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) { printf("MPI Stub WARNING: Should not send message to self\n"); @@ -199,7 +199,7 @@ int MPI_Send(void *buf, int count, MPI_Datatype datatype, /* ---------------------------------------------------------------------- */ -int MPI_Isend(void *buf, int count, MPI_Datatype datatype, +int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) { printf("MPI Stub WARNING: Should not send message to self\n"); @@ -208,7 +208,7 @@ int MPI_Isend(void *buf, int count, MPI_Datatype datatype, /* ---------------------------------------------------------------------- */ -int MPI_Rsend(void *buf, int count, MPI_Datatype datatype, +int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) { printf("MPI Stub WARNING: Should not rsend message to self\n"); @@ -260,7 +260,7 @@ int MPI_Waitany(int count, MPI_Request *request, int *index, /* ---------------------------------------------------------------------- */ -int MPI_Sendrecv(void *sbuf, int scount, MPI_Datatype sdatatype, +int MPI_Sendrecv(const void *sbuf, int scount, MPI_Datatype sdatatype, int dest, int stag, void *rbuf, int rcount, MPI_Datatype rdatatype, int source, int rtag, MPI_Comm comm, MPI_Status *status) diff --git a/src/STUBS/mpi.h b/src/STUBS/mpi.h index 01a4b85173..82cbe302ba 100644 --- a/src/STUBS/mpi.h +++ b/src/STUBS/mpi.h @@ -90,11 +90,11 @@ double MPI_Wtime(); int MPI_Type_size(int, int *); -int MPI_Send(void *buf, int count, MPI_Datatype datatype, +int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); -int MPI_Isend(void *buf, int count, MPI_Datatype datatype, +int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request); -int MPI_Rsend(void *buf, int count, MPI_Datatype datatype, +int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status); @@ -104,7 +104,7 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status); int MPI_Waitall(int n, MPI_Request *request, MPI_Status *status); int MPI_Waitany(int count, MPI_Request *request, int *index, MPI_Status *status); -int MPI_Sendrecv(void *sbuf, int scount, MPI_Datatype sdatatype, +int MPI_Sendrecv(const void *sbuf, int scount, MPI_Datatype sdatatype, int dest, int stag, void *rbuf, int rcount, MPI_Datatype rdatatype, int source, int rtag, MPI_Comm comm, MPI_Status *status); diff --git a/src/USER-QMMM/fix_qmmm.cpp b/src/USER-QMMM/fix_qmmm.cpp index 50adf8d224..065fff2c18 100644 --- a/src/USER-QMMM/fix_qmmm.cpp +++ b/src/USER-QMMM/fix_qmmm.cpp @@ -444,7 +444,7 @@ void FixQMMM::exchange_positions() isend_buf[1] = num_qm; isend_buf[2] = num_mm; isend_buf[3] = ntypes; - MPI_Send(isend_buf, 4, MPI_INTEGER,1, QMMM_TAG_SIZE, qm_comm); + MPI_Send(isend_buf, 4, MPI_INT, 1, QMMM_TAG_SIZE, qm_comm); MPI_Send(celldata, 9, MPI_DOUBLE, 1, QMMM_TAG_CELL, qm_comm); } if (verbose > 0) { diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 8c576a8eee..725cb60d26 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -331,7 +331,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) } else if (strcmp(arg[iarg],"update") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix nvt/npt/nph command"); if (strcmp(arg[iarg+1],"dipole") == 0) dipole_flag = 1; - else if (strcmp(arg[iarg],"dipole/dlm") == 0) { + else if (strcmp(arg[iarg+1],"dipole/dlm") == 0) { dipole_flag = 1; dlm_flag = 1; } else error->all(FLERR,"Illegal fix nvt/npt/nph command");