Commit eb8b1891 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12798 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent f3edd49c
Loading
Loading
Loading
Loading
+5 −21
Original line number Diff line number Diff line
@@ -654,30 +654,14 @@ void FixPIMD::comm_exec(double **ptr)
    {
      int index = atom->map(tag_send[i]);

#define ERR_HEAD "FEYNMAN|"
#define ERR_LAST "Aborted in \"fix pimd\""
#define _ECHO if(universe->me==0 && screen) fprintf(screen,
#define _END );

      if(index<0)
      {
        _ECHO "%s Error: Atom %d is missing at world [%d] rank [%d] required by  rank [%d].\n",
          ERR_HEAD, tag_send[i], universe->iworld, comm->me, plan_recv[iplan] _END
	  
/* --------------------------------------------------------------------------------------------------- */

  char fname[100];
  sprintf(fname,"err_%d_%d.xyz", universe->iworld, comm->me);
  FILE *fp = fopen(fname,"w");
  int n = atom->nlocal + atom->nghost;
  fprintf(fp,"%d\n\n", n);
  for(int i=0; i<atom->nlocal; i++) fprintf(fp, "O  %lf %lf %lf %d\n", atom->x[i][0], atom->x[i][1], atom->x[i][2],atom->tag[i]);
  for(int i=nlocal; i<n; i++) fprintf(fp, "H  %lf %lf %lf %d\n", atom->x[i][0], atom->x[i][1], atom->x[i][2],atom->tag[i]);
  fclose(fp);
        char error_line[256];
      
/* --------------------------------------------------------------------------------------------------- */
        sprintf(error_line, "Atom %d is missing at world [%d] rank [%d] required by  rank [%d].\n",
          tag_send[i], universe->iworld, comm->me, plan_recv[iplan]);
	  
        error->universe_one(FLERR,ERR_LAST);
        error->universe_one(FLERR,error_line);
      }
    
      memcpy(wrap_ptr, ptr[index], ncpy);