silence compiler warnings and remove dead code

This commit is contained in:
Axel Kohlmeyer
2021-01-16 15:46:42 -05:00
parent 847ad67fb6
commit d4a0006388
2 changed files with 3 additions and 9 deletions

View File

@ -1015,7 +1015,7 @@ void PairEAMAlloyKokkos<DeviceType>::read_file(char *filename)
ValueTokenizer values = reader.next_values(1); ValueTokenizer values = reader.next_values(1);
file->nelements = values.next_int(); file->nelements = values.next_int();
if (values.count() != file->nelements + 1) if ((int)values.count() != file->nelements + 1)
error->one(FLERR,"Incorrect element names in EAM potential file"); error->one(FLERR,"Incorrect element names in EAM potential file");
file->elements = new char*[file->nelements]; file->elements = new char*[file->nelements];

View File

@ -290,8 +290,6 @@ void SNAKokkos<DeviceType, real_type, vector_length>::grow_rij(int newnatom, int
natom = newnatom; natom = newnatom;
nmax = newnmax; nmax = newnmax;
int natom_div = (natom + vector_length - 1) / vector_length;
rij = t_sna_3d(Kokkos::NoInit("sna:rij"),natom,nmax,3); rij = t_sna_3d(Kokkos::NoInit("sna:rij"),natom,nmax,3);
wj = t_sna_2d(Kokkos::NoInit("sna:wj"),natom,nmax); wj = t_sna_2d(Kokkos::NoInit("sna:wj"),natom,nmax);
rcutij = t_sna_2d(Kokkos::NoInit("sna:rcutij"),natom,nmax); rcutij = t_sna_2d(Kokkos::NoInit("sna:rcutij"),natom,nmax);
@ -301,6 +299,8 @@ void SNAKokkos<DeviceType, real_type, vector_length>::grow_rij(int newnatom, int
#ifdef LMP_KOKKOS_GPU #ifdef LMP_KOKKOS_GPU
if (!host_flag) { if (!host_flag) {
const int natom_div = (natom + vector_length - 1) / vector_length;
a_pack = t_sna_3c_ll(Kokkos::NoInit("sna:a_pack"),vector_length,nmax,natom_div); a_pack = t_sna_3c_ll(Kokkos::NoInit("sna:a_pack"),vector_length,nmax,natom_div);
b_pack = t_sna_3c_ll(Kokkos::NoInit("sna:b_pack"),vector_length,nmax,natom_div); b_pack = t_sna_3c_ll(Kokkos::NoInit("sna:b_pack"),vector_length,nmax,natom_div);
da_pack = t_sna_4c_ll(Kokkos::NoInit("sna:da_pack"),vector_length,nmax,natom_div,3); da_pack = t_sna_4c_ll(Kokkos::NoInit("sna:da_pack"),vector_length,nmax,natom_div,3);
@ -518,15 +518,12 @@ void SNAKokkos<DeviceType, real_type, vector_length>::compute_ui(const typename
// this is "creeping up the side" // this is "creeping up the side"
for (int j = 1; j <= j_bend; j++) { for (int j = 1; j <= j_bend; j++) {
int jjup = idxu_half_block[j-1];
constexpr int mb = 0; // intentional for readability, compiler should optimize this out constexpr int mb = 0; // intentional for readability, compiler should optimize this out
complex ulist_accum = complex::zero(); complex ulist_accum = complex::zero();
int ma; int ma;
for (ma = 0; ma < j; ma++) { for (ma = 0; ma < j; ma++) {
const int jjup_index = idxu_half_block[j - 1] + mb * j + ma;
// grab the cached value // grab the cached value
const complex ulist_prev = ulist_wrapper.get(ma); const complex ulist_prev = ulist_wrapper.get(ma);
@ -928,8 +925,6 @@ void SNAKokkos<DeviceType, real_type, vector_length>::compute_fused_deidrj(const
// this is "creeping up the side" // this is "creeping up the side"
for (int j = 1; j <= j_bend; j++) { for (int j = 1; j <= j_bend; j++) {
int jjup = idxu_half_block[j-1];
constexpr int mb = 0; // intentional for readability, compiler should optimize this out constexpr int mb = 0; // intentional for readability, compiler should optimize this out
complex ulist_accum = complex::zero(); complex ulist_accum = complex::zero();
@ -937,7 +932,6 @@ void SNAKokkos<DeviceType, real_type, vector_length>::compute_fused_deidrj(const
int ma; int ma;
for (ma = 0; ma < j; ma++) { for (ma = 0; ma < j; ma++) {
const int jjup_index = idxu_half_block[j - 1] + mb * j + ma;
// grab the cached value // grab the cached value
const complex ulist_prev = ulist_wrapper.get(ma); const complex ulist_prev = ulist_wrapper.get(ma);