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)
|
Contributing author: Markus Höhnerbach (RWTH)
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
#include <cstdio>
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include "pair_tersoff_intel.h"
|
#include "pair_tersoff_intel.h"
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
@ -30,30 +27,14 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
// Currently Intel compiler is required for this pair style.
|
#include <cmath>
|
||||||
// For convenience, base class routines are called if not using Intel compiler.
|
#include <cstring>
|
||||||
#ifndef __INTEL_COMPILER
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
PairTersoffIntel::PairTersoffIntel(LAMMPS *lmp) : PairTersoff(lmp)
|
// 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
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
#ifdef _LMP_INTEL_OFFLOAD
|
#ifdef _LMP_INTEL_OFFLOAD
|
||||||
#pragma offload_attribute(push,target(mic))
|
#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)
|
#pragma offload_attribute(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif // __INTEL_COMPILER
|
||||||
|
|||||||
@ -14,7 +14,14 @@
|
|||||||
|
|
||||||
#ifdef PAIR_CLASS
|
#ifdef PAIR_CLASS
|
||||||
// clang-format off
|
// 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);
|
PairStyle(tersoff/intel,PairTersoffIntel);
|
||||||
|
#else
|
||||||
|
PairStyle(tersoff/intel,PairTersoff);
|
||||||
|
#endif
|
||||||
// clang-format on
|
// clang-format on
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user