Commit 948f4783 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

ring communication *is* called with outbut set to NULL, so don't error out on that.

parent fb6e7e8a
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -696,7 +696,7 @@ void Comm::ring(int n, int nper, void *inbuf, int messtag,

  if (maxbytes == 0) return;

  // sanity check 1
  // sanity check

  if ((nbytes > 0) && inbuf == NULL)
    error->one(FLERR,"Cannot put data on ring from NULL pointer");
@@ -722,11 +722,6 @@ void Comm::ring(int n, int nper, void *inbuf, int messtag,
    if (self || loop < nprocs-1) callback(nbytes/nper,buf,ptr);
  }

  // sanity check 2

  if ((nbytes > 0) && outbuf == NULL)
    error->one(FLERR,"Cannot put data from ring to NULL pointer");

  if (nbytes && outbuf) memcpy(outbuf,buf,nbytes);

  memory->destroy(buf);