silence compiler warnings
This commit is contained in:
@ -28,7 +28,7 @@ using namespace FixConst;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixMDIEngine::FixMDIEngine(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
FixMDIEngine::FixMDIEngine(LAMMPS *_lmp, int narg, char **arg) : Fix(_lmp, narg, arg)
|
||||||
{
|
{
|
||||||
if (narg != 3) error->all(FLERR, "Illegal fix mdi/engine command");
|
if (narg != 3) error->all(FLERR, "Illegal fix mdi/engine command");
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ int FixMDIEngine::setmask()
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void FixMDIEngine::setup(int vflag)
|
void FixMDIEngine::setup(int /*vflag*/)
|
||||||
{
|
{
|
||||||
// engine is now at FORCES node
|
// engine is now at FORCES node
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ void FixMDIEngine::post_integrate()
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void FixMDIEngine::min_pre_force(int vflag)
|
void FixMDIEngine::min_pre_force(int /*vflag*/)
|
||||||
{
|
{
|
||||||
// engine is now at COORDS node for minimizer
|
// engine is now at COORDS node for minimizer
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ void FixMDIEngine::min_pre_force(int vflag)
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void FixMDIEngine::post_force(int vflag)
|
void FixMDIEngine::post_force(int /*vflag*/)
|
||||||
{
|
{
|
||||||
// engine is now at FORCES node for MD
|
// engine is now at FORCES node for MD
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ void FixMDIEngine::post_force(int vflag)
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void FixMDIEngine::min_post_force(int vflag)
|
void FixMDIEngine::min_post_force(int /*vflag*/)
|
||||||
{
|
{
|
||||||
// engine is now at FORCES node for minimizer
|
// engine is now at FORCES node for minimizer
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ enum { TYPE, CHARGE, MASS, COORD, VELOCITY, FORCE, ADDFORCE };
|
|||||||
when EXIT command is received, mdi engine command exits
|
when EXIT command is received, mdi engine command exits
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
|
||||||
MDIEngine::MDIEngine(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
MDIEngine::MDIEngine(LAMMPS *_lmp, int narg, char ** /*arg*/) : Pointers(_lmp)
|
||||||
{
|
{
|
||||||
if (narg) error->all(FLERR, "Illegal mdi engine command");
|
if (narg) error->all(FLERR, "Illegal mdi engine command");
|
||||||
|
|
||||||
@ -278,12 +278,12 @@ int MDIEngine::execute_command(const char *command, MDI_Comm mdicomm)
|
|||||||
int command_exists;
|
int command_exists;
|
||||||
if (root) {
|
if (root) {
|
||||||
ierr = MDI_Check_command_exists(node_engine, command, MDI_COMM_NULL, &command_exists);
|
ierr = MDI_Check_command_exists(node_engine, command, MDI_COMM_NULL, &command_exists);
|
||||||
if (ierr) error->one(FLERR, "MDI: Unable to check whether current command is supported");
|
if (ierr) error->one(FLERR, "MDI: Cannot confirm that command '{}' is supported", command);
|
||||||
}
|
}
|
||||||
|
|
||||||
MPI_Bcast(&command_exists, 1, MPI_INT, 0, world);
|
MPI_Bcast(&command_exists, 1, MPI_INT, 0, world);
|
||||||
if (!command_exists)
|
if (!command_exists)
|
||||||
error->all(FLERR, "MDI: Received command {} unsupported by engine node {}", command,
|
error->all(FLERR, "MDI: Received command '{}' unsupported by engine node {}", command,
|
||||||
node_engine);
|
node_engine);
|
||||||
|
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
@ -960,10 +960,9 @@ void MDIEngine::create_system()
|
|||||||
// optionally set charges if specified by ">CHARGES"
|
// optionally set charges if specified by ">CHARGES"
|
||||||
|
|
||||||
if (flag_velocities)
|
if (flag_velocities)
|
||||||
int natoms =
|
|
||||||
lammps_create_atoms(lmp, sys_natoms, NULL, sys_types, sys_coords, sys_velocities, NULL, 1);
|
lammps_create_atoms(lmp, sys_natoms, NULL, sys_types, sys_coords, sys_velocities, NULL, 1);
|
||||||
else
|
else
|
||||||
int natoms = lammps_create_atoms(lmp, sys_natoms, NULL, sys_types, sys_coords, NULL, NULL, 1);
|
lammps_create_atoms(lmp, sys_natoms, NULL, sys_types, sys_coords, NULL, NULL, 1);
|
||||||
|
|
||||||
if (flag_charges) lammps_scatter_atoms(lmp, (char *) "q", 1, 1, sys_charges);
|
if (flag_charges) lammps_scatter_atoms(lmp, (char *) "q", 1, 1, sys_charges);
|
||||||
|
|
||||||
@ -1628,7 +1627,7 @@ void MDIEngine::infile()
|
|||||||
|
|
||||||
char *infile = new char[nbytes + 1];
|
char *infile = new char[nbytes + 1];
|
||||||
int ierr = MDI_Recv(infile, nbytes + 1, MDI_CHAR, mdicomm);
|
int ierr = MDI_Recv(infile, nbytes + 1, MDI_CHAR, mdicomm);
|
||||||
if (ierr) error->all(FLERR, "MDI: INFILE data");
|
if (ierr) error->all(FLERR, "MDI: INFILE data for {}", infile);
|
||||||
MPI_Bcast(infile, nbytes + 1, MPI_CHAR, 0, world);
|
MPI_Bcast(infile, nbytes + 1, MPI_CHAR, 0, world);
|
||||||
infile[nbytes] = '\0';
|
infile[nbytes] = '\0';
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ using namespace LAMMPS_NS;
|
|||||||
this class is destroyed
|
this class is destroyed
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
|
||||||
MDIPlugin::MDIPlugin(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
MDIPlugin::MDIPlugin(LAMMPS *_lmp, int narg, char **arg) : Pointers(_lmp)
|
||||||
{
|
{
|
||||||
if (narg < 1) error->all(FLERR, "Illegal mdi plugin command");
|
if (narg < 1) error->all(FLERR, "Illegal mdi plugin command");
|
||||||
|
|
||||||
@ -112,9 +112,8 @@ MDIPlugin::MDIPlugin(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
|||||||
with the plugin
|
with the plugin
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
|
||||||
int MDIPlugin::plugin_wrapper(void *pmpicomm, MDI_Comm mdicomm, void *vptr)
|
int MDIPlugin::plugin_wrapper(void * /*pmpicomm*/, MDI_Comm mdicomm, void *vptr)
|
||||||
{
|
{
|
||||||
MPI_Comm mpicomm = *(MPI_Comm *) pmpicomm;
|
|
||||||
MDIPlugin *ptr = (MDIPlugin *) vptr;
|
MDIPlugin *ptr = (MDIPlugin *) vptr;
|
||||||
LAMMPS *lammps = ptr->lmp;
|
LAMMPS *lammps = ptr->lmp;
|
||||||
char *lammps_command = ptr->lammps_command;
|
char *lammps_command = ptr->lammps_command;
|
||||||
|
|||||||
Reference in New Issue
Block a user