Use "Contact the LAMMPS developers" consistently and add an errorurl() to such errors

This commit is contained in:
Axel Kohlmeyer
2025-03-27 19:04:32 -04:00
parent c3309bc0b3
commit 8949a6262d
6 changed files with 43 additions and 11 deletions

View File

@ -953,3 +953,32 @@ created (for instance defining the :doc:`atom style <atom_style>`,
simulation box has been created. See the paragraph on :ref:`errors
before or after the simulation box is created <hint12>` for additional
information.
.. _err0035:
Error messages ending in 'Please contact the LAMMPS developers'
---------------------------------------------------------------
Such error messages indicate that something unexpected has happened and
that it will require a good understanding of the details of the design
of LAMMPS to resolve this. This can be due to some bug in contributed
code, and oversight when updating functionality, a feature that is
scheduled to be removed or reaching a combination of flags and settings
that should not be possible or similar.
Even if you find a way to work around this error or warning, you should
contact the LAMMPS developers and prepare a minimal set of inputs that
can be used to reproduce this error or warning. By providing the input,
the LAMMPS developers can then assess whether additional action is
needed and who else to contact about this, if needed.
There are multiple ways to get into contact and report your issue. In
order of preference there are:
- Submit a bug report `issue in the LAMMPS GitHub
<https://github.com/lammps/lammps/issues>` repository
- Post a message in the "LAMMPS Development" forum in the
`MatSci Community Discourse <https://matsci.org/c/lammps/lammps-development/42>`_
- Send an email to ``developers@lammps.org``
- Send an email to an :doc:`individual LAMMPS developer <Intro_authors>`
that you know and trust

View File

@ -308,7 +308,8 @@ void Comm::modify_params(int narg, char **arg)
} else if (strcmp(arg[iarg+1],"multi/old") == 0) {
if (me == 0)
error->warning(FLERR, "Comm mode 'multi/old' is deprecated and will be removed soon.\n"
"Contact the LAMMPS developers if that creates problems for you.");
"Please contact the LAMMPS developers if you cannot use mode 'multi'."
+ utils::errorurl(35));
if (neighbor->style == Neighbor::MULTI)
error->all(FLERR, iarg+1,
"Cannot use comm mode 'multi/old' with 'multi' style neighbor lists");
@ -372,7 +373,8 @@ void Comm::modify_params(int narg, char **arg)
double cut;
if (me == 0)
error->warning(FLERR, "Comm mode 'multi/old' is deprecated and will be removed soon.\n"
"Contact the LAMMPS developers if that creates problems for you.");
"Please contact the LAMMPS developers if you cannot use mode 'multi'."
+ utils::errorurl(35));
if (mode == Comm::SINGLE)
error->all(FLERR, iarg, "Use cutoff keyword to set cutoff in single mode");
if (mode == Comm::MULTI)

View File

@ -122,15 +122,15 @@ void Compute::init_flags()
if (scalar_flag && (extscalar < 0))
error->all(FLERR, Error::NOLASTLINE,
"Must set 'extscalar' when setting 'scalar_flag' for compute {}. "
"Contact the developer.", style);
"Please contact the LAMMPS developers.{}", style, utils::errorurl(35));
if (vector_flag && (extvector < 0) && !extlist)
error->all(FLERR, Error::NOLASTLINE,
"Must set 'extvector' or 'extlist' when setting 'vector_flag' for compute {}. "
"Contact the developer.", style);
"Please contact the LAMMPS developers.{}", style, utils::errorurl(35));
if (array_flag && (extarray < 0))
error->all(FLERR, Error::NOLASTLINE,
"Must set 'extarray' when setting 'array_flag' for compute {}. "
"Contact the developer.", style);
"Please contact the LAMMPS developers.{}", style, utils::errorurl(35));
}
/* ---------------------------------------------------------------------- */

View File

@ -133,13 +133,13 @@ void Fix::init_flags()
{
if (scalar_flag && (extscalar < 0))
error->all(FLERR, "Must set 'extscalar' when setting 'scalar_flag' for fix {}. "
"Contact the developer.", style);
"Please contact the LAMMPS developers.{}", style, utils::errorurl(35));
if (vector_flag && (extvector < 0) && !extlist)
error->all(FLERR, "Must set 'extvector' or 'extlist' when setting 'vector_flag' for fix {}. "
"Contact the developer.", style);
"Please contact the LAMMPS developers.{}", style, utils::errorurl(35));
if (array_flag && (extarray < 0))
error->all(FLERR, "Must set 'extarray' when setting 'array_flag' for fix {}. "
"Contact the developer.", style);
"Please contact the LAMMPS developers.{}", style, utils::errorurl(35));
}
/* ----------------------------------------------------------------------

View File

@ -1144,7 +1144,7 @@ int Neighbor::init_pair()
}
if (count == 100)
error->all(FLERR, Error::NOLASTLINE, "Failed to reorder neighbor lists to satisfy "
"constraints - Contact the LAMMPS developers for assistance");
"constraints - Please contact the LAMMPS developers." + utils::errorurl(35));
// debug output
@ -2646,7 +2646,8 @@ void Neighbor::set(int narg, char **arg)
style = Neighbor::MULTI_OLD;
if (me == 0)
error->warning(FLERR, "Neighbor list style 'multi/old' is deprecated and will be removed "
"soon.\nContact the LAMMPS developers if that creates problems for you.");
"soon.\nPlease contact the LAMMPS developers if you cannot use style 'multi'."
+ utils::errorurl(35));
} else error->all(FLERR, 1, "Unknown neighbor {} argument: {}", arg[0], arg[1]);
if (style == Neighbor::MULTI_OLD && lmp->citeme) lmp->citeme->add(cite_neigh_multi_old);

View File

@ -855,7 +855,7 @@ int Variable::next(int narg, char **arg)
if (nextindex < 0)
error->one(FLERR,"Unexpected error while incrementing uloop style variable. "
"Please contact the LAMMPS developers.");
"Please contact the LAMMPS developers." + utils::errorurl(35));
fp = fopen("tmp.lammps.variable.lock","w");
fprintf(fp,"%d\n",nextindex+1);