Fix Kokkos teamsize too large issue
This commit is contained in:
committed by
Stan Gerald Moore
parent
207a14f351
commit
1211af65a1
@ -950,6 +950,8 @@ EV_FLOAT pair_compute_neighlist (PairStyle* fpair, std::enable_if_t<(NEIGHFLAG&P
|
|||||||
|
|
||||||
static int vectorsize = 0;
|
static int vectorsize = 0;
|
||||||
static int atoms_per_team = 0;
|
static int atoms_per_team = 0;
|
||||||
|
static int teamsize_max_for = 0;
|
||||||
|
static int teamsize_max_reduce = 0;
|
||||||
|
|
||||||
#if defined(LMP_KOKKOS_GPU)
|
#if defined(LMP_KOKKOS_GPU)
|
||||||
static int lastcall = -1;
|
static int lastcall = -1;
|
||||||
@ -966,7 +968,6 @@ EV_FLOAT pair_compute_neighlist (PairStyle* fpair, std::enable_if_t<(NEIGHFLAG&P
|
|||||||
|
|
||||||
vectorsize = MIN(vectorsize,max_vectorsize);
|
vectorsize = MIN(vectorsize,max_vectorsize);
|
||||||
|
|
||||||
int teamsize_max_for,teamsize_max_reduce;
|
|
||||||
if (fpair->atom->ntypes > MAX_TYPES_STACKPARAMS) {
|
if (fpair->atom->ntypes > MAX_TYPES_STACKPARAMS) {
|
||||||
PairComputeFunctor<PairStyle,NEIGHFLAG,false,ZEROFLAG,Specialisation > ff(fpair,list);
|
PairComputeFunctor<PairStyle,NEIGHFLAG,false,ZEROFLAG,Specialisation > ff(fpair,list);
|
||||||
GetMaxTeamSize<typename PairStyle::device_type>(ff, inum, teamsize_max_for, teamsize_max_reduce);
|
GetMaxTeamSize<typename PairStyle::device_type>(ff, inum, teamsize_max_for, teamsize_max_reduce);
|
||||||
@ -974,12 +975,12 @@ EV_FLOAT pair_compute_neighlist (PairStyle* fpair, std::enable_if_t<(NEIGHFLAG&P
|
|||||||
PairComputeFunctor<PairStyle,NEIGHFLAG,true,ZEROFLAG,Specialisation > ff(fpair,list);
|
PairComputeFunctor<PairStyle,NEIGHFLAG,true,ZEROFLAG,Specialisation > ff(fpair,list);
|
||||||
GetMaxTeamSize<typename PairStyle::device_type>(ff, inum, teamsize_max_for, teamsize_max_reduce);
|
GetMaxTeamSize<typename PairStyle::device_type>(ff, inum, teamsize_max_for, teamsize_max_reduce);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int teamsize_max = teamsize_max_for;
|
int teamsize_max = teamsize_max_for;
|
||||||
if (fpair->eflag || fpair->vflag)
|
if (fpair->eflag || fpair->vflag)
|
||||||
teamsize_max = teamsize_max_reduce;
|
teamsize_max = teamsize_max_reduce;
|
||||||
atoms_per_team = teamsize_max/vectorsize;
|
atoms_per_team = teamsize_max/vectorsize;
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
vectorsize = 1;
|
vectorsize = 1;
|
||||||
atoms_per_team = 1;
|
atoms_per_team = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user