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

This commit is contained in:
Axel Kohlmeyer
2018-02-24 17:17:45 +01:00
parent fb6e7e8aea
commit 948f4783aa

View File

@ -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);