mirror of https://github.com/lammps/lammps.git
less comm version of special bonds rendezvous
This commit is contained in:
parent
3f9d59294e
commit
17817fc290
|
@ -745,7 +745,7 @@ void Comm::ring(int n, int nper, void *inbuf, int messtag,
|
|||
------------------------------------------------------------------------- */
|
||||
|
||||
int Comm::rendezvous(int n, int *proclist, char *inbuf, int insize,
|
||||
int (*callback)(int, char *, int *&, char *&, void *),
|
||||
int (*callback)(int, char *, int &, int *&, char *&, void *),
|
||||
char *&outbuf, int outsize, void *ptr)
|
||||
{
|
||||
// comm inbuf from caller decomposition to rendezvous decomposition
|
||||
|
@ -763,13 +763,15 @@ int Comm::rendezvous(int n, int *proclist, char *inbuf, int insize,
|
|||
// peform rendezvous computation via callback()
|
||||
// callback() allocates/populates proclist_rvous and outbuf_rvous
|
||||
|
||||
int flag;
|
||||
int *proclist_rvous;
|
||||
char *outbuf_rvous;
|
||||
|
||||
int nout_rvous =
|
||||
callback(n_rvous,inbuf_rvous,proclist_rvous,outbuf_rvous,ptr);
|
||||
callback(n_rvous,inbuf_rvous,flag,proclist_rvous,outbuf_rvous,ptr);
|
||||
|
||||
memory->sfree(inbuf_rvous);
|
||||
if (flag != 1) memory->sfree(inbuf_rvous); // outbuf_rvous = inbuf_vous
|
||||
if (flag == 0) return 0; // all nout_rvous are 0, no 2nd irregular
|
||||
|
||||
// comm outbuf from rendezvous decomposition back to caller
|
||||
// caller will free outbuf
|
||||
|
|
|
@ -110,7 +110,7 @@ class Comm : protected Pointers {
|
|||
void ring(int, int, void *, int, void (*)(int, char *, void *),
|
||||
void *, void *, int self = 1);
|
||||
int rendezvous(int, int *, char *, int,
|
||||
int (*)(int, char *, int *&, char *&, void *),
|
||||
int (*)(int, char *, int &, int *&, char *&, void *),
|
||||
char *&, int, void *);
|
||||
|
||||
int read_lines_from_file(FILE *, int, int, char *);
|
||||
|
|
834
src/special.cpp
834
src/special.cpp
File diff suppressed because it is too large
Load Diff
|
@ -26,20 +26,29 @@ class Special : protected Pointers {
|
|||
|
||||
private:
|
||||
int me,nprocs;
|
||||
int maxall;
|
||||
tagint **onetwo,**onethree,**onefour;
|
||||
|
||||
// data used by rendezvous callback methods
|
||||
|
||||
int max_rvous;
|
||||
int ncount;
|
||||
tagint *atomIDs;
|
||||
int *procowner;
|
||||
|
||||
struct InRvous {
|
||||
struct IDRvous {
|
||||
int me;
|
||||
tagint atomID;
|
||||
};
|
||||
|
||||
struct PairRvous {
|
||||
tagint atomID,partnerID;
|
||||
};
|
||||
|
||||
struct OutRvous {
|
||||
tagint atomID,partnerID;
|
||||
};
|
||||
void atom_owners();
|
||||
void onetwo_build_newton();
|
||||
void onetwo_build_newton_off();
|
||||
void onethree_build();
|
||||
void onefour_build();
|
||||
|
||||
void dedup();
|
||||
void angle_trim();
|
||||
|
@ -48,10 +57,11 @@ class Special : protected Pointers {
|
|||
void fix_alteration();
|
||||
void timer_output(double);
|
||||
|
||||
// callback function for rendezvous communication
|
||||
// callback functions for rendezvous communication
|
||||
|
||||
static int rendezvous_1234(int, char *, int *&, char *&, void *);
|
||||
static int rendezvous_trim(int, char *, int *&, char *&, void *);
|
||||
static int rendezvous_ids(int, char *, int &, int *&, char *&, void *);
|
||||
static int rendezvous_1234(int, char *, int &, int *&, char *&, void *);
|
||||
static int rendezvous_trim(int, char *, int &, int *&, char *&, void *);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue