Commit accc4ccd authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Mods to quiet gcc (Ubuntu 4.3.3-5ubuntu4)

parent 545a83ee
...@@ -504,7 +504,7 @@ void gpuSetAmoebaAngleParameters(amoebaGpuContext amoebaGpu, const std::vector<i ...@@ -504,7 +504,7 @@ void gpuSetAmoebaAngleParameters(amoebaGpuContext amoebaGpu, const std::vector<i
#define DUMP_PARAMETERS 5 #define DUMP_PARAMETERS 5
#if (DUMP_PARAMETERS > 0 ) #if (DUMP_PARAMETERS > 0 )
if( (i < DUMP_PARAMETERS || i > bond_angles - (DUMP_PARAMETERS + 1)) && amoebaGpu->log ) if( (i < DUMP_PARAMETERS || i > bond_angles - (DUMP_PARAMETERS + 1)) && amoebaGpu->log )
fprintf( amoebaGpu->log, "Angles: %5d [%5d %5d %5d] [%5d %5d %5d] A=%15.7e k[%15.7e %15.7e] [%5d %5d %5d]\n", i, fprintf( amoebaGpu->log, "Angles: %5d [%5d %5d %5d %5d] [%5d %5d] A=%15.7e k=%15.7e [%5d %5d %5d]\n", i,
(*psAngleID1)[i].x, (*psAngleID1)[i].y, (*psAngleID1)[i].z, (*psAngleID1)[i].w, (*psAngleID1)[i].x, (*psAngleID1)[i].y, (*psAngleID1)[i].z, (*psAngleID1)[i].w,
(*psAngleID2)[i].x, (*psAngleID2)[i].y, (*psAngleID2)[i].x, (*psAngleID2)[i].y,
(*psAngleParameter)[i].x, (*psAngleParameter)[i].y, (*psAngleParameter)[i].x, (*psAngleParameter)[i].y,
...@@ -564,7 +564,7 @@ void gpuSetAmoebaInPlaneAngleParameters(amoebaGpuContext amoebaGpu, const std::v ...@@ -564,7 +564,7 @@ void gpuSetAmoebaInPlaneAngleParameters(amoebaGpuContext amoebaGpu, const std::v
#define DUMP_PARAMETERS 5 #define DUMP_PARAMETERS 5
#if (DUMP_PARAMETERS > 0 ) #if (DUMP_PARAMETERS > 0 )
if( (i < DUMP_PARAMETERS || i > bond_angles - (DUMP_PARAMETERS + 1)) && amoebaGpu->log ) if( (i < DUMP_PARAMETERS || i > bond_angles - (DUMP_PARAMETERS + 1)) && amoebaGpu->log )
fprintf( amoebaGpu->log, "InPlaneAngles: %5d [%5d %5d %5d %5d] [%5d %5d %5d %5d] A=%15.7e k[%15.7e %15.7e %15.7e %15.7e %15.7e] [%5d %5d %5d %5d]\n", i, fprintf( amoebaGpu->log, "InPlaneAngles: %5d [%5d %5d %5d %5d] [%5d %5d %5d %5d] A=%15.7e k=%15.7e [%5d %5d %5d %5d]\n", i,
(*psAngleID1)[i].x, (*psAngleID1)[i].y, (*psAngleID1)[i].z, (*psAngleID1)[i].w, (*psAngleID1)[i].x, (*psAngleID1)[i].y, (*psAngleID1)[i].z, (*psAngleID1)[i].w,
(*psAngleID2)[i].x, (*psAngleID2)[i].y, (*psAngleID2)[i].z, (*psAngleID2)[i].w, (*psAngleID2)[i].x, (*psAngleID2)[i].y, (*psAngleID2)[i].z, (*psAngleID2)[i].w,
(*psAngleParameter)[i].x, (*psAngleParameter)[i].y, (*psAngleParameter)[i].x, (*psAngleParameter)[i].y,
...@@ -2100,7 +2100,7 @@ void gpuSetAmoebaVdwParameters( amoebaGpuContext amoebaGpu, ...@@ -2100,7 +2100,7 @@ void gpuSetAmoebaVdwParameters( amoebaGpuContext amoebaGpu,
psVdwReductionID->_pSysStream[0][count].w = ii; psVdwReductionID->_pSysStream[0][count].w = ii;
} }
if( ivMapping[ii].size() > 3 ){ if( ivMapping[ii].size() > 3 ){
(void) fprintf( stderr, "Atom %u has %u reductions -- invalid -- aborting", ii, ivMapping[ii].size() ); (void) fprintf( stderr, "Atom %u has %u reductions -- invalid -- aborting", ii, static_cast<unsigned int>(ivMapping[ii].size()) );
exit(1); exit(1);
} }
count++; count++;
...@@ -2335,7 +2335,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec ...@@ -2335,7 +2335,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec
for (unsigned int ii = 0; ii < actualAtoms; ii++){ for (unsigned int ii = 0; ii < actualAtoms; ii++){
bool error = false; bool error = false;
if( exclusions[ii].size() != echoExclusions[ii].size() ){ if( exclusions[ii].size() != echoExclusions[ii].size() ){
(void) fprintf( amoebaGpu->log, "\nAtom %6d sz %6u %6u XX\n", ii, exclusions[ii].size(), echoExclusions[ii].size() ); (void) fprintf( amoebaGpu->log, "\nAtom %6d sz %6u %6u XX\n", ii, static_cast<unsigned int>(exclusions[ii].size()), static_cast<unsigned int>(echoExclusions[ii].size()) );
error = true; error = true;
totalErrors++; totalErrors++;
} }
...@@ -2736,7 +2736,7 @@ static int matchMaps( std::string idString, MapIntFloat* map1, MapIntFloat* map ...@@ -2736,7 +2736,7 @@ static int matchMaps( std::string idString, MapIntFloat* map1, MapIntFloat* map
int equalSizes = 1; int equalSizes = 1;
int error = 0; int error = 0;
if( map1->size() != map2->size() ){ if( map1->size() != map2->size() ){
(void) fprintf( log, "%s sizes unequal: %u %u\n", idString.c_str(), map1->size(), map2->size() ); (void) fprintf( log, "%s sizes unequal: %u %u\n", idString.c_str(), static_cast<unsigned int>(map1->size()), static_cast<unsigned int>(map2->size()) );
equalSizes = 0; equalSizes = 0;
error++; error++;
} }
...@@ -3713,7 +3713,7 @@ void cudaWriteVectorOfDoubleVectorsToFile( char* fname, std::vector<int>& fileId ...@@ -3713,7 +3713,7 @@ void cudaWriteVectorOfDoubleVectorsToFile( char* fname, std::vector<int>& fileId
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
FILE* filePtr = getWriteToFilePtrV( fname, fileId ); FILE* filePtr = getWriteToFilePtrV( fname, fileId );
(void) fprintf( filePtr, "%u\n", outputVector.size() ); (void) fprintf( filePtr, "%u\n", static_cast<unsigned int>(outputVector.size()) );
float values[50]; float values[50];
for ( unsigned int ii = 0; ii < outputVector.size(); ii++ ){ for ( unsigned int ii = 0; ii < outputVector.size(); ii++ ){
......
...@@ -829,7 +829,7 @@ void cudaComputeAmoebaElectrostatic( amoebaGpuContext amoebaGpu ) ...@@ -829,7 +829,7 @@ void cudaComputeAmoebaElectrostatic( amoebaGpuContext amoebaGpu )
if (gpu->bOutputBufferPerWarp){ if (gpu->bOutputBufferPerWarp){
(void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaElectrostaticN2Forces warp: numBlocks=%u numThreads=%u bufferPerWarp=%u atm=%u shrd=%u Ebuf=%u ixnCt=%u workUnits=%u\n", (void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaElectrostaticN2Forces warp: numBlocks=%u numThreads=%u bufferPerWarp=%u atm=%lu shrd=%lu Ebuf=%u ixnCt=%lu workUnits=%u\n",
amoebaGpu->nonbondBlocks, threadsPerBlock, amoebaGpu->bOutputBufferPerWarp, amoebaGpu->nonbondBlocks, threadsPerBlock, amoebaGpu->bOutputBufferPerWarp,
sizeof(ElectrostaticParticle), sizeof(ElectrostaticParticle)*threadsPerBlock, amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits ); sizeof(ElectrostaticParticle), sizeof(ElectrostaticParticle)*threadsPerBlock, amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits );
(void) fflush( amoebaGpu->log ); (void) fflush( amoebaGpu->log );
......
...@@ -1971,7 +1971,7 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu ) ...@@ -1971,7 +1971,7 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu )
if( amoebaGpu->log ){ if( amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaKirkwood: blcks=%u tds=%u %u bPrWrp=%u atm=%u shrd=%u Ebuf=%u ixnCt=%u workUnits=%u\n", (void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaKirkwood: blcks=%u tds=%u %u bPrWrp=%u atm=%lu shrd=%lu Ebuf=%u ixnCt=%lu workUnits=%u\n",
amoebaGpu->nonbondBlocks, threadsPerBlock, maxThreads, amoebaGpu->bOutputBufferPerWarp, amoebaGpu->nonbondBlocks, threadsPerBlock, maxThreads, amoebaGpu->bOutputBufferPerWarp,
sizeof(KirkwoodParticle), sizeof(KirkwoodParticle)*threadsPerBlock, sizeof(KirkwoodParticle), sizeof(KirkwoodParticle)*threadsPerBlock,
amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits ); amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits );
......
...@@ -1031,6 +1031,7 @@ __device__ void calculateKirkwoodEDiffPairIxn_kernel( float4 atomCoordinatesI, ...@@ -1031,6 +1031,7 @@ __device__ void calculateKirkwoodEDiffPairIxn_kernel( float4 atomCoordinatesI,
} }
#ifdef AMOEBA_DEBUG
__device__ static int debugAccumulate( unsigned int index, float4* debugArray, float* field, unsigned int addMask, float idLabel ) __device__ static int debugAccumulate( unsigned int index, float4* debugArray, float* field, unsigned int addMask, float idLabel )
{ {
index += cAmoebaSim.paddedNumberOfAtoms; index += cAmoebaSim.paddedNumberOfAtoms;
...@@ -1041,6 +1042,7 @@ __device__ static int debugAccumulate( unsigned int index, float4* debugArray, f ...@@ -1041,6 +1042,7 @@ __device__ static int debugAccumulate( unsigned int index, float4* debugArray, f
return index; return index;
} }
#endif
__device__ void zeroKirkwoodEDiffParticleSharedField( struct KirkwoodEDiffParticle* sA ) __device__ void zeroKirkwoodEDiffParticleSharedField( struct KirkwoodEDiffParticle* sA )
{ {
...@@ -1154,11 +1156,11 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu ) ...@@ -1154,11 +1156,11 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu )
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
static const char* methodName = "kCalculateAmoebaKirkwoodEDiff";
static unsigned int threadsPerBlock = 0; static unsigned int threadsPerBlock = 0;
static int timestep = 0; static int timestep = 0;
timestep++; timestep++;
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
static const char* methodName = "kCalculateAmoebaKirkwoodEDiff";
std::vector<int> fileId; std::vector<int> fileId;
fileId.resize( 2 ); fileId.resize( 2 );
fileId[0] = timestep; fileId[0] = timestep;
...@@ -1201,7 +1203,7 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu ) ...@@ -1201,7 +1203,7 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu )
} }
if( amoebaGpu->log && timestep == 1 ){ if( amoebaGpu->log && timestep == 1 ){
(void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaKirkwoodEDiffN2Forces: numBlocks=%u numThreads=%u bufferPerWarp=%u atm=%u shrd=%u Ebuf=%u ixnCt=%u workUnits=%u\n", (void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaKirkwoodEDiffN2Forces: numBlocks=%u numThreads=%u bufferPerWarp=%u atm=%lu shrd=%lu Ebuf=%u ixnCt=%lu workUnits=%u\n",
amoebaGpu->nonbondBlocks, threadsPerBlock, amoebaGpu->bOutputBufferPerWarp, amoebaGpu->nonbondBlocks, threadsPerBlock, amoebaGpu->bOutputBufferPerWarp,
sizeof(KirkwoodEDiffParticle), sizeof(KirkwoodEDiffParticle)*threadsPerBlock, sizeof(KirkwoodEDiffParticle), sizeof(KirkwoodEDiffParticle)*threadsPerBlock,
amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits ); amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits );
......
...@@ -267,6 +267,7 @@ __device__ void calculateMutualInducedAndGkFieldsGkPairIxn_kernel( float4 atomCo ...@@ -267,6 +267,7 @@ __device__ void calculateMutualInducedAndGkFieldsGkPairIxn_kernel( float4 atomCo
} }
#ifdef AMOEBA_DEBUG
__device__ static int debugAccumulate( int index, float4* debugArray, float* field, unsigned int addMask, float idLabel ) __device__ static int debugAccumulate( int index, float4* debugArray, float* field, unsigned int addMask, float idLabel )
{ {
index += cAmoebaSim.paddedNumberOfAtoms; index += cAmoebaSim.paddedNumberOfAtoms;
...@@ -277,6 +278,7 @@ __device__ static int debugAccumulate( int index, float4* debugArray, float* fie ...@@ -277,6 +278,7 @@ __device__ static int debugAccumulate( int index, float4* debugArray, float* fie
return index; return index;
} }
#endif
#define GK #define GK
#include "kCalculateAmoebaCudaMutualInducedParticle.h" #include "kCalculateAmoebaCudaMutualInducedParticle.h"
......
...@@ -31,7 +31,7 @@ void GetCalculateAmoebaCudaWcaDispersionSim(amoebaGpuContext amoebaGpu) ...@@ -31,7 +31,7 @@ void GetCalculateAmoebaCudaWcaDispersionSim(amoebaGpuContext amoebaGpu)
gpuContext gpu = amoebaGpu->gpuContext; gpuContext gpu = amoebaGpu->gpuContext;
status = cudaMemcpyFromSymbol(&gpu->sim, cSim, sizeof(cudaGmxSimulation)); status = cudaMemcpyFromSymbol(&gpu->sim, cSim, sizeof(cudaGmxSimulation));
fprintf( stderr, "In GetCalculateAmoebaCudaWcaDispersionSim: %p %u %u\n", fprintf( stderr, "In GetCalculateAmoebaCudaWcaDispersionSim: %p %lu %u\n",
gpu->psInteractionCount->_pSysStream[0], gpu->psInteractionCount->_pSysStream[0][0], gpu->sim.workUnits ); gpu->psInteractionCount->_pSysStream[0], gpu->psInteractionCount->_pSysStream[0][0], gpu->sim.workUnits );
RTERROR(status, "GetCalculateAmoebaCudaWcaDispersionSim: cudaMemcpyFromSymbol: SetSim copy from cSim failed"); RTERROR(status, "GetCalculateAmoebaCudaWcaDispersionSim: cudaMemcpyFromSymbol: SetSim copy from cSim failed");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment