git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4795 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -20,21 +20,45 @@ namespace LAMMPS_NS {
|
||||
|
||||
class Irregular : protected Pointers {
|
||||
public:
|
||||
struct PlanAtom { // plan for irregular communication of atoms
|
||||
Irregular(class LAMMPS *);
|
||||
~Irregular();
|
||||
void migrate_atoms();
|
||||
int create_data(int, int *);
|
||||
void exchange_data(char *, int, char *);
|
||||
void destroy_data();
|
||||
double memory_usage();
|
||||
|
||||
private:
|
||||
int me,nprocs;
|
||||
int triclinic;
|
||||
int map_style;
|
||||
int *procgrid;
|
||||
int ***grid2proc;
|
||||
|
||||
int maxsend,maxrecv; // size of buffers in # of doubles
|
||||
double *buf_send,*buf_recv;
|
||||
|
||||
// plan for irregular communication of atoms
|
||||
// no params refer to atoms copied to self
|
||||
|
||||
struct PlanAtom {
|
||||
int nsend; // # of messages to send
|
||||
int nrecv; // # of messages to recv
|
||||
int sendmax; // # of doubles in largest send message
|
||||
int *proc_send; // procs to send to
|
||||
int *length_send; // # of doubles to send to each proc
|
||||
int *num_send; // # of datums to send to each proc
|
||||
int *index_send; // list of which datums to send to each proc
|
||||
int *offset_send; // where each datum starts in send buffer
|
||||
int *num_send; // # of atoms to send to each proc
|
||||
int *index_send; // list of which atoms to send to each proc
|
||||
int *offset_send; // where each atom starts in send buffer
|
||||
int *proc_recv; // procs to recv from
|
||||
int *length_recv; // # of doubles to recv from each proc
|
||||
MPI_Request *request; // MPI requests for posted recvs
|
||||
MPI_Status *status; // MPI statuses for WaitAll
|
||||
};
|
||||
|
||||
// plan for irregular communication of datums
|
||||
// only 2 self params refer to atoms copied to self
|
||||
|
||||
struct PlanData { // plan for irregular communication of data
|
||||
int nsend; // # of messages to send
|
||||
int nrecv; // # of messages to recv
|
||||
@ -43,32 +67,19 @@ class Irregular : protected Pointers {
|
||||
int *num_send; // # of datums to send to each proc
|
||||
int *index_send; // list of which datums to send to each proc
|
||||
int *proc_recv; // procs to recv from
|
||||
int *num_recv; // # of doubles to recv from each proc
|
||||
int num_self;
|
||||
int *index_self;
|
||||
int *num_recv; // # of datums to recv from each proc
|
||||
int num_self; // # of datums to copy to self
|
||||
int *index_self; // list of which datums to copy to self
|
||||
MPI_Request *request; // MPI requests for posted recvs
|
||||
MPI_Status *status; // MPI statuses for WaitAll
|
||||
};
|
||||
|
||||
Irregular(class LAMMPS *);
|
||||
~Irregular();
|
||||
void migrate_atoms();
|
||||
struct PlanData *create_data(int, int *, int *);
|
||||
void exchange_data(PlanData *, char *, int, char *);
|
||||
void destroy_data(PlanData *);
|
||||
PlanAtom *aplan;
|
||||
PlanData *dplan;
|
||||
|
||||
private:
|
||||
int me,nprocs;
|
||||
int triclinic;
|
||||
int map_style;
|
||||
int *procgrid;
|
||||
int ***grid2proc;
|
||||
int maxsend,maxrecv;
|
||||
double *buf_send,*buf_recv;
|
||||
|
||||
struct PlanAtom *create_atom(int, int *, int *, int *);
|
||||
void exchange_atom(PlanAtom *, double *, int *, double *);
|
||||
void destroy_atom(PlanAtom *);
|
||||
int create_atom(int, int *, int *);
|
||||
void exchange_atom(double *, int *, double *);
|
||||
void destroy_atom();
|
||||
int coord2proc(double *);
|
||||
|
||||
void grow_send(int,int); // reallocate send buffer
|
||||
|
||||
Reference in New Issue
Block a user