git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9544 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-02-21 23:36:57 +00:00
parent bc793177a3
commit 16cc214647
2 changed files with 4 additions and 3 deletions

View File

@ -1514,7 +1514,7 @@ void Comm::forward_comm_array(int n, double **array)
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void Comm::ring(int n, int nper, void *inbuf, int messtag, void Comm::ring(int n, int nper, void *inbuf, int messtag,
void (*callback)(int, char *), void *outbuf) void (*callback)(int, char *), void *outbuf, int self)
{ {
MPI_Request request; MPI_Request request;
MPI_Status status; MPI_Status status;
@ -1541,7 +1541,7 @@ void Comm::ring(int n, int nper, void *inbuf, int messtag,
MPI_Get_count(&status,MPI_CHAR,&nbytes); MPI_Get_count(&status,MPI_CHAR,&nbytes);
memcpy(buf,bufcopy,nbytes); memcpy(buf,bufcopy,nbytes);
} }
callback(nbytes/nper,buf); if (self || loop < nprocs-1) callback(nbytes/nper,buf);
} }
if (outbuf) memcpy(outbuf,buf,nbytes); if (outbuf) memcpy(outbuf,buf,nbytes);

View File

@ -61,7 +61,8 @@ class Comm : protected Pointers {
virtual void reverse_comm_dump(class Dump *); // reverse comm from a Dump virtual void reverse_comm_dump(class Dump *); // reverse comm from a Dump
void forward_comm_array(int, double **); // forward comm of array void forward_comm_array(int, double **); // forward comm of array
void ring(int, int, void *, int, void (*)(int, char *), void *); // ring comm void ring(int, int, void *, int, void (*)(int, char *), // ring comm
void *, int self = 1);
virtual void set(int, char **); // set communication style virtual void set(int, char **); // set communication style
void set_processors(int, char **); // set 3d processor grid attributes void set_processors(int, char **); // set 3d processor grid attributes