silence compiler warnings and avoid infinite recursion in aspherical pair styles
This commit is contained in:
@ -248,7 +248,7 @@ double AnswerT::energy_virial(double *eatom, double **vatom,
|
|||||||
return energy_virial(eatom,vatom,virial);
|
return energy_virial(eatom,vatom,virial);
|
||||||
|
|
||||||
double evdwl=0.0;
|
double evdwl=0.0;
|
||||||
int ii, vstart=0, iend=_ev_stride;
|
int vstart=0, iend=_ev_stride;
|
||||||
if (_eflag) {
|
if (_eflag) {
|
||||||
iend=_ev_stride*2;
|
iend=_ev_stride*2;
|
||||||
#if (LAL_USE_OMP_SIMD == 1)
|
#if (LAL_USE_OMP_SIMD == 1)
|
||||||
|
|||||||
@ -239,14 +239,14 @@ void BaseAtomicT::compute(const int f_ago, const int inum_full,
|
|||||||
// Reneighbor on GPU if necessary and then compute forces, virials, energies
|
// Reneighbor on GPU if necessary and then compute forces, virials, energies
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
template <class numtyp, class acctyp>
|
template <class numtyp, class acctyp>
|
||||||
int ** BaseAtomicT::compute(const int ago, const int inum_full,
|
int **BaseAtomicT::compute(const int ago, const int inum_full,
|
||||||
const int nall, double **host_x, int *host_type,
|
const int nall, double **host_x, int *host_type,
|
||||||
double *sublo, double *subhi, tagint *tag,
|
double *sublo, double *subhi, tagint *tag,
|
||||||
int **nspecial, tagint **special,
|
int **nspecial, tagint **special,
|
||||||
const bool eflag_in, const bool vflag_in,
|
const bool eflag_in, const bool vflag_in,
|
||||||
const bool eatom, const bool vatom,
|
const bool eatom, const bool vatom,
|
||||||
int &host_start, int **ilist, int **jnum,
|
int &host_start, int **ilist, int **jnum,
|
||||||
const double cpu_time, bool &success) {
|
const double cpu_time, bool &success) {
|
||||||
acc_timers();
|
acc_timers();
|
||||||
int eflag, vflag;
|
int eflag, vflag;
|
||||||
if (eatom) eflag=2;
|
if (eatom) eflag=2;
|
||||||
|
|||||||
@ -133,20 +133,12 @@ class BaseAtomic {
|
|||||||
int &host_start, const double cpu_time, bool &success);
|
int &host_start, const double cpu_time, bool &success);
|
||||||
|
|
||||||
/// Pair loop with device neighboring
|
/// Pair loop with device neighboring
|
||||||
int * compute(const int ago, const int inum_full,
|
int **compute(const int ago, const int inum_full,
|
||||||
const int nall, double **host_x, int *host_type, double *sublo,
|
const int nall, double **host_x, int *host_type, double *sublo,
|
||||||
double *subhi, tagint *tag, int **nspecial,
|
double *subhi, tagint *tag, int **nspecial,
|
||||||
tagint **special, const bool eflag, const bool vflag,
|
tagint **special, const bool eflag, const bool vflag,
|
||||||
const bool eatom, const bool vatom, int &host_start,
|
const bool eatom, const bool vatom, int &host_start,
|
||||||
const double cpu_time, bool &success);
|
int **ilist, int **numj, const double cpu_time, bool &success);
|
||||||
|
|
||||||
/// Pair loop with device neighboring
|
|
||||||
int ** compute(const int ago, const int inum_full,
|
|
||||||
const int nall, double **host_x, int *host_type, double *sublo,
|
|
||||||
double *subhi, tagint *tag, int **nspecial,
|
|
||||||
tagint **special, const bool eflag, const bool vflag,
|
|
||||||
const bool eatom, const bool vatom, int &host_start,
|
|
||||||
int **ilist, int **numj, const double cpu_time, bool &success);
|
|
||||||
|
|
||||||
// -------------------------- DEVICE DATA -------------------------
|
// -------------------------- DEVICE DATA -------------------------
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@ BaseEllipsoidT::~BaseEllipsoid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class numtyp, class acctyp>
|
template <class numtyp, class acctyp>
|
||||||
int BaseEllipsoidT::bytes_per_atom(const int max_nbors) const {
|
int BaseEllipsoidT::bytes_per_atom_ellipsoid(const int max_nbors) const {
|
||||||
return device->atom.bytes_per_atom()+ans->bytes_per_atom()+
|
return device->atom.bytes_per_atom()+ans->bytes_per_atom()+
|
||||||
nbor->bytes_per_atom(max_nbors);
|
nbor->bytes_per_atom(max_nbors);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,7 +108,7 @@ class BaseEllipsoid {
|
|||||||
void output_times();
|
void output_times();
|
||||||
|
|
||||||
/// Returns memory usage on device per atom
|
/// Returns memory usage on device per atom
|
||||||
int bytes_per_atom(const int max_nbors) const;
|
int bytes_per_atom_ellipsoid(const int max_nbors) const;
|
||||||
|
|
||||||
/// Total host memory used by library for pair style
|
/// Total host memory used by library for pair style
|
||||||
double host_memory_usage_base() const;
|
double host_memory_usage_base() const;
|
||||||
@ -173,18 +173,13 @@ class BaseEllipsoid {
|
|||||||
const double cpu_time, bool &success, double **quat);
|
const double cpu_time, bool &success, double **quat);
|
||||||
|
|
||||||
/// Pair loop with device neighboring
|
/// Pair loop with device neighboring
|
||||||
int** compute(const int ago, const int inum_full, const int nall,
|
int**compute(const int ago, const int inum_full, const int nall,
|
||||||
double **host_x, int *host_type, double *sublo,
|
double **host_x, int *host_type, double *sublo,
|
||||||
double *subhi, tagint *tag, int **nspecial,
|
double *subhi, tagint *tag, int **nspecial,
|
||||||
tagint **special, const bool eflag, const bool vflag,
|
tagint **special, const bool eflag, const bool vflag,
|
||||||
const bool eatom, const bool vatom, int &host_start,
|
const bool eatom, const bool vatom, int &host_start,
|
||||||
int **ilist, int **numj, const double cpu_time, bool &success,
|
int **ilist, int **numj, const double cpu_time, bool &success,
|
||||||
double **host_quat);
|
double **host_quat);
|
||||||
|
|
||||||
/// Build neighbor list on accelerator
|
|
||||||
void build_nbor_list(const int inum, const int host_inum, const int nall,
|
|
||||||
double **host_x, int *host_type, double *sublo,
|
|
||||||
double *subhi, bool &success);
|
|
||||||
|
|
||||||
// -------------------------- DEVICE DATA -------------------------
|
// -------------------------- DEVICE DATA -------------------------
|
||||||
|
|
||||||
|
|||||||
@ -198,7 +198,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int ngpu,
|
|||||||
// Find deviceID with most CUs (priority given to the accelerator type)
|
// Find deviceID with most CUs (priority given to the accelerator type)
|
||||||
if (_first_device < 0) {
|
if (_first_device < 0) {
|
||||||
int best_device = 0;
|
int best_device = 0;
|
||||||
int best_cus = gpu->cus(0);
|
unsigned best_cus = gpu->cus(0);
|
||||||
bool type_match = (gpu->device_type(0) == type);
|
bool type_match = (gpu->device_type(0) == type);
|
||||||
for (int i = 1; i < gpu->num_devices(); i++) {
|
for (int i = 1; i < gpu->num_devices(); i++) {
|
||||||
if (type_match==true && gpu->device_type(i)!=type)
|
if (type_match==true && gpu->device_type(i)!=type)
|
||||||
|
|||||||
@ -62,9 +62,6 @@ class EAM : public BaseAtomic<numtyp, acctyp> {
|
|||||||
/** \note This is called at the beginning of the init() routine **/
|
/** \note This is called at the beginning of the init() routine **/
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
/// Returns memory usage on device per atom
|
|
||||||
int bytes_per_atom(const int max_nbors) const;
|
|
||||||
|
|
||||||
/// Total host memory used by library for pair style
|
/// Total host memory used by library for pair style
|
||||||
double host_memory_usage() const;
|
double host_memory_usage() const;
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ GayBerneT::~GayBerne() {
|
|||||||
|
|
||||||
template <class numtyp, class acctyp>
|
template <class numtyp, class acctyp>
|
||||||
int GayBerneT::bytes_per_atom(const int max_nbors) const {
|
int GayBerneT::bytes_per_atom(const int max_nbors) const {
|
||||||
return this->bytes_per_atom(max_nbors);
|
return this->bytes_per_atom_ellipsoid(max_nbors);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class numtyp, class acctyp>
|
template <class numtyp, class acctyp>
|
||||||
|
|||||||
@ -43,7 +43,7 @@ RESquaredT::~RESquared() {
|
|||||||
|
|
||||||
template <class numtyp, class acctyp>
|
template <class numtyp, class acctyp>
|
||||||
int RESquaredT::bytes_per_atom(const int max_nbors) const {
|
int RESquaredT::bytes_per_atom(const int max_nbors) const {
|
||||||
return this->bytes_per_atom(max_nbors);
|
return this->bytes_per_atom_ellipsoid(max_nbors);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class numtyp, class acctyp>
|
template <class numtyp, class acctyp>
|
||||||
|
|||||||
Reference in New Issue
Block a user