fix bugs reported by @jibril-b-coulibaly
This commit is contained in:
@ -201,9 +201,9 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int ngpu,
|
|||||||
unsigned best_cus = gpu->cus(0);
|
unsigned best_cus = gpu->cus(0);
|
||||||
bool type_match = (gpu->device_type(0) == type);
|
bool type_match = (gpu->device_type(0) == type);
|
||||||
for (int i = 1; i < gpu->num_devices(); i++) {
|
for (int i = 1; i < gpu->num_devices(); i++) {
|
||||||
if (type_match && gpu->device_type(i)!=type)
|
if (type_match && (gpu->device_type(i) != type))
|
||||||
continue;
|
continue;
|
||||||
if (type_match && gpu->device_type(i) == type) {
|
if (!type_match && (gpu->device_type(i) == type)) {
|
||||||
type_match = true;
|
type_match = true;
|
||||||
best_cus = gpu->cus(i);
|
best_cus = gpu->cus(i);
|
||||||
best_device = i;
|
best_device = i;
|
||||||
|
|||||||
@ -188,7 +188,7 @@ void PairGranular::compute(int eflag, int vflag)
|
|||||||
double *history,*allhistory,**firsthistory;
|
double *history,*allhistory,**firsthistory;
|
||||||
|
|
||||||
bool touchflag = false;
|
bool touchflag = false;
|
||||||
const bool historyupdate = update->setupflag != 0;
|
const bool historyupdate = update->setupflag == 0;
|
||||||
|
|
||||||
ev_init(eflag,vflag);
|
ev_init(eflag,vflag);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user