Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes
This commit is contained in:
@ -92,7 +92,7 @@ int lje_gpu_init(const int ntypes, double **cutsq, double **host_lj1,
|
||||
// ---------------------------------------------------------------------------
|
||||
// Copy updated coeffs from host to device
|
||||
// ---------------------------------------------------------------------------
|
||||
int lje_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
void lje_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
double **host_lj2, double **host_lj3, double **host_lj4,
|
||||
double **offset, double **shift) {
|
||||
int world_me=LJEMF.device->world_me();
|
||||
|
||||
@ -43,7 +43,7 @@ int gauss_gpu_init(const int ntypes, double **cutsq, double **host_a,
|
||||
double **b, double **offset, double *special_lj, const int nlocal,
|
||||
const int nall, const int max_nbors, const int maxspecial,
|
||||
const double cell_size, int &gpu_mode, FILE *screen);
|
||||
int gauss_gpu_reinit(const int ntypes, double **cutsq, double **host_a,
|
||||
void gauss_gpu_reinit(const int ntypes, double **cutsq, double **host_a,
|
||||
double **b, double **offset);
|
||||
void gauss_gpu_clear();
|
||||
int ** gauss_gpu_compute_n(const int ago, const int inum,
|
||||
|
||||
@ -56,7 +56,7 @@ int ljcl_gpu_init(const int ntypes, double **cutsq, double **host_lj1,
|
||||
double **host_cut_ljsq, double host_cut_coulsq,
|
||||
double *host_special_coul, const double qqrd2e,
|
||||
const double g_ewald);
|
||||
int ljcl_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
void ljcl_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
double **host_lj2, double **host_lj3, double **host_lj4,
|
||||
double **offset, double **host_lj_cutsq);
|
||||
void ljcl_gpu_clear();
|
||||
|
||||
@ -45,7 +45,7 @@ int ljl_gpu_init(const int ntypes, double **cutsq, double **host_lj1,
|
||||
const int nall, const int max_nbors, const int maxspecial,
|
||||
const double cell_size, int &gpu_mode, FILE *screen);
|
||||
|
||||
int ljl_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
void ljl_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
double **host_lj2, double **host_lj3, double **host_lj4,
|
||||
double **offset);
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ int lje_gpu_init(const int ntypes, double **cutsq, double **host_lj1,
|
||||
const int nlocal, const int nall, const int max_nbors,
|
||||
const int maxspecial, const double cell_size, int &gpu_mode,
|
||||
FILE *screen);
|
||||
int lje_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
void lje_gpu_reinit(const int ntypes, double **cutsq, double **host_lj1,
|
||||
double **host_lj2, double **host_lj3, double **host_lj4,
|
||||
double **offset, double **shift);
|
||||
void lje_gpu_clear();
|
||||
|
||||
@ -115,10 +115,10 @@ void Error::all(const char *file, int line, const char *str)
|
||||
if (me == 0) {
|
||||
if (input && input->line) lastcmd = input->line;
|
||||
if (screen) fprintf(screen,"ERROR: %s (%s:%d)\n"
|
||||
"Last command: %s\n",
|
||||
"Last command: %s\n",
|
||||
str,file,line,lastcmd);
|
||||
if (logfile) fprintf(logfile,"ERROR: %s (%s:%d)\n"
|
||||
"Last command: %s\n",
|
||||
"Last command: %s\n",
|
||||
str,file,line,lastcmd);
|
||||
}
|
||||
|
||||
@ -152,9 +152,17 @@ void Error::all(const char *file, int line, const char *str)
|
||||
void Error::one(const char *file, int line, const char *str)
|
||||
{
|
||||
int me;
|
||||
const char *lastcmd = (const char*)"(unknown)";
|
||||
MPI_Comm_rank(world,&me);
|
||||
if (screen) fprintf(screen,"ERROR on proc %d: %s (%s:%d)\n",
|
||||
me,str,file,line);
|
||||
|
||||
if (input && input->line) lastcmd = input->line;
|
||||
if (screen) fprintf(screen,"ERROR on proc %d: %s (%s:%d)\n"
|
||||
"Last command: %s\n",
|
||||
me,str,file,line,lastcmd);
|
||||
if (logfile) fprintf(logfile,"ERROR on proc %d: %s (%s:%d)\n"
|
||||
"Last command: %s\n",
|
||||
me,str,file,line,lastcmd);
|
||||
|
||||
if (universe->nworlds > 1)
|
||||
if (universe->uscreen)
|
||||
fprintf(universe->uscreen,"ERROR on proc %d: %s (%s:%d)\n",
|
||||
|
||||
@ -530,8 +530,11 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
|
||||
value = variable->retrieve(var);
|
||||
}
|
||||
|
||||
if (value == NULL) error->one(FLERR,"Substitution for illegal variable");
|
||||
|
||||
if (value == NULL) {
|
||||
char str[128];
|
||||
sprintf(str,"Substitution for illegal variable %s",var);
|
||||
error->one(FLERR,str);
|
||||
}
|
||||
// check if storage in str2 needs to be expanded
|
||||
// re-initialize ptr and ptr2 to the point beyond the variable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user