more general mapping of tersoff/intel to tersoff when non-Intel compiler is used
This commit is contained in:
@ -16,11 +16,8 @@
|
||||
Contributing author: Markus Höhnerbach (RWTH)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
|
||||
#include <cstring>
|
||||
#include "pair_tersoff_intel.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
@ -30,30 +27,14 @@
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
// Currently Intel compiler is required for this pair style.
|
||||
// For convenience, base class routines are called if not using Intel compiler.
|
||||
#ifndef __INTEL_COMPILER
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
PairTersoffIntel::PairTersoffIntel(LAMMPS *lmp) : PairTersoff(lmp)
|
||||
{
|
||||
}
|
||||
|
||||
void PairTersoffIntel::compute(int eflag, int vflag)
|
||||
{
|
||||
PairTersoff::compute(eflag, vflag);
|
||||
}
|
||||
|
||||
void PairTersoffIntel::init_style()
|
||||
{
|
||||
if (comm->me == 0) {
|
||||
error->warning(FLERR, "Tersoff/intel currently requires intel compiler. "
|
||||
"Using MANYBODY version.");
|
||||
}
|
||||
PairTersoff::init_style();
|
||||
}
|
||||
|
||||
#else
|
||||
// Currently the Intel compiler is required for this pair style.
|
||||
// For convenience, the style is mapped to the base class for other compilers
|
||||
#ifdef __INTEL_COMPILER
|
||||
|
||||
#ifdef _LMP_INTEL_OFFLOAD
|
||||
#pragma offload_attribute(push,target(mic))
|
||||
@ -1439,4 +1420,4 @@ void IntelKernelTersoff<flt_t,acc_t,mic, pack_i>::attractive_vector(
|
||||
#pragma offload_attribute(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // __INTEL_COMPILER
|
||||
|
||||
@ -14,7 +14,14 @@
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
// clang-format off
|
||||
// Currently the Intel compilers are required for this pair style.
|
||||
// For convenience, we are mapping the style to the base class.
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
PairStyle(tersoff/intel,PairTersoffIntel);
|
||||
#else
|
||||
PairStyle(tersoff/intel,PairTersoff);
|
||||
#endif
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user