Adding full neighbor list check for new reduced comm
This commit is contained in:
16
src/comm.cpp
16
src/comm.cpp
@ -242,15 +242,13 @@ void Comm::init()
|
|||||||
for (int i = 0; i < nfix; i++)
|
for (int i = 0; i < nfix; i++)
|
||||||
if (fix[i]->maxexchange_dynamic) maxexchange_fix_dynamic = 1;
|
if (fix[i]->maxexchange_dynamic) maxexchange_fix_dynamic = 1;
|
||||||
|
|
||||||
// Can't used multi_reduce communication with Newton off
|
// Can't used multi/reduce communication with Newton off or full neighbor lits
|
||||||
// TODO: need to somehow restrict this option with full neighbor lists
|
if(multi_reduce){
|
||||||
// CANNOT use multi_reduce communication with full nlist
|
if (force->newton == 0)
|
||||||
// Could remove NP_NEWTON from npair_full_*multi_reduce*, but could be cryptic
|
error->all(FLERR,"Cannot use multi/reduce communication with Newton off");
|
||||||
// Also could be cases where you want newton off (hybrid) but don't use multi_reduce comm
|
if (neighbor->any_full())
|
||||||
// Could add check on neighbor build, if full and comm->multi_reduce error...
|
error->all(FLERR,"Cannot use multi/reduce communication with a full neighbor list");
|
||||||
// or just add check on comm setup - is that run before every run? Only if box change...
|
}
|
||||||
if (force->newton == 0 && multi_reduce)
|
|
||||||
error->all(FLERR,"Cannot use multi/reduce communication with Newton off");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -2420,6 +2420,19 @@ int Neighbor::exclude_setting()
|
|||||||
return exclude;
|
return exclude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
check if any of the old requested neighbor lists are full
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int Neighbor::any_full()
|
||||||
|
{
|
||||||
|
int any_full = 0;
|
||||||
|
for(int i = 0; i < old_nrequest; i++) {
|
||||||
|
if(old_requests[i]->full) any_full = 1;
|
||||||
|
}
|
||||||
|
return any_full;
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
return # of bytes of allocated memory
|
return # of bytes of allocated memory
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -122,6 +122,7 @@ class Neighbor : protected Pointers {
|
|||||||
void exclusion_group_group_delete(int, int); // rm a group-group exclusion
|
void exclusion_group_group_delete(int, int); // rm a group-group exclusion
|
||||||
int exclude_setting(); // return exclude value to accelerator pkg
|
int exclude_setting(); // return exclude value to accelerator pkg
|
||||||
class NeighRequest *find_request(void *); // find a neighbor request
|
class NeighRequest *find_request(void *); // find a neighbor request
|
||||||
|
int any_full(); // Check if any old requests had full neighbor lists
|
||||||
|
|
||||||
double memory_usage();
|
double memory_usage();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user