recover current package names. this will become simpler once #2525 is implemented
This commit is contained in:
@ -1452,7 +1452,7 @@ class lammps(object):
|
||||
for p in [b'GPU', b'KOKKOS', b'USER-INTEL', b'USER-OMP']:
|
||||
c = b'api'
|
||||
result[p.decode()] = {}
|
||||
for s in [b'cuda', b'hip', b'pthreads', b'opencl', b'openmp']:
|
||||
for s in [b'cuda', b'hip', b'pthreads', b'opencl', b'openmp', b'serial']:
|
||||
if self.lib.lammps_config_accelerator(p,c,s):
|
||||
result[p.decode()][c.decode()] = s.decode()
|
||||
c = b'precision'
|
||||
|
||||
13
src/info.cpp
13
src/info.cpp
@ -1208,7 +1208,7 @@ bool Info::has_accelerator_feature(const std::string &package,
|
||||
}
|
||||
#endif
|
||||
#if defined(LMP_USER_OMP)
|
||||
if (package == "OPENMP") {
|
||||
if (package == "USER-OMP") {
|
||||
if (category == "precision") {
|
||||
if (setting == "double") return true;
|
||||
else return false;
|
||||
@ -1216,14 +1216,15 @@ bool Info::has_accelerator_feature(const std::string &package,
|
||||
if (category == "api") {
|
||||
#if defined(_OPENMP)
|
||||
if (setting == "openmp") return true;
|
||||
else return false;
|
||||
#else
|
||||
if (setting == "serial") return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined(LMP_USER_INTEL)
|
||||
if (package == "INTEL") {
|
||||
if (package == "USER-INTEL") {
|
||||
if (category == "precision") {
|
||||
if (setting == "double") return true;
|
||||
else if (setting == "mixed") return true;
|
||||
@ -1231,8 +1232,12 @@ bool Info::has_accelerator_feature(const std::string &package,
|
||||
else return false;
|
||||
}
|
||||
if (category == "api") {
|
||||
#if defined(_OPENMP)
|
||||
if (setting == "openmp") return true;
|
||||
else return false;
|
||||
#else
|
||||
if (setting == "serial") return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user