Cleaning up some compiler warnings
This commit is contained in:
@@ -165,8 +165,7 @@
|
|||||||
_Pragma( "GCC diagnostic ignored \"-Wunused-local-typedefs\"" ) \
|
_Pragma( "GCC diagnostic ignored \"-Wunused-local-typedefs\"" ) \
|
||||||
_Pragma( "GCC diagnostic ignored \"-Woverloaded-virtual\"" ) \
|
_Pragma( "GCC diagnostic ignored \"-Woverloaded-virtual\"" ) \
|
||||||
_Pragma( "GCC diagnostic ignored \"-Wunused-parameter\"" ) \
|
_Pragma( "GCC diagnostic ignored \"-Wunused-parameter\"" ) \
|
||||||
_Pragma( "GCC diagnostic ignored \"-Warray-bounds\"" ) \
|
_Pragma( "GCC diagnostic ignored \"-Warray-bounds\"" )
|
||||||
_Pragma( "GCC diagnostic ignored \"-Wterminate\"" )
|
|
||||||
#define ENABLE_WARNINGS _Pragma( "GCC diagnostic pop" )
|
#define ENABLE_WARNINGS _Pragma( "GCC diagnostic pop" )
|
||||||
#else
|
#else
|
||||||
#define DISABLE_WARNINGS
|
#define DISABLE_WARNINGS
|
||||||
|
|||||||
@@ -1610,7 +1610,9 @@ __global__ void dvc_ScaLBL_D3Q19_AAodd_GreyscaleColor_CP(int *neighborList, int
|
|||||||
Fcpy = ny;
|
Fcpy = ny;
|
||||||
Fcpz = nz;
|
Fcpz = nz;
|
||||||
double Fcp_mag=sqrt(Fcpx*Fcpx+Fcpy*Fcpy+Fcpz*Fcpz);
|
double Fcp_mag=sqrt(Fcpx*Fcpx+Fcpy*Fcpy+Fcpz*Fcpz);
|
||||||
if (Fcp_mag==0.0); Fcpx=Fcpy=Fcpz=0.0;
|
if (Fcp_mag==0.0) {
|
||||||
|
Fcpx=Fcpy=Fcpz=0.0;
|
||||||
|
}
|
||||||
//NOTE for open node (porosity=1.0),Fcp=0.0
|
//NOTE for open node (porosity=1.0),Fcp=0.0
|
||||||
Fcpx *= alpha*W*(1.0-porosity)/sqrt(perm);
|
Fcpx *= alpha*W*(1.0-porosity)/sqrt(perm);
|
||||||
Fcpy *= alpha*W*(1.0-porosity)/sqrt(perm);
|
Fcpy *= alpha*W*(1.0-porosity)/sqrt(perm);
|
||||||
@@ -2397,7 +2399,9 @@ __global__ void dvc_ScaLBL_D3Q19_AAeven_GreyscaleColor_CP(int *Map, double *dis
|
|||||||
Fcpy = ny;
|
Fcpy = ny;
|
||||||
Fcpz = nz;
|
Fcpz = nz;
|
||||||
double Fcp_mag=sqrt(Fcpx*Fcpx+Fcpy*Fcpy+Fcpz*Fcpz);
|
double Fcp_mag=sqrt(Fcpx*Fcpx+Fcpy*Fcpy+Fcpz*Fcpz);
|
||||||
if (Fcp_mag==0.0); Fcpx=Fcpy=Fcpz=0.0;
|
if (Fcp_mag==0.0) {
|
||||||
|
Fcpx=Fcpy=Fcpz=0.0;
|
||||||
|
}
|
||||||
//NOTE for open node (porosity=1.0),Fcp=0.0
|
//NOTE for open node (porosity=1.0),Fcp=0.0
|
||||||
Fcpx *= alpha*W*(1.0-porosity)/sqrt(perm);
|
Fcpx *= alpha*W*(1.0-porosity)/sqrt(perm);
|
||||||
Fcpy *= alpha*W*(1.0-porosity)/sqrt(perm);
|
Fcpy *= alpha*W*(1.0-porosity)/sqrt(perm);
|
||||||
|
|||||||
@@ -65,13 +65,11 @@ __global__ void dvc_ScaLBL_D3Q19_MixedGradient(int *Map, double *Phi, double *Gr
|
|||||||
|
|
||||||
extern "C" void ScaLBL_D3Q19_MixedGradient(int *Map, double *Phi, double *Gradient, int start, int finish, int Np, int Nx, int Ny, int Nz)
|
extern "C" void ScaLBL_D3Q19_MixedGradient(int *Map, double *Phi, double *Gradient, int start, int finish, int Np, int Nx, int Ny, int Nz)
|
||||||
{
|
{
|
||||||
hipProfilerStart();
|
|
||||||
dvc_ScaLBL_D3Q19_MixedGradient<<<NBLOCKS,NTHREADS >>>(Map, Phi, Gradient, start, finish, Np, Nx, Ny, Nz);
|
dvc_ScaLBL_D3Q19_MixedGradient<<<NBLOCKS,NTHREADS >>>(Map, Phi, Gradient, start, finish, Np, Nx, Ny, Nz);
|
||||||
|
|
||||||
hipError_t err = hipGetLastError();
|
hipError_t err = hipGetLastError();
|
||||||
if (hipSuccess != err){
|
if (hipSuccess != err){
|
||||||
printf("hip error in ScaLBL_D3Q19_MixedGradient: %s \n",hipGetErrorString(err));
|
printf("hip error in ScaLBL_D3Q19_MixedGradient: %s \n",hipGetErrorString(err));
|
||||||
}
|
}
|
||||||
hipProfilerStop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1257,6 +1257,7 @@ void test_GPU_aware( UnitTest *ut )
|
|||||||
try {
|
try {
|
||||||
// Initialize the device
|
// Initialize the device
|
||||||
int device = ScaLBL_SetDevice(rank);
|
int device = ScaLBL_SetDevice(rank);
|
||||||
|
NULL_USE( device );
|
||||||
// create wrapper for communications
|
// create wrapper for communications
|
||||||
gpuWrapper gpuComm(comm, N);
|
gpuWrapper gpuComm(comm, N);
|
||||||
// Allocate and initialize the buffers
|
// Allocate and initialize the buffers
|
||||||
|
|||||||
Reference in New Issue
Block a user