recover current package names. this will become simpler once #2525 is implemented

This commit is contained in:
Axel Kohlmeyer
2021-01-12 20:23:57 -05:00
parent 702de49f59
commit 22bf810b63
2 changed files with 10 additions and 5 deletions

View File

@ -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'

View File

@ -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