diff --git a/lib/gpu/lal_lj_expand_ext.cpp b/lib/gpu/lal_lj_expand_ext.cpp index 94a57192b9..a9c791803b 100644 --- a/lib/gpu/lal_lj_expand_ext.cpp +++ b/lib/gpu/lal_lj_expand_ext.cpp @@ -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(); diff --git a/src/GPU/pair_gauss_gpu.cpp b/src/GPU/pair_gauss_gpu.cpp index a8cb695b3a..01cc63a9f9 100644 --- a/src/GPU/pair_gauss_gpu.cpp +++ b/src/GPU/pair_gauss_gpu.cpp @@ -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, diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index 8ea7a7f07b..0c09cb1d51 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -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(); diff --git a/src/GPU/pair_lj_cut_gpu.cpp b/src/GPU/pair_lj_cut_gpu.cpp index ef97269772..feba9ed88b 100644 --- a/src/GPU/pair_lj_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_gpu.cpp @@ -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); diff --git a/src/GPU/pair_lj_expand_gpu.cpp b/src/GPU/pair_lj_expand_gpu.cpp index 33bbf60600..43ec1ec45a 100644 --- a/src/GPU/pair_lj_expand_gpu.cpp +++ b/src/GPU/pair_lj_expand_gpu.cpp @@ -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(); diff --git a/src/error.cpp b/src/error.cpp index 0969507fc9..9193314fc8 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -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", diff --git a/src/input.cpp b/src/input.cpp index 23b89d3040..3d287771b8 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -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.