diff --git a/.github/workflows/unittest-macos.yml b/.github/workflows/unittest-macos.yml index f9c2a838d6..b0bc4b2727 100644 --- a/.github/workflows/unittest-macos.yml +++ b/.github/workflows/unittest-macos.yml @@ -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 \ diff --git a/cmake/Modules/OpenCLLoader.cmake b/cmake/Modules/OpenCLLoader.cmake index 4b5c5a1200..411058e0b1 100644 --- a/cmake/Modules/OpenCLLoader.cmake +++ b/cmake/Modules/OpenCLLoader.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) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 20e0bd1f12..5dfbe48ffa 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -4162,6 +4162,7 @@ zenodo Zepeda zflag Zhang +Zhao Zhen zhi Zhigilei diff --git a/src/KOKKOS/pair_meam_kokkos.h b/src/KOKKOS/pair_meam_kokkos.h index 66b5700a72..82f48aa997 100644 --- a/src/KOKKOS/pair_meam_kokkos.h +++ b/src/KOKKOS/pair_meam_kokkos.h @@ -13,9 +13,6 @@ #ifdef PAIR_CLASS // clang-format off -PairStyle(meam/c/kk,PairMEAMKokkos); -PairStyle(meam/c/kk/device,PairMEAMKokkos); -PairStyle(meam/c/kk/host,PairMEAMKokkos); PairStyle(meam/kk,PairMEAMKokkos); PairStyle(meam/kk/device,PairMEAMKokkos); PairStyle(meam/kk/host,PairMEAMKokkos); diff --git a/src/MEAM/pair_meam.h b/src/MEAM/pair_meam.h index a89714bfa9..3d50ca9368 100644 --- a/src/MEAM/pair_meam.h +++ b/src/MEAM/pair_meam.h @@ -14,7 +14,6 @@ #ifdef PAIR_CLASS // clang-format off PairStyle(meam,PairMEAM); -PairStyle(meam/c,PairMEAM); // clang-format on #else diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 411bdfb60b..47ad3d260f 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -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; diff --git a/src/fix.cpp b/src/fix.cpp index 754948fdd1..a93d4b954a 100644 --- a/src/fix.cpp +++ b/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; } } diff --git a/src/pair_deprecated.cpp b/src/pair_deprecated.cpp index 298fc26fd0..2c86b252ea 100644 --- a/src/pair_deprecated.cpp +++ b/src/pair_deprecated.cpp @@ -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"); } diff --git a/src/pair_deprecated.h b/src/pair_deprecated.h index 1a705c9051..8db8b3541d 100644 --- a/src/pair_deprecated.h +++ b/src/pair_deprecated.h @@ -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); diff --git a/src/version.h b/src/version.h index 37c44b49f2..64d5210270 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1,2 @@ #define LAMMPS_VERSION "17 Apr 2024" +#define LAMMPS_UPDATE "Development" diff --git a/unittest/cplusplus/test_advanced_utils.cpp b/unittest/cplusplus/test_advanced_utils.cpp index 0453ef0143..43ac5dc9cf 100644 --- a/unittest/cplusplus/test_advanced_utils.cpp +++ b/unittest/cplusplus/test_advanced_utils.cpp @@ -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;