From 7ee45ec5f3546e7772913bedb08dedd84da9a6fb Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 1 Feb 2017 11:52:27 -0700 Subject: [PATCH] Fixing tagint and imageint issues in Kokkos package --- src/KOKKOS/atom_vec_angle_kokkos.cpp | 4 +-- src/KOKKOS/atom_vec_atomic_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_bond_kokkos.cpp | 4 +-- src/KOKKOS/atom_vec_charge_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_molecular_kokkos.cpp | 4 +-- src/KOKKOS/domain_kokkos.cpp | 4 +-- src/KOKKOS/pair_reax_c_kokkos.cpp | 38 ++++++++++++------------ src/KOKKOS/pair_tersoff_kokkos.cpp | 4 +-- src/KOKKOS/pair_tersoff_mod_kokkos.cpp | 4 +-- src/KOKKOS/pair_tersoff_zbl_kokkos.cpp | 4 +-- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/KOKKOS/atom_vec_angle_kokkos.cpp b/src/KOKKOS/atom_vec_angle_kokkos.cpp index 221a5e738a..48fc3a352c 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.cpp +++ b/src/KOKKOS/atom_vec_angle_kokkos.cpp @@ -957,10 +957,10 @@ struct AtomVecAngleKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _molecule(i+_first) = static_cast (_buf(i,6)); } }; diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.cpp b/src/KOKKOS/atom_vec_atomic_kokkos.cpp index 0a03cf9f6a..dc254e6a7e 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.cpp +++ b/src/KOKKOS/atom_vec_atomic_kokkos.cpp @@ -836,7 +836,7 @@ struct AtomVecAtomicKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); // printf("%i %i %lf %lf %lf %i BORDER\n",_tag(i+_first),i+_first,_x(i+_first,0),_x(i+_first,1),_x(i+_first,2),_type(i+_first)); diff --git a/src/KOKKOS/atom_vec_bond_kokkos.cpp b/src/KOKKOS/atom_vec_bond_kokkos.cpp index f7bbb4dad5..f10decac28 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.cpp +++ b/src/KOKKOS/atom_vec_bond_kokkos.cpp @@ -905,10 +905,10 @@ struct AtomVecBondKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _molecule(i+_first) = static_cast (_buf(i,6)); } }; diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index b7b5cbac7d..f6952f127c 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -872,7 +872,7 @@ struct AtomVecChargeKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); _q(i+_first) = _buf(i,6); diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.cpp b/src/KOKKOS/atom_vec_molecular_kokkos.cpp index b4370e239d..4fd8114376 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.cpp +++ b/src/KOKKOS/atom_vec_molecular_kokkos.cpp @@ -1029,10 +1029,10 @@ struct AtomVecMolecularKokkos_UnpackBorder { _x(i+_first,0) = _buf(i,0); _x(i+_first,1) = _buf(i,1); _x(i+_first,2) = _buf(i,2); - _tag(i+_first) = static_cast (_buf(i,3)); + _tag(i+_first) = static_cast (_buf(i,3)); _type(i+_first) = static_cast (_buf(i,4)); _mask(i+_first) = static_cast (_buf(i,5)); - _molecule(i+_first) = static_cast (_buf(i,6)); + _molecule(i+_first) = static_cast (_buf(i,6)); } }; diff --git a/src/KOKKOS/domain_kokkos.cpp b/src/KOKKOS/domain_kokkos.cpp index 9742dc36b0..4bf8dc9841 100644 --- a/src/KOKKOS/domain_kokkos.cpp +++ b/src/KOKKOS/domain_kokkos.cpp @@ -250,7 +250,7 @@ struct DomainPBCFunctor { x(i,0) += period[0]; if (DEFORM_VREMAP && (mask[i] & deform_groupbit)) v(i,0) += h_rate[0]; imageint idim = image[i] & IMGMASK; - const int otherdims = image[i] ^ idim; + const imageint otherdims = image[i] ^ idim; idim--; idim &= IMGMASK; image[i] = otherdims | idim; @@ -260,7 +260,7 @@ struct DomainPBCFunctor { x(i,0) = MAX(x(i,0),lo[0]); if (DEFORM_VREMAP && (mask[i] & deform_groupbit)) v(i,0) -= h_rate[0]; imageint idim = image[i] & IMGMASK; - const int otherdims = image[i] ^ idim; + const imageint otherdims = image[i] ^ idim; idim++; idim &= IMGMASK; image[i] = otherdims | idim; diff --git a/src/KOKKOS/pair_reax_c_kokkos.cpp b/src/KOKKOS/pair_reax_c_kokkos.cpp index 0fbf579a92..5490268e56 100644 --- a/src/KOKKOS/pair_reax_c_kokkos.cpp +++ b/src/KOKKOS/pair_reax_c_kokkos.cpp @@ -1046,7 +1046,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeLJCoulomb::operator()(PairReaxComputeLJCoulomb::operator()(PairReaxComputeTabulatedLJCoulomb::operator()(PairReaxComputeTabulatedLJCoulomb::operator()(PairReaxBuildListsHalf, const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const int jnum = d_numneigh[i]; F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3], dBOp_i[3], dln_BOp_pi_i[3], dln_BOp_pi2_i[3]; @@ -1605,7 +1605,7 @@ void PairReaxCKokkos::operator()(PairReaxBuildListsHalf, for (int jj = 0; jj < jnum; jj++) { int j = d_neighbors(i,jj); j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); d_bo_first[j] = j*maxbo; d_hb_first[j] = j*maxhb; @@ -1802,7 +1802,7 @@ void PairReaxCKokkos::operator()(PairReaxBuildListsHalf_LessAtomics< const X_FLOAT ytmp = x(i,1); const X_FLOAT ztmp = x(i,2); const int itype = type(i); - const int itag = tag(i); + const tagint itag = tag(i); const int jnum = d_numneigh[i]; F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3]; @@ -1826,7 +1826,7 @@ void PairReaxCKokkos::operator()(PairReaxBuildListsHalf_LessAtomics< for (int jj = 0; jj < jnum; jj++) { int j = d_neighbors(i,jj); j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); d_bo_first[j] = j*maxbo; d_hb_first[j] = j*maxhb; @@ -2752,7 +2752,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeTorsion::operator()(PairReaxComputeTorsion::operator()(PairReaxComputeHydrogen::operator()(PairReaxComputeHydrogen::operator()(PairReaxComputeHydrogen::operator()(PairReaxUpdateBond, cons Kokkos::View::value> > a_Cdbopi2 = d_Cdbopi2; const int i = d_ilist[ii]; - const int itag = tag(i); + const tagint itag = tag(i); const int j_start = d_bo_first[i]; const int j_end = j_start + d_bo_num[i]; for (int jj = j_start; jj < j_end; jj++) { int j = d_bo_list[jj]; j &= NEIGHMASK; - const int jtag = tag(j); + const tagint jtag = tag(j); const int j_index = jj - j_start; const F_FLOAT Cdbo_i = d_Cdbo(i,j_index); const F_FLOAT Cdbopi_i = d_Cdbopi(i,j_index); @@ -3302,7 +3302,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeBond1::operator()(PairReaxComputeBond1 jtag) { if ((itag+jtag) % 2 == 0) continue; @@ -3438,7 +3438,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeBond2::operator()(PairReaxComputeBond2 jtag) { if ((itag+jtag) % 2 == 0) continue; diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index 66faa956c6..c94ae5c6f7 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -314,7 +314,7 @@ void PairTersoffKokkos::operator()(TagPairTersoffComputeHalf::operator()(TagPairTersoffComputeHalf jtag) { if ((itag+jtag) % 2 == 0) continue; diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index d89b411110..25d949d58a 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -314,7 +314,7 @@ void PairTersoffMODKokkos::operator()(TagPairTersoffMODComputeHalf::operator()(TagPairTersoffMODComputeHalf jtag) { if ((itag+jtag) % 2 == 0) continue; diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index 04195d4e45..fc67b8e953 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -328,7 +328,7 @@ void PairTersoffZBLKokkos::operator()(TagPairTersoffZBLComputeHalf::operator()(TagPairTersoffZBLComputeHalf jtag) { if ((itag+jtag) % 2 == 0) continue;