Merge pull request #4146 from akohlmey/collected-small-changes
Collected small changes
This commit is contained in:
4
.github/workflows/unittest-macos.yml
vendored
4
.github/workflows/unittest-macos.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
build:
|
||||
name: MacOS Unit Test
|
||||
if: ${{ github.repository == 'lammps/lammps' }}
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-13
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
|
||||
@ -43,6 +43,8 @@ jobs:
|
||||
working-directory: build
|
||||
run: |
|
||||
ccache -z
|
||||
python3 -m venv macosenv
|
||||
source macosenv/bin/activate
|
||||
python3 -m pip install numpy
|
||||
python3 -m pip install pyyaml
|
||||
cmake -C ../cmake/presets/clang.cmake \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
message(STATUS "Downloading and building OpenCL loader library")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.02.09.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "f3573cf9daa3558ba46fd5866517f38f" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2024.05.09.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||
set(OPENCL_LOADER_MD5 "e7796826b21c059224fabe997e0f2075" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||
mark_as_advanced(OPENCL_LOADER_URL)
|
||||
mark_as_advanced(OPENCL_LOADER_MD5)
|
||||
|
||||
|
||||
@ -4162,6 +4162,7 @@ zenodo
|
||||
Zepeda
|
||||
zflag
|
||||
Zhang
|
||||
Zhao
|
||||
Zhen
|
||||
zhi
|
||||
Zhigilei
|
||||
|
||||
@ -13,9 +13,6 @@
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(meam/c/kk,PairMEAMKokkos<LMPDeviceType>);
|
||||
PairStyle(meam/c/kk/device,PairMEAMKokkos<LMPDeviceType>);
|
||||
PairStyle(meam/c/kk/host,PairMEAMKokkos<LMPHostType>);
|
||||
PairStyle(meam/kk,PairMEAMKokkos<LMPDeviceType>);
|
||||
PairStyle(meam/kk/device,PairMEAMKokkos<LMPDeviceType>);
|
||||
PairStyle(meam/kk/host,PairMEAMKokkos<LMPHostType>);
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(meam,PairMEAM);
|
||||
PairStyle(meam/c,PairMEAM);
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
|
||||
@ -74,6 +74,9 @@ FixQEq::FixQEq(LAMMPS *lmp, int narg, char **arg) :
|
||||
if ((nevery <= 0) || (cutoff <= 0.0) || (tolerance <= 0.0) || (maxiter <= 0))
|
||||
error->all(FLERR,"Illegal fix qeq command");
|
||||
|
||||
// must have charges
|
||||
if (!atom->q_flag) error->all(FLERR, "Fix {} requires atom attribute q", style);
|
||||
|
||||
alpha = 0.20;
|
||||
swa = 0.0;
|
||||
swb = cutoff;
|
||||
|
||||
21
src/fix.cpp
21
src/fix.cpp
@ -119,8 +119,8 @@ Fix::~Fix()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
delete [] id;
|
||||
delete [] style;
|
||||
delete[] id;
|
||||
delete[] style;
|
||||
memory->destroy(eatom);
|
||||
memory->destroy(vatom);
|
||||
memory->destroy(cvatom);
|
||||
@ -133,36 +133,37 @@ Fix::~Fix()
|
||||
|
||||
void Fix::modify_params(int narg, char **arg)
|
||||
{
|
||||
if (narg == 0) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (narg == 0) utils::missing_cmd_args(FLERR, "fix_modify", error);
|
||||
|
||||
int iarg = 0;
|
||||
while (iarg < narg) {
|
||||
if (strcmp(arg[iarg],"dynamic/dof") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix_modify dynamic/dof", error);
|
||||
dynamic = utils::logical(FLERR,arg[iarg+1],false,lmp);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"energy") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix_modify energy", error);
|
||||
thermo_energy = utils::logical(FLERR,arg[iarg+1],false,lmp);
|
||||
if (thermo_energy && !energy_global_flag && !energy_peratom_flag)
|
||||
error->all(FLERR,"Fix {} {} does not support fix_modify energy command", id, style);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"virial") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix_modify virial", error);
|
||||
thermo_virial = utils::logical(FLERR,arg[iarg+1],false,lmp);
|
||||
if (thermo_virial && !virial_global_flag && !virial_peratom_flag)
|
||||
error->all(FLERR,"Fix {} {} does not support fix_modify virial command", id, style);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"respa") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (!respa_level_support) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "fix_modify respa", error);
|
||||
if (!respa_level_support) error->all(FLERR,"Illegal fix_modify respa command");
|
||||
int lvl = utils::inumeric(FLERR,arg[iarg+1],false,lmp);
|
||||
if (lvl < 0) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (lvl < 0) error->all(FLERR,"Illegal fix_modify respa command");
|
||||
respa_level = lvl-1;
|
||||
iarg += 2;
|
||||
} else {
|
||||
int n = modify_param(narg-iarg,&arg[iarg]);
|
||||
if (n == 0) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (n == 0)
|
||||
error->all(FLERR,"Fix {} {} does not support fix_modify {} command", id, style, arg[iarg]);
|
||||
iarg += n;
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,6 +56,9 @@ void PairDeprecated::settings(int, char **)
|
||||
utils::logmesg(lmp,
|
||||
"\nPair style 'mesont/tpm' has been removed from LAMMPS. "
|
||||
"Please use pair style 'mesocnt' instead\n\n");
|
||||
} else if (utils::strmatch(my_style, "^meam/c")) {
|
||||
if (lmp->comm->me == 0)
|
||||
utils::logmesg(lmp, "\nPair style 'meam/c' has been renamed to 'meam'\n\n");
|
||||
}
|
||||
error->all(FLERR, "This pair style is no longer available");
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
PairStyle(DEPRECATED,PairDeprecated);
|
||||
PairStyle(meam/c,PairDeprecated);
|
||||
PairStyle(reax,PairDeprecated);
|
||||
PairStyle(reax/c,PairDeprecated);
|
||||
PairStyle(mesont/tpm,PairDeprecated);
|
||||
|
||||
@ -1 +1,2 @@
|
||||
#define LAMMPS_VERSION "17 Apr 2024"
|
||||
#define LAMMPS_UPDATE "Development"
|
||||
|
||||
@ -110,16 +110,31 @@ TEST_F(Advanced_utils, expand_args)
|
||||
{
|
||||
atomic_system();
|
||||
BEGIN_CAPTURE_OUTPUT();
|
||||
command("compute temp all temp");
|
||||
command("variable temp vector c_temp");
|
||||
command("variable step equal step");
|
||||
command("variable pe equal pe");
|
||||
command("variable pe equal pe");
|
||||
command("variable epair equal epair");
|
||||
command("compute gofr all rdf 20 1 1 1 2");
|
||||
command("fix 1 all ave/time 1 1 1 v_step v_pe v_epair");
|
||||
command("fix 2 all nve");
|
||||
command("run 1 post no");
|
||||
try {
|
||||
command("compute temp all temp");
|
||||
command("variable temp vector c_temp");
|
||||
command("variable step equal step");
|
||||
command("variable pe equal pe");
|
||||
command("variable pe equal pe");
|
||||
command("variable epair equal epair");
|
||||
command("compute gofr all rdf 20 1 1 1 2");
|
||||
command("fix 1 all ave/time 1 1 1 v_step v_pe v_epair");
|
||||
command("fix 2 all nve");
|
||||
command("run 1 post no");
|
||||
} catch (LAMMPSAbortException &ae) {
|
||||
fprintf(stderr, "LAMMPS Error: %s\n", ae.what());
|
||||
exit(2);
|
||||
} catch (LAMMPSException &e) {
|
||||
fprintf(stderr, "LAMMPS Error: %s\n", e.what());
|
||||
exit(3);
|
||||
} catch (fmt::format_error &fe) {
|
||||
fprintf(stderr, "fmt::format_error: %s\n", fe.what());
|
||||
exit(4);
|
||||
} catch (std::exception &e) {
|
||||
fprintf(stderr, "General exception: %s\n", e.what());
|
||||
exit(5);
|
||||
}
|
||||
|
||||
auto output = END_CAPTURE_OUTPUT();
|
||||
|
||||
char **args, **earg;
|
||||
|
||||
Reference in New Issue
Block a user