git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6305 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2011-06-07 15:25:20 +00:00
parent 9f8aa9f5a8
commit d9824c7583
68 changed files with 102 additions and 95 deletions

View File

@ -43,10 +43,10 @@ extern double lmp_gpu_forces(double **f, double **tor, double *eatom,
FixGPU::FixGPU(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
{
if (narg < 7) error->all("Illegal fix gpu command");
if (lmp->cuda) error->all("Cannot use fix gpu with USER-CUDA mode enabled");
if (strcmp(arg[1],"all") != 0)
error->all("Illegal fix gpu command");
if (narg < 7) error->all("Illegal fix gpu command");
if (strcmp(arg[1],"all") != 0) error->all("Illegal fix gpu command");
int first_gpu, last_gpu;

View File

@ -293,7 +293,6 @@ void PairEAM::compute(int eflag, int vflag)
}
if (eflag) evdwl = phi;
if (evflag) ev_tally(i,j,nlocal,newton_pair,
evdwl,0.0,fpair,delx,dely,delz);
}

View File

@ -27,24 +27,6 @@ namespace LAMMPS_NS {
class PairEAM : public Pair {
public:
double cutforcesq,cutmax;
// per-atom arrays
double *rho,*fp;
// potentials as array data
int nrho,nr;
int nfrho,nrhor,nz2r;
double **frho,**rhor,**z2r;
int *type2frho,**type2rhor,**type2z2r;
// potentials in spline form used for force computation
double dr,rdr,drho,rdrho;
double ***rhor_spline,***frho_spline,***z2r_spline;
PairEAM(class LAMMPS *);
virtual ~PairEAM();
void compute(int, int);
@ -63,6 +45,23 @@ class PairEAM : public Pair {
protected:
int nmax; // allocated size of per-atom arrays
double cutforcesq,cutmax;
// per-atom arrays
double *rho,*fp;
// potentials as array data
int nrho,nr;
int nfrho,nrhor,nz2r;
double **frho,**rhor,**z2r;
int *type2frho,**type2rhor,**type2z2r;
// potentials in spline form used for force computation
double dr,rdr,drho,rdrho;
double ***rhor_spline,***frho_spline,***z2r_spline;
// potentials as file data

View File

@ -24,7 +24,7 @@ PairStyle(eam/alloy,PairEAMAlloy)
namespace LAMMPS_NS {
// use virtual public since this class is parent in multiple inheritance
// need virtual public b/c of how eam/alloy/opt inherits from it
class PairEAMAlloy : virtual public PairEAM {
public:

View File

@ -24,7 +24,7 @@ PairStyle(eam/fs,PairEAMFS)
namespace LAMMPS_NS {
// use virtual public since this class is parent in multiple inheritance
// need virtual public b/c of how eam/fs/opt inherits from it
class PairEAMFS : virtual public PairEAM {
public:

View File

@ -65,7 +65,7 @@ AtomVecAngleCuda::AtomVecAngleCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
maxsend=0;
cudable=true;

View File

@ -65,7 +65,7 @@ AtomVecAtomicCuda::AtomVecAtomicCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
maxsend=0;
cudable=true;

View File

@ -64,7 +64,7 @@ AtomVecChargeCuda::AtomVecChargeCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
maxsend=0;
cudable=true;

View File

@ -65,7 +65,7 @@ AtomVecFullCuda::AtomVecFullCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
maxsend=0;
cudable=true;

View File

@ -56,7 +56,7 @@ CommCuda::CommCuda(LAMMPS *lmp):Comm(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
cu_pbc=NULL;
cu_slablo=NULL;

View File

@ -64,7 +64,7 @@ ComputePressureCuda::ComputePressureCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
cudable = 1;
// store temperature ID used by pressure computation

View File

@ -59,7 +59,7 @@ ComputeTempCuda::ComputeTempCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg != 3) error->all("Illegal compute temp/cuda command");

View File

@ -60,7 +60,7 @@ ComputeTempPartialCuda::ComputeTempPartialCuda(LAMMPS *lmp, int narg, char **arg
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg != 6) error->all("Illegal compute temp/partial command");

View File

@ -37,7 +37,7 @@ CudaNeighList::CudaNeighList(LAMMPS *lmp, class NeighList* neigh_list) : Pointer
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
MYDBG(printf("# CUDA: CudaNeighList::cudaNeighList() ... start\n");)
this->neigh_list = neigh_list;

View File

@ -55,7 +55,7 @@ DomainCuda::DomainCuda(LAMMPS *lmp) : Domain(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
}
/* ---------------------------------------------------------------------- */

View File

@ -45,7 +45,7 @@ FixAddForceCuda::FixAddForceCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg < 6) error->all("Illegal fix addforce/cuda command");

View File

@ -44,7 +44,7 @@ FixAveForceCuda::FixAveForceCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg != 6) error->all("Illegal fix aveforce command");

View File

@ -54,7 +54,7 @@ FixEnforce2DCuda::FixEnforce2DCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg != 3) error->all("Illegal fix enforce2d command");
}

View File

@ -43,7 +43,7 @@ FixFreezeCuda::FixFreezeCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg != 3) error->all("Illegal fix freeze command");

View File

@ -46,7 +46,7 @@ FixGravityCuda::FixGravityCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg < 5) error->all("Illegal fix gravity command");

View File

@ -53,7 +53,7 @@ FixNHCuda::FixNHCuda(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg < 4) error->all("Illegal fix nvt/npt/nph command");

View File

@ -25,7 +25,7 @@ FixNPTCuda::FixNPTCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (!tstat_flag)
error->all("Temperature control must be used with fix npt");

View File

@ -56,7 +56,7 @@ FixNVECuda::FixNVECuda(LAMMPS *lmp, int narg, char **arg) :
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (strcmp(style,"nve/sphere") != 0 && narg < 3)
error->all("Illegal fix nve command");

View File

@ -42,7 +42,7 @@ FixSetForceCuda::FixSetForceCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg != 6) error->all("Illegal fix setforce/cuda command");

View File

@ -49,7 +49,7 @@ FixShakeCuda::FixShakeCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
cuda->accelerator(0,NULL);
MPI_Comm_rank(world,&me);

View File

@ -61,7 +61,7 @@ FixTempBerendsenCuda::FixTempBerendsenCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg != 6) error->all("Illegal fix temp/berendsen/cuda command");

View File

@ -50,7 +50,7 @@ FixTempRescaleCuda::FixTempRescaleCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg < 8) error->all("Illegal fix temp/rescale/cuda command");

View File

@ -52,7 +52,7 @@ FixTempRescaleLimitCuda::FixTempRescaleLimitCuda(LAMMPS *lmp, int narg, char **a
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if (narg < 9) error->all("Illegal fix temp/rescale/limit/cuda command");

View File

@ -42,7 +42,7 @@ FixViscousCuda::FixViscousCuda(LAMMPS *lmp, int narg, char **arg) :
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
cu_gamma=NULL;
}

View File

@ -64,7 +64,7 @@ ModifyCuda::ModifyCuda(LAMMPS *lmp) : Modify(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
n_initial_integrate_cuda = 0;
n_post_integrate_cuda = 0;

View File

@ -37,7 +37,7 @@ NeighborCuda::NeighborCuda(LAMMPS *lmp) : Neighbor(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
}
/* ---------------------------------------------------------------------- */

View File

@ -62,7 +62,7 @@ PairBornCoulLongCuda::PairBornCoulLongCuda(LAMMPS *lmp) : PairBornCoulLong(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairBuckCoulCutCuda::PairBuckCoulCutCuda(LAMMPS *lmp) : PairBuckCoulCut(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -62,7 +62,7 @@ PairBuckCoulLongCuda::PairBuckCoulLongCuda(LAMMPS *lmp) : PairBuckCoulLong(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairBuckCuda::PairBuckCuda(LAMMPS *lmp) : PairBuck(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -70,7 +70,7 @@ PairCGCMMCoulCutCuda::PairCGCMMCoulCutCuda(LAMMPS *lmp) : PairCGCMMCoulCut(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cg_type_double = NULL;

View File

@ -70,7 +70,7 @@ PairCGCMMCoulDebyeCuda::PairCGCMMCoulDebyeCuda(LAMMPS *lmp) : PairCGCMMCoulCut(l
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cg_type_double = NULL;

View File

@ -71,7 +71,7 @@ PairCGCMMCoulLongCuda::PairCGCMMCoulLongCuda(LAMMPS *lmp) : PairCGCMMCoulLong(lm
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cg_type_double = NULL;

View File

@ -70,7 +70,7 @@ PairCGCMMCuda::PairCGCMMCuda(LAMMPS *lmp) : PairCGCMM(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cg_type_double = NULL;

View File

@ -34,7 +34,7 @@ PairEAMAlloyCuda::PairEAMAlloyCuda(LAMMPS *lmp) : PairEAMCuda(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
one_coeff = 1;
}

View File

@ -71,7 +71,7 @@ PairEAMCuda::PairEAMCuda(LAMMPS *lmp) : PairEAM(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -34,7 +34,7 @@ PairEAMFSCuda::PairEAMFSCuda(LAMMPS *lmp) : PairEAMCuda(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
one_coeff = 1;
}

View File

@ -72,7 +72,7 @@ PairGranHookeCuda::PairGranHookeCuda(LAMMPS *lmp) : PairGranHooke(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -70,7 +70,7 @@ PairLJ96CutCuda::PairLJ96CutCuda(LAMMPS *lmp) : PairLJ96Cut(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJCharmmCoulCharmmCuda::PairLJCharmmCoulCharmmCuda(LAMMPS *lmp) : PairLJChar
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJCharmmCoulCharmmImplicitCuda::PairLJCharmmCoulCharmmImplicitCuda(LAMMPS *l
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -62,7 +62,7 @@ PairLJCharmmCoulLongCuda::PairLJCharmmCoulLongCuda(LAMMPS *lmp) : PairLJCharmmCo
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJClass2CoulCutCuda::PairLJClass2CoulCutCuda(LAMMPS *lmp) : PairLJClass2Coul
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -62,7 +62,7 @@ PairLJClass2CoulLongCuda::PairLJClass2CoulLongCuda(LAMMPS *lmp) : PairLJClass2Co
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -70,7 +70,7 @@ PairLJClass2Cuda::PairLJClass2Cuda(LAMMPS *lmp) : PairLJClass2(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJCutCoulCutCuda::PairLJCutCoulCutCuda(LAMMPS *lmp) : PairLJCutCoulCut(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJCutCoulDebyeCuda::PairLJCutCoulDebyeCuda(LAMMPS *lmp) : PairLJCutCoulDebye
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -62,7 +62,7 @@ PairLJCutCoulLongCuda::PairLJCutCoulLongCuda(LAMMPS *lmp) : PairLJCutCoulLong(lm
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -70,7 +70,7 @@ PairLJCutCuda::PairLJCutCuda(LAMMPS *lmp) : PairLJCut(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -70,7 +70,7 @@ PairLJCutExperimentalCuda::PairLJCutExperimentalCuda(LAMMPS *lmp) : PairLJCut(lm
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -70,7 +70,7 @@ PairLJExpandCuda::PairLJExpandCuda(LAMMPS *lmp) : PairLJExpand(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJGromacsCoulGromacsCuda::PairLJGromacsCoulGromacsCuda(LAMMPS *lmp) : PairLJ
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJGromacsCuda::PairLJGromacsCuda(LAMMPS *lmp) : PairLJGromacs(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -55,7 +55,7 @@ PairLJSmoothCuda::PairLJSmoothCuda(LAMMPS *lmp) : PairLJSmooth(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -70,7 +70,7 @@ PairMorseCuda::PairMorseCuda(LAMMPS *lmp) : PairMorse(lmp)
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
allocated2 = false;
cuda->shared_data.pair.cudable_force = 1;

View File

@ -102,7 +102,7 @@ PPPMCuda::PPPMCuda(LAMMPS *lmp, int narg, char **arg) : PPPM(lmp, (narg==2?1:nar
{
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
if ((narg > 3)||(narg<1)) error->all("Illegal kspace_style pppm/cuda command");
#ifndef FFT_CUFFT

View File

@ -62,7 +62,7 @@ using namespace LAMMPS_NS;
VerletCuda::VerletCuda(LAMMPS *lmp, int narg, char **arg) : Verlet(lmp, narg, arg) {
cuda = lmp->cuda;
if(cuda == NULL)
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Use no '-a' command line argument, or '-a cuda'.");
error->all("You cannot use a /cuda class, without activating 'cuda' acceleration. Provide '-c on' as command-line argument to LAMMPS..");
modify_cuda=(ModifyCuda*) modify;
}

View File

@ -165,8 +165,8 @@ void DumpCFG::write_header(bigint n)
// calculate total # of data lines to be written on a writing proc
if (multiproc) nchosen = nmine;
else MPI_Reduce(&nmine,&nchosen,1,MPI_INT,MPI_SUM,0,world);
if (multiproc) nchosen = nme;
else MPI_Reduce(&nme,&nchosen,1,MPI_INT,MPI_SUM,0,world);
// allocate memory needed for data rearrangement on writing proc(s)

View File

@ -38,7 +38,6 @@ class DumpCustom : public Dump {
int *thresh_op; // threshhold operation for each nthresh
double *thresh_value; // threshhold value for each nthresh
int nmine; // # of lines I am dumping
int *vtype; // type of each vector (INT, DOUBLE)
char **vformat; // format string for each vector element

View File

@ -1259,9 +1259,6 @@ void Input::suffix()
lmp->suffix = new char[n];
strcpy(lmp->suffix,arg[0]);
lmp->suffix_enable = 1;
if (!lmp->cuda && strcmp(lmp->suffix,"cuda") == 0)
error->all("Cannot use suffix cuda without USER-CUDA installed");
}
}

View File

@ -284,8 +284,6 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
if (cudaflag == 0) {
cuda = NULL;
if (suffix && strcmp(suffix,"cuda") == 0)
error->all("Cannot use -suffix cuda without USER-CUDA installed");
} else if (cudaflag == 1) {
cuda = new Cuda(this);
if (!cuda->cuda_exists)

View File

@ -358,13 +358,13 @@ class Memory : protected Pointers {
const char *name)
{
bigint nbytes = sizeof(TYPE) * n1*n2*n3*n4;
TYPE *data = (double *) smalloc(nbytes,name);
TYPE *data = (TYPE *) smalloc(nbytes,name);
nbytes = sizeof(TYPE *) * n1*n2*n3;
TYPE **cube = (double **) smalloc(nbytes,name);
TYPE **cube = (TYPE **) smalloc(nbytes,name);
nbytes = sizeof(TYPE **) * n1*n2;
TYPE ***plane = (double ***) smalloc(nbytes,name);
TYPE ***plane = (TYPE ***) smalloc(nbytes,name);
nbytes = sizeof(TYPE ***) * n1;
array = (double ****) smalloc(nbytes,name);
array = (TYPE ****) smalloc(nbytes,name);
int i,j,k;
int n = 0;

View File

@ -58,8 +58,13 @@ Update::Update(LAMMPS *lmp) : Pointers(lmp)
minimize_style = NULL;
minimize = NULL;
str = (char *) "verlet";
create_integrate(1,&str,lmp->suffix);
if (lmp->cuda) {
str = (char *) "verlet/cuda";
create_integrate(1,&str,NULL);
} else {
str = (char *) "verlet";
create_integrate(1,&str,NULL);
}
str = (char *) "cg";
create_minimize(1,&str);
@ -82,6 +87,16 @@ Update::~Update()
void Update::init()
{
// if USER-CUDA mode is enabled:
// integrate/minimize style must be CUDA variant
if (whichflag == 1 && lmp->cuda)
if (strstr(integrate_style,"cuda") == NULL)
error->all("USER-CUDA mode requires CUDA variant of run style");
if (whichflag == 2 && lmp->cuda)
if (strstr(minimize_style,"cuda") == NULL)
error->all("USER-CUDA mode requires CUDA variant of min style");
// init the appropriate integrate and/or minimize class
// if neither (e.g. from write_restart) then just return