Merge pull request #2748 from akohlmey/collected-small-changes
Collected small changes and fixes for the next patch release
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
message(STATUS "Downloading and building OpenCL loader library")
|
message(STATUS "Downloading and building OpenCL loader library")
|
||||||
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2021.04.29.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2021.05.02.tar.gz" CACHE STRING "URL for OpenCL loader tarball")
|
||||||
set(OPENCL_LOADER_MD5 "bd0bcd6c0989bffc24c76c2e0d67d2c6" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
set(OPENCL_LOADER_MD5 "29180b05056578afda92f0d394c3a373" CACHE STRING "MD5 checksum of OpenCL loader tarball")
|
||||||
mark_as_advanced(OPENCL_LOADER_URL)
|
mark_as_advanced(OPENCL_LOADER_URL)
|
||||||
mark_as_advanced(OPENCL_LOADER_MD5)
|
mark_as_advanced(OPENCL_LOADER_MD5)
|
||||||
|
|
||||||
|
|||||||
21
src/info.cpp
21
src/info.cpp
@ -39,6 +39,7 @@
|
|||||||
#include "pair.h"
|
#include "pair.h"
|
||||||
#include "pair_hybrid.h"
|
#include "pair_hybrid.h"
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
|
#include "text_file_reader.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
|
|
||||||
@ -1261,7 +1262,25 @@ std::string Info::get_os_info()
|
|||||||
#else
|
#else
|
||||||
struct utsname ut;
|
struct utsname ut;
|
||||||
uname(&ut);
|
uname(&ut);
|
||||||
buf = fmt::format("{} {} on {}", ut.sysname, ut.release, ut.machine);
|
|
||||||
|
// try to get OS distribution name, if available
|
||||||
|
std::string distro = ut.sysname;
|
||||||
|
if (utils::file_is_readable("/etc/os-release")) {
|
||||||
|
try {
|
||||||
|
TextFileReader reader("/etc/os-release","");
|
||||||
|
while (1) {
|
||||||
|
auto words = reader.next_values(0,"=");
|
||||||
|
if ((words.count() > 1) && (words.next_string() == "PRETTY_NAME")) {
|
||||||
|
distro += " " + utils::trim(words.next_string());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (std::exception &e) {
|
||||||
|
; // EOF but keyword not found
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buf = fmt::format("{} {} on {}", distro, ut.release, ut.machine);
|
||||||
#endif
|
#endif
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,7 +99,6 @@ TEST_F(LAMMPS_plain, InitMembers)
|
|||||||
EXPECT_STREQ(LAMMPS::git_branch, "(unknown)");
|
EXPECT_STREQ(LAMMPS::git_branch, "(unknown)");
|
||||||
EXPECT_STREQ(LAMMPS::git_descriptor, "(unknown)");
|
EXPECT_STREQ(LAMMPS::git_descriptor, "(unknown)");
|
||||||
}
|
}
|
||||||
EXPECT_EQ(lmp->comm->nthreads, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(LAMMPS_plain, TestStyles)
|
TEST_F(LAMMPS_plain, TestStyles)
|
||||||
@ -234,9 +233,6 @@ TEST_F(LAMMPS_omp, InitMembers)
|
|||||||
EXPECT_STREQ(LAMMPS::git_branch, "(unknown)");
|
EXPECT_STREQ(LAMMPS::git_branch, "(unknown)");
|
||||||
EXPECT_STREQ(LAMMPS::git_descriptor, "(unknown)");
|
EXPECT_STREQ(LAMMPS::git_descriptor, "(unknown)");
|
||||||
}
|
}
|
||||||
#if 0 // temporarily disabled. MacOS behaves different from Linux here.
|
|
||||||
EXPECT_EQ(lmp->comm->nthreads, 2);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// test fixture for Kokkos tests
|
// test fixture for Kokkos tests
|
||||||
@ -326,10 +322,10 @@ TEST_F(LAMMPS_kokkos, InitMembers)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if Comm::nthreads is initialized to either 1 or 2 (from the previous tests)
|
|
||||||
TEST(LAMMPS_init, OpenMP)
|
TEST(LAMMPS_init, OpenMP)
|
||||||
{
|
{
|
||||||
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP();
|
||||||
|
if (Info::get_openmp_info() == "OpenMP not enabled") GTEST_SKIP();
|
||||||
|
|
||||||
FILE *fp = fopen("in.lammps_empty", "w");
|
FILE *fp = fopen("in.lammps_empty", "w");
|
||||||
fputs("\n", fp);
|
fputs("\n", fp);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
lammps_version: 10 Mar 2021
|
lammps_version: 10 Mar 2021
|
||||||
date_generated: Tue Mar 23 08:05:02 202
|
date_generated: Tue Mar 23 08:05:02 202
|
||||||
epsilon: 1e-14
|
epsilon: 2e-14
|
||||||
prerequisites: ! |
|
prerequisites: ! |
|
||||||
atom full
|
atom full
|
||||||
dihedral table/cut
|
dihedral table/cut
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
lammps_version: 10 Mar 2021
|
lammps_version: 10 Mar 2021
|
||||||
date_generated: Tue Mar 23 08:06:45 202
|
date_generated: Tue Mar 23 08:06:45 202
|
||||||
epsilon: 1e-14
|
epsilon: 2e-14
|
||||||
prerequisites: ! |
|
prerequisites: ! |
|
||||||
atom full
|
atom full
|
||||||
dihedral table/cut
|
dihedral table/cut
|
||||||
|
|||||||
Reference in New Issue
Block a user