Merge pull request #358 from ibaned/warnings

warning fixes (Kokkos+CUDA)
This commit is contained in:
sjplimp 2017-01-26 13:49:56 -07:00 committed by GitHub
commit 5971d4c994
13 changed files with 25 additions and 16 deletions

View File

@ -42,12 +42,11 @@ namespace MathSpecialKokkos {
{
x *= x;
x *= 1.4426950408889634074; // log_2(e)
#if defined(__BYTE_ORDER__)
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
return (x < 1023.0) ? exp2_x86(-x) : 0.0;
#endif
#endif
#else
return (x < 1023.0) ? exp2(-x) : 0.0;
#endif
}
// x**2, use instead of pow(x,2.0)

View File

@ -147,9 +147,9 @@ void NeighborKokkos::init_ex_mol_bit_kokkos()
int NeighborKokkos::check_distance()
{
if (device_flag)
check_distance_kokkos<LMPDeviceType>();
return check_distance_kokkos<LMPDeviceType>();
else
check_distance_kokkos<LMPHostType>();
return check_distance_kokkos<LMPHostType>();
}
template<class DeviceType>
@ -157,7 +157,7 @@ int NeighborKokkos::check_distance_kokkos()
{
typedef DeviceType device_type;
double delx,dely,delz,rsq;
double delx,dely,delz;
double delta,delta1,delta2;
if (boxcheck) {

View File

@ -44,7 +44,9 @@ class PairBuckCoulCutKokkos : public PairBuckCoulCut {
double init_one(int, int);
struct params_buck_coul{
KOKKOS_INLINE_FUNCTION
params_buck_coul(){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
KOKKOS_INLINE_FUNCTION
params_buck_coul(int i){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
F_FLOAT cut_ljsq,cut_coulsq,a,c,rhoinv,buck1,buck2,offset;
};

View File

@ -45,7 +45,9 @@ class PairBuckCoulLongKokkos : public PairBuckCoulLong {
double init_one(int, int);
struct params_buck_coul{
KOKKOS_INLINE_FUNCTION
params_buck_coul(){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
KOKKOS_INLINE_FUNCTION
params_buck_coul(int i){cut_ljsq=0;cut_coulsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
F_FLOAT cut_ljsq,cut_coulsq,a,c,rhoinv,buck1,buck2,offset;
};

View File

@ -43,7 +43,9 @@ class PairBuckKokkos : public PairBuck {
double init_one(int, int);
struct params_buck{
KOKKOS_INLINE_FUNCTION
params_buck(){cutsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
KOKKOS_INLINE_FUNCTION
params_buck(int i){cutsq=0;a=0;c=0;rhoinv=0;buck1=0;buck2=0;offset=0;};
F_FLOAT cutsq,a,c,rhoinv,buck1,buck2,offset;
};

View File

@ -44,7 +44,9 @@ class PairCoulDebyeKokkos : public PairCoulDebye {
double init_one(int, int);
struct params_coul{
KOKKOS_INLINE_FUNCTION
params_coul(){cutsq=0,scale=0;};
KOKKOS_INLINE_FUNCTION
params_coul(int i){cutsq=0,scale=0;};
F_FLOAT cutsq, scale;
};

View File

@ -44,7 +44,9 @@ class PairLJClass2Kokkos : public PairLJClass2 {
double init_one(int, int);
struct params_lj{
KOKKOS_INLINE_FUNCTION
params_lj(){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
KOKKOS_INLINE_FUNCTION
params_lj(int i){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;};
F_FLOAT cutsq,lj1,lj2,lj3,lj4,offset;
};

View File

@ -44,7 +44,9 @@ class PairLJExpandKokkos : public PairLJExpand {
double init_one(int, int);
struct params_lj{
KOKKOS_INLINE_FUNCTION
params_lj(){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;};
KOKKOS_INLINE_FUNCTION
params_lj(int i){cutsq=0,lj1=0;lj2=0;lj3=0;lj4=0;offset=0;shift=0;};
F_FLOAT cutsq,lj1,lj2,lj3,lj4,offset,shift;
};

View File

@ -44,7 +44,9 @@ class PairLJGromacsKokkos : public PairLJGromacs {
double init_one(int, int);
struct params_lj{
KOKKOS_INLINE_FUNCTION
params_lj(){cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;};
KOKKOS_INLINE_FUNCTION
params_lj(int i){cut_inner_sq=0;cut_inner=0;lj1=0;lj2=0;lj3=0;lj4=0;offset=0;ljsw1=0;ljsw2=0;ljsw3=0;ljsw4=0;ljsw5=0;};
F_FLOAT cut_inner_sq,cut_inner,lj1,lj2,lj3,lj4,offset,ljsw1,ljsw2,ljsw3,ljsw4,ljsw5;
};

View File

@ -191,7 +191,6 @@ void ComputeCoordAtom::compute_peratom()
c_orientorder->invoked_flag |= INVOKED_PERATOM;
}
nqlist = c_orientorder->nqlist;
int ltmp = l;
normv = c_orientorder->array_atom;
comm->forward_comm_compute(this);
}

View File

@ -1600,10 +1600,10 @@ int Domain::ownatom(int id, double *x, imageint *image, int shrinkexceed)
if (coord[0] < blo[0] && boundary[0][0] > 1) newcoord[0] = blo[0];
else if (coord[0] >= bhi[0] && boundary[0][1] > 1) newcoord[0] = bhi[0];
else newcoord[0] = coord[0];
if (coord[1] < blo[1] && boundary[1][1] > 1) newcoord[1] = blo[1];
if (coord[1] < blo[1] && boundary[1][0] > 1) newcoord[1] = blo[1];
else if (coord[1] >= bhi[1] && boundary[1][1] > 1) newcoord[1] = bhi[1];
else newcoord[1] = coord[1];
if (coord[2] < blo[2] && boundary[2][2] > 1) newcoord[2] = blo[2];
if (coord[2] < blo[2] && boundary[2][0] > 1) newcoord[2] = blo[2];
else if (coord[2] >= bhi[2] && boundary[2][1] > 1) newcoord[2] = bhi[2];
else newcoord[2] = coord[2];

View File

@ -317,8 +317,6 @@ void lammps_free(void *ptr)
int lammps_extract_setting(void *ptr, char *name)
{
LAMMPS *lmp = (LAMMPS *) ptr;
if (strcmp(name,"bigint") == 0) return sizeof(bigint);
if (strcmp(name,"tagint") == 0) return sizeof(tagint);
if (strcmp(name,"imageint") == 0) return sizeof(imageint);

View File

@ -41,12 +41,11 @@ namespace MathSpecial {
{
x *= x;
x *= 1.4426950408889634074; // log_2(e)
#if defined(__BYTE_ORDER__)
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
return (x < 1023.0) ? exp2_x86(-x) : 0.0;
#endif
#endif
#else
return (x < 1023.0) ? exp2(-x) : 0.0;
#endif
}
// x**2, use instead of pow(x,2.0)