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

This commit is contained in:
sjplimp
2015-03-23 23:30:50 +00:00
parent 94d653c282
commit 84a5ec39ec
168 changed files with 1313 additions and 1218 deletions

View File

@ -23,10 +23,11 @@
#include "neigh_list.h"
#include "neigh_request.h"
#include "sna.h"
#include "memory.h"
#include "error.h"
#include "openmp_snap.h"
#include "domain.h"
#include "memory.h"
#include "error.h"
#include <cmath>
using namespace LAMMPS_NS;
@ -749,15 +750,7 @@ void PairSNAP::load_balance()
if (comm->cutghostuser <
neighbor->cutneighmax+extra_cutoff())
error->all(FLERR,"Communication cutoff is too small "
"for SNAP micro load balancing.\n"
"Typically this can happen, if you change "
"the neighbor skin after your pair_style "
"command or if your box dimensions grow "
"during the run.\n"
"You need to set it via "
"'communicate single cutoff NUMBER' "
"to the needed length.");
error->all(FLERR,"Communication cutoff too small for SNAP micro load balancing");
int nrecv = ghostinum;
int totalsend = 0;
@ -1239,12 +1232,11 @@ void PairSNAP::settings(int narg, char **arg)
// optional arguments
for (int i=0; i < narg; i++) {
if (i+2>narg) error->all(FLERR,"Illegal pair_style command."
" Too few arguments.");
if (i+2>narg) error->all(FLERR,"Illegal pair_style command");
if (strcmp(arg[i],"nthreads")==0) {
nthreads=force->inumeric(FLERR,arg[++i]);
#if defined(LMP_USER_OMP)
error->all(FLERR,"Please set number of threads via package omp command");
error->all(FLERR,"Must set number of threads via package omp command");
#else
omp_set_num_threads(nthreads);
comm->nthreads=nthreads;
@ -1271,8 +1263,8 @@ void PairSNAP::settings(int narg, char **arg)
double tmp = mincutoff + 0.1;
sprintf(buffer, "Communication cutoff is too small "
"for SNAP micro load balancing. "
"It will be increased to: %lf.",mincutoff+0.1);
"for SNAP micro load balancing, increased to %lf",
mincutoff+0.1);
if (comm->me==0)
error->warning(FLERR,buffer);
@ -1295,14 +1287,10 @@ void PairSNAP::settings(int narg, char **arg)
if (strcmp(arg[i],"determine")==0)
schedule_user = 5;
if (schedule_user == 0)
error->all(FLERR,"Illegal pair_style command."
" Illegal schedule argument.");
error->all(FLERR,"Illegal pair_style command");
continue;
}
char buffer[255];
sprintf(buffer, "Illegal pair_style command."
" Unrecognized argument: %s.\n",arg[i]);
error->all(FLERR,buffer);
error->all(FLERR,"Illegal pair_style command");
}
if (nthreads < 0)
@ -1322,8 +1310,7 @@ void PairSNAP::settings(int narg, char **arg)
use_shared_arrays ||
do_load_balance ||
schedule_user)
error->all(FLERR,"Illegal pair_style command."
"Advanced options require setting 'optimized 1'.");
error->all(FLERR,"Illegal pair_style command");
}
/* ----------------------------------------------------------------------