forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9409 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
01311d340a
commit
d41265166e
|
@ -11,14 +11,17 @@
|
|||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifndef LMP_ACCELERATOR_OMP_H
|
||||
#define LMP_ACCELERATOR_OMP_H
|
||||
|
||||
// true interface to USER-OMP, used in Neighbor class header file
|
||||
// used when USER-OMP is installed
|
||||
// NOTE: this file is *supposed* to be included multiple times
|
||||
|
||||
#ifdef LMP_USER_OMP
|
||||
|
||||
// true interface to USER-OMP
|
||||
|
||||
// this part is used inside the neighbor.h header file to
|
||||
// add functions to the Neighbor class definition
|
||||
|
||||
#ifdef LMP_INSIDE_NEIGHBOR_H
|
||||
|
||||
void half_nsq_no_newton_omp(class NeighList *);
|
||||
void half_nsq_no_newton_ghost_omp(class NeighList *);
|
||||
void half_nsq_newton_omp(class NeighList *);
|
||||
|
@ -53,11 +56,37 @@
|
|||
void respa_bin_newton_omp(class NeighList *);
|
||||
void respa_bin_newton_tri_omp(class NeighList *);
|
||||
|
||||
#else
|
||||
#else /* !LMP_INSIDE_NEIGHBOR_H */
|
||||
|
||||
// provide a DomainOMP class with some overrides for Domain
|
||||
#include "domain.h"
|
||||
|
||||
#ifndef LMP_DOMAIN_OMP_H
|
||||
#define LMP_DOMAIN_OMP_H
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class DomainOMP : public Domain {
|
||||
public:
|
||||
DomainOMP(class LAMMPS *lmp) : Domain(lmp) {};
|
||||
virtual ~DomainOMP() {};
|
||||
|
||||
// multi-threaded versions
|
||||
virtual void pbc();
|
||||
virtual void lamda2x(int);
|
||||
virtual void x2lamda(int);
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* LMP_DOMAIN_OMP_H */
|
||||
#endif /* !LMP_INSIDE_NEIGHBOR_H */
|
||||
|
||||
#else /* !LMP_USER_OMP */
|
||||
|
||||
// dummy interface to USER-OMP
|
||||
// needed for compiling Neighbor class when USER-OMP is not installed
|
||||
|
||||
#ifdef LMP_INSIDE_NEIGHBOR_H
|
||||
|
||||
void half_nsq_no_newton_omp(class NeighList *) {}
|
||||
void half_nsq_no_newton_ghost_omp(class NeighList *) {}
|
||||
void half_nsq_newton_omp(class NeighList *) {}
|
||||
|
@ -91,6 +120,6 @@
|
|||
void respa_bin_no_newton_omp(class NeighList *) {}
|
||||
void respa_bin_newton_omp(class NeighList *) {}
|
||||
void respa_bin_newton_tri_omp(class NeighList *) {}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !LMP_USER_OMP */
|
||||
|
|
|
@ -43,7 +43,6 @@ class ComputeTempCOM : public Compute {
|
|||
double vbias[3]; // stored velocity bias for one atom
|
||||
|
||||
void dof_compute();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "group.h"
|
||||
#include "output.h"
|
||||
#include "accelerator_cuda.h"
|
||||
#include "accelerator_omp.h"
|
||||
#include "timer.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
@ -457,7 +458,11 @@ void LAMMPS::create()
|
|||
else comm = new Comm(this);
|
||||
|
||||
if (cuda) domain = new DomainCuda(this);
|
||||
#ifdef LMP_USER_OMP
|
||||
else domain = new DomainOMP(this);
|
||||
#else
|
||||
else domain = new Domain(this);
|
||||
#endif
|
||||
|
||||
group = new Group(this);
|
||||
force = new Force(this); // must be after group, to create temperature
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
@ -217,9 +217,12 @@ class Neighbor : protected Pointers {
|
|||
void respa_bin_newton(class NeighList *);
|
||||
void respa_bin_newton_tri(class NeighList *);
|
||||
|
||||
// OpenMP multi-threaded neighbor list build versions
|
||||
// include prototypes for multi-threaded neighbor lists
|
||||
// builds or their corresponding dummy versions
|
||||
|
||||
#define LMP_INSIDE_NEIGHBOR_H
|
||||
#include "accelerator_omp.h"
|
||||
#undef LMP_INSIDE_NEIGHBOR_H
|
||||
|
||||
// pairwise stencil creation functions
|
||||
|
||||
|
|
Loading…
Reference in New Issue