"vscode:/vscode.git/clone" did not exist on "d79b3cd12f6a4e911d17492539da68b11e1a255d"
Commit 2c6cff12 authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Update

parent f7f79b04
...@@ -94,7 +94,8 @@ KernelImpl* AmoebaCudaData::getAmoebaLocalForcesKernel( void ) const { ...@@ -94,7 +94,8 @@ KernelImpl* AmoebaCudaData::getAmoebaLocalForcesKernel( void ) const {
} }
void AmoebaCudaData::setLog( FILE* inputLog ) { void AmoebaCudaData::setLog( FILE* inputLog ) {
log = inputLog; log = inputLog;
amoebaGpu->log = inputLog;
} }
FILE* AmoebaCudaData::getLog( void ) const { FILE* AmoebaCudaData::getLog( void ) const {
......
...@@ -103,7 +103,7 @@ KernelImpl* AmoebaCudaKernelFactory::createKernelImpl(std::string name, const Pl ...@@ -103,7 +103,7 @@ KernelImpl* AmoebaCudaKernelFactory::createKernelImpl(std::string name, const Pl
if( mapIterator == contextToAmoebaDataMap.end() ){ if( mapIterator == contextToAmoebaDataMap.end() ){
amoebaCudaData = new AmoebaCudaData( cudaPlatformData ); amoebaCudaData = new AmoebaCudaData( cudaPlatformData );
contextToAmoebaDataMap[&context] = amoebaCudaData; contextToAmoebaDataMap[&context] = amoebaCudaData;
//amoebaCudaData->setLog( stderr ); amoebaCudaData->setLog( stderr );
amoebaCudaData->setContextImpl( static_cast<void*>(&context) ); amoebaCudaData->setContextImpl( static_cast<void*>(&context) );
//(void) fprintf( stderr, "AmoebaCudaKernelFactory::createKernelImpl amoebaCudaDataV=%p\n", static_cast<void*>(amoebaCudaData) ); //(void) fprintf( stderr, "AmoebaCudaKernelFactory::createKernelImpl amoebaCudaDataV=%p\n", static_cast<void*>(amoebaCudaData) );
} else { } else {
......
...@@ -46,8 +46,8 @@ using namespace std; ...@@ -46,8 +46,8 @@ using namespace std;
static void computeAmoebaLocalForces( AmoebaCudaData& data ) { static void computeAmoebaLocalForces( AmoebaCudaData& data ) {
amoebaGpuContext gpu = data.getAmoebaGpu(); amoebaGpuContext gpu = data.getAmoebaGpu();
if( gpu->log ){ if( 0 && data.getLog() ){
(void) fprintf( gpu->log, "computeAmoebaLocalForces\n" ); (void) fflush( gpu->log ); (void) fprintf( data.getLog(), "computeAmoebaLocalForces\n" ); (void) fflush( data.getLog() );
} }
data.initializeGpu(); data.initializeGpu();
...@@ -485,7 +485,7 @@ static void computeAmoebaMultipoleForce( AmoebaCudaData& data ) { ...@@ -485,7 +485,7 @@ static void computeAmoebaMultipoleForce( AmoebaCudaData& data ) {
amoebaGpuContext gpu = data.getAmoebaGpu(); amoebaGpuContext gpu = data.getAmoebaGpu();
data.initializeGpu(); data.initializeGpu();
if( data.getLog() ){ if( 0 && data.getLog() ){
(void) fprintf( data.getLog(), "computeAmoebaMultipoleForce\n" ); (void) fprintf( data.getLog(), "computeAmoebaMultipoleForce\n" );
(void) fflush( data.getLog()); (void) fflush( data.getLog());
} }
...@@ -510,7 +510,7 @@ static void computeAmoebaMultipoleForce( AmoebaCudaData& data ) { ...@@ -510,7 +510,7 @@ static void computeAmoebaMultipoleForce( AmoebaCudaData& data ) {
kCalculateAmoebaKirkwood(gpu); kCalculateAmoebaKirkwood(gpu);
} }
if( data.getLog() ){ if( 0 && data.getLog() ){
(void) fprintf( data.getLog(), "completed computeAmoebaMultipoleForce\n" ); (void) fprintf( data.getLog(), "completed computeAmoebaMultipoleForce\n" );
(void) fflush( data.getLog()); (void) fflush( data.getLog());
} }
...@@ -821,13 +821,13 @@ double CudaCalcAmoebaVdwForceKernel::executeEnergy(ContextImpl& context) { ...@@ -821,13 +821,13 @@ double CudaCalcAmoebaVdwForceKernel::executeEnergy(ContextImpl& context) {
static void computeAmoebaWcaDispersionForce( AmoebaCudaData& data ) { static void computeAmoebaWcaDispersionForce( AmoebaCudaData& data ) {
data.initializeGpu(); data.initializeGpu();
if( data.getLog() ){ if( 0 && data.getLog() ){
(void) fprintf( data.getLog(), "Calling computeAmoebaWcaDispersionForce " ); (void) fflush( data.getLog() ); (void) fprintf( data.getLog(), "Calling computeAmoebaWcaDispersionForce " ); (void) fflush( data.getLog() );
} }
kCalculateAmoebaWcaDispersionForces( data.getAmoebaGpu() ); kCalculateAmoebaWcaDispersionForces( data.getAmoebaGpu() );
if( data.getLog() ){ if( 0 && data.getLog() ){
(void) fprintf( data.getLog(), " -- completed\n" ); (void) fflush( data.getLog() ); (void) fprintf( data.getLog(), " -- completed\n" ); (void) fflush( data.getLog() );
} }
} }
......
...@@ -2115,6 +2115,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec ...@@ -2115,6 +2115,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
static const std::string methodName = "amoebaGpuBuildVdwExclusionList"; static const std::string methodName = "amoebaGpuBuildVdwExclusionList";
static const int debugOn = 0;
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -2155,7 +2156,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec ...@@ -2155,7 +2156,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec
// diagnostics // diagnostics
if( amoebaGpu->log ){ if( debugOn && amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s min/max cell indices:\n", methodName.c_str() ); (void) fprintf( amoebaGpu->log, "%s min/max cell indices:\n", methodName.c_str() );
for (int ii = 0; ii < dim; ii++) for (int ii = 0; ii < dim; ii++)
{ {
...@@ -2202,7 +2203,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec ...@@ -2202,7 +2203,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec
// diagnostics // diagnostics
if( amoebaGpu->log ){ if( debugOn && amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s %d cells w/ exclusions\n", methodName.c_str(), numWithExclusionIndices ); (void) fprintf( amoebaGpu->log, "%s %d cells w/ exclusions\n", methodName.c_str(), numWithExclusionIndices );
for (int ii = 0; ii < cells; ii++) for (int ii = 0; ii < cells; ii++)
{ {
...@@ -2270,7 +2271,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec ...@@ -2270,7 +2271,7 @@ void amoebaGpuBuildVdwExclusionList( amoebaGpuContext amoebaGpu, const std::vec
// diagnostics // diagnostics
if( amoebaGpu->log ){ if( debugOn && amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s Echo exclusions\n", methodName.c_str() ); (void) fprintf( amoebaGpu->log, "%s Echo exclusions\n", methodName.c_str() );
(void) fflush( amoebaGpu->log ); (void) fflush( amoebaGpu->log );
...@@ -2890,6 +2891,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu ) ...@@ -2890,6 +2891,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu )
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
static const std::string methodName = "amoebaGpuBuildScalingList"; static const std::string methodName = "amoebaGpuBuildScalingList";
static const int debugOn = 0;
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -2944,7 +2946,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu ) ...@@ -2944,7 +2946,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu )
// diagnostics // diagnostics
if( amoebaGpu->log ){ if( debugOn && amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s min/max cell indices:\n", methodName.c_str() ); (void) fprintf( amoebaGpu->log, "%s min/max cell indices:\n", methodName.c_str() );
for (int ii = 0; ii < dim; ii++) for (int ii = 0; ii < dim; ii++)
{ {
...@@ -2980,7 +2982,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu ) ...@@ -2980,7 +2982,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu )
// diagnostics // diagnostics
#if 1 #if 0
if( 0 && amoebaGpu->log ){ if( 0 && amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s %d cells\n", (void) fprintf( amoebaGpu->log, "%s %d cells\n",
methodName.c_str(), numWithScalingIndices ); methodName.c_str(), numWithScalingIndices );
...@@ -3000,7 +3002,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu ) ...@@ -3000,7 +3002,7 @@ void amoebaGpuBuildScalingList( amoebaGpuContext amoebaGpu )
(void) fflush( amoebaGpu->log ); (void) fflush( amoebaGpu->log );
} }
#else #else
if( amoebaGpu->log ){ if( debugOn && amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s %d cells w/ exclusions\n", (void) fprintf( amoebaGpu->log, "%s %d cells w/ exclusions\n",
methodName.c_str(), numWithScalingIndices ); methodName.c_str(), numWithScalingIndices );
for (int ii = 0; ii < cells; ii++) for (int ii = 0; ii < cells; ii++)
...@@ -3158,7 +3160,7 @@ static unsigned int targetAtoms[2] = { 0, 1}; ...@@ -3158,7 +3160,7 @@ static unsigned int targetAtoms[2] = { 0, 1};
// diagnostics // diagnostics
if( amoebaGpu->log && 0 ){ if( debugOn && amoebaGpu->log ){
float* pScaleCheckSum = (float*) malloc( sizeof( float )*paddedAtoms ); float* pScaleCheckSum = (float*) malloc( sizeof( float )*paddedAtoms );
float* dScaleCheckSum = (float*) malloc( sizeof( float )*paddedAtoms ); float* dScaleCheckSum = (float*) malloc( sizeof( float )*paddedAtoms );
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "amoebaScaleFactors.h" #include "amoebaScaleFactors.h"
__global__ __global__
/*
#if (__CUDA_ARCH__ >= 200) #if (__CUDA_ARCH__ >= 200)
__launch_bounds__(GF1XX_NONBOND_THREADS_PER_BLOCK, 1) __launch_bounds__(GF1XX_NONBOND_THREADS_PER_BLOCK, 1)
#elif (__CUDA_ARCH__ >= 130) #elif (__CUDA_ARCH__ >= 130)
...@@ -34,6 +35,7 @@ __launch_bounds__(GT2XX_NONBOND_THREADS_PER_BLOCK, 1) ...@@ -34,6 +35,7 @@ __launch_bounds__(GT2XX_NONBOND_THREADS_PER_BLOCK, 1)
#else #else
__launch_bounds__(G8X_NONBOND_THREADS_PER_BLOCK, 1) __launch_bounds__(G8X_NONBOND_THREADS_PER_BLOCK, 1)
#endif #endif
*/
void METHOD_NAME(kCalculateAmoebaCudaElectrostatic, Forces_kernel)( void METHOD_NAME(kCalculateAmoebaCudaElectrostatic, Forces_kernel)(
unsigned int* workUnit, unsigned int* workUnit,
float4* atomCoord, float4* atomCoord,
......
...@@ -2342,7 +2342,6 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu ) ...@@ -2342,7 +2342,6 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu )
for( int ii = 0; ii < amoebaGpu->gpuContext->sim.paddedNumberOfAtoms; ii++ ){ for( int ii = 0; ii < amoebaGpu->gpuContext->sim.paddedNumberOfAtoms; ii++ ){
(void) fprintf( amoebaGpu->log,"Born %6d %16.9e\n", ii, (void) fprintf( amoebaGpu->log,"Born %6d %16.9e\n", ii,
gpu->psBornRadii->_pSysStream[0][ii] ); gpu->psBornRadii->_pSysStream[0][ii] );
} }
#endif #endif
...@@ -2350,8 +2349,26 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu ) ...@@ -2350,8 +2349,26 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu )
if( threadsPerBlock == 0 ){ if( threadsPerBlock == 0 ){
threadsPerBlock = getThreadsPerBlock( amoebaGpu, sizeof(KirkwoodParticle)); threadsPerBlock = getThreadsPerBlock( amoebaGpu, sizeof(KirkwoodParticle));
threadsPerBlock = 32;
//unsigned int eDiffhreadsPerBlock = getThreadsPerBlock( amoebaGpu, sizeof(KirkwoodEDiffParticle)); //unsigned int eDiffhreadsPerBlock = getThreadsPerBlock( amoebaGpu, sizeof(KirkwoodEDiffParticle));
//unsigned int maxThreadsPerBlock = threadsPerBlock> eDiffhreadsPerBlock ? threadsPerBlock : eDiffhreadsPerBlock; //unsigned int maxThreadsPerBlock = threadsPerBlock> eDiffhreadsPerBlock ? threadsPerBlock : eDiffhreadsPerBlock;
if( amoebaGpu->log ){
#if (__CUDA_ARCH__ >= 200)
unsigned int maxThreads = GF1XX_NONBOND_THREADS_PER_BLOCK;
#elif (__CUDA_ARCH__ >= 130)
unsigned int maxThreads = GT2XX_NONBOND_THREADS_PER_BLOCK;
#else
unsigned int maxThreads = G8X_NONBOND_THREADS_PER_BLOCK;
#endif
(void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaKirkwood: blcks=%u tds=%u %u bPrWrp=%u atm=%u shrd=%u Ebuf=%u ixnCt=%u workUnits=%u\n",
amoebaGpu->nonbondBlocks, threadsPerBlock, maxThreads, amoebaGpu->bOutputBufferPerWarp,
sizeof(KirkwoodParticle), sizeof(KirkwoodParticle)*threadsPerBlock,
amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits );
(void) fflush( amoebaGpu->log );
}
} }
kClearFields_1( amoebaGpu ); kClearFields_1( amoebaGpu );
...@@ -2531,7 +2548,6 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu ) ...@@ -2531,7 +2548,6 @@ void kCalculateAmoebaKirkwood( amoebaGpuContext amoebaGpu )
} }
delete debugArray; delete debugArray;
#endif #endif
// map torques to forces // map torques to forces
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "amoebaScaleFactors.h" #include "amoebaScaleFactors.h"
__global__ __global__
/*
#if (__CUDA_ARCH__ >= 200) #if (__CUDA_ARCH__ >= 200)
__launch_bounds__(GF1XX_NONBOND_THREADS_PER_BLOCK, 1) __launch_bounds__(GF1XX_NONBOND_THREADS_PER_BLOCK, 1)
#elif (__CUDA_ARCH__ >= 130) #elif (__CUDA_ARCH__ >= 130)
...@@ -34,6 +35,7 @@ __launch_bounds__(GT2XX_NONBOND_THREADS_PER_BLOCK, 1) ...@@ -34,6 +35,7 @@ __launch_bounds__(GT2XX_NONBOND_THREADS_PER_BLOCK, 1)
#else #else
__launch_bounds__(G8X_NONBOND_THREADS_PER_BLOCK, 1) __launch_bounds__(G8X_NONBOND_THREADS_PER_BLOCK, 1)
#endif #endif
*/
void METHOD_NAME(kCalculateAmoebaCudaKirkwood, Forces_kernel)( void METHOD_NAME(kCalculateAmoebaCudaKirkwood, Forces_kernel)(
unsigned int* workUnit, unsigned int* workUnit,
float4* atomCoord, float4* atomCoord,
......
...@@ -1156,11 +1156,10 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu ) ...@@ -1156,11 +1156,10 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu )
static const char* methodName = "kCalculateAmoebaKirkwoodEDiff"; static const char* methodName = "kCalculateAmoebaKirkwoodEDiff";
static unsigned int threadsPerBlock = 0; static unsigned int threadsPerBlock = 0;
static int timestep = 0;
timestep++;
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
static int timestep = 0;
std::vector<int> fileId; std::vector<int> fileId;
timestep++;
fileId.resize( 2 ); fileId.resize( 2 );
fileId[0] = timestep; fileId[0] = timestep;
fileId[1] = 1; fileId[1] = 1;
...@@ -1188,21 +1187,21 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu ) ...@@ -1188,21 +1187,21 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu )
unsigned int targetAtom = 0; unsigned int targetAtom = 0;
#endif #endif
if( amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s %d maxCovalentDegreeSz=%d"
" gamma=%.3e scalingDistanceCutoff=%.3f ZZZ\n",
methodName, gpu->natoms,
amoebaGpu->maxCovalentDegreeSz, amoebaGpu->pGamma,
amoebaGpu->scalingDistanceCutoff );
gpuPrintCudaAmoebaGmxSimulation(amoebaGpu, amoebaGpu->log );
(void) fflush( amoebaGpu->log );
}
kClearFields_3( amoebaGpu, 6 ); kClearFields_3( amoebaGpu, 6 );
if( threadsPerBlock == 0 ){ if( threadsPerBlock == 0 ){
threadsPerBlock = getThreadsPerBlock( amoebaGpu, sizeof(KirkwoodEDiffParticle)); threadsPerBlock = getThreadsPerBlock( amoebaGpu, sizeof(KirkwoodEDiffParticle));
} }
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",
amoebaGpu->nonbondBlocks, threadsPerBlock, amoebaGpu->bOutputBufferPerWarp,
sizeof(KirkwoodEDiffParticle), sizeof(KirkwoodEDiffParticle)*threadsPerBlock,
amoebaGpu->energyOutputBuffers, (*gpu->psInteractionCount)[0], gpu->sim.workUnits );
//gpuPrintCudaAmoebaGmxSimulation(amoebaGpu, amoebaGpu->log );
(void) fflush( amoebaGpu->log );
}
if (gpu->bOutputBufferPerWarp){ if (gpu->bOutputBufferPerWarp){
#if 0 #if 0
(void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaKirkwoodEDiffN2Forces warp: numBlocks=%u numThreads=%u bufferPerWarp=%u atm=%u shrd=%u Ebuf=%u ixnCt=%u workUnits=%u\n", (void) fprintf( amoebaGpu->log, "kCalculateAmoebaCudaKirkwoodEDiffN2Forces warp: numBlocks=%u numThreads=%u bufferPerWarp=%u atm=%u shrd=%u Ebuf=%u ixnCt=%u workUnits=%u\n",
...@@ -1414,7 +1413,6 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu ) ...@@ -1414,7 +1413,6 @@ void kCalculateAmoebaKirkwoodEDiff( amoebaGpuContext amoebaGpu )
} }
} }
#endif #endif
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
......
...@@ -756,12 +756,11 @@ static void cudaComputeAmoebaMutualInducedAndGkFieldBySOR( amoebaGpuContext amoe ...@@ -756,12 +756,11 @@ static void cudaComputeAmoebaMutualInducedAndGkFieldBySOR( amoebaGpuContext amoe
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
#ifdef AMOEBA_DEBUG
static const char* methodName = "cudaComputeAmoebaMutualInducedAndGkFieldBySOR";
static int timestep = 0; static int timestep = 0;
std::vector<int> fileId;
timestep++; timestep++;
static const char* methodName = "cudaComputeAmoebaMutualInducedAndGkFieldBySOR";
#ifdef AMOEBA_DEBUG
std::vector<int> fileId;
fileId.resize( 2 ); fileId.resize( 2 );
fileId[0] = timestep; fileId[0] = timestep;
fileId[1] = 1; fileId[1] = 1;
...@@ -780,7 +779,7 @@ static void cudaComputeAmoebaMutualInducedAndGkFieldBySOR( amoebaGpuContext amoe ...@@ -780,7 +779,7 @@ static void cudaComputeAmoebaMutualInducedAndGkFieldBySOR( amoebaGpuContext amoe
if( (numOfElems % numThreads) != 0 )numBlocks++; if( (numOfElems % numThreads) != 0 )numBlocks++;
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
if( amoebaGpu->log ){ if( amoebaGpu->log && timestep == 1 ){
(void) fprintf( amoebaGpu->log, "%s %d numOfElems=%d numThreads=%d numBlocks=%d " (void) fprintf( amoebaGpu->log, "%s %d numOfElems=%d numThreads=%d numBlocks=%d "
"maxIterations=%d targetEpsilon=%.3e\n", "maxIterations=%d targetEpsilon=%.3e\n",
methodName, gpu->natoms, numOfElems, numThreads, numBlocks, methodName, gpu->natoms, numOfElems, numThreads, numBlocks,
...@@ -981,6 +980,12 @@ time_t start = clock(); ...@@ -981,6 +980,12 @@ time_t start = clock();
amoebaGpu->mutualInducedDone = done; amoebaGpu->mutualInducedDone = done;
amoebaGpu->mutualInducedConverged = ( !done || iteration > amoebaGpu->mutualInducedMaxIterations ) ? 0 : 1; amoebaGpu->mutualInducedConverged = ( !done || iteration > amoebaGpu->mutualInducedMaxIterations ) ? 0 : 1;
if( amoebaGpu->log ){
(void) fprintf( amoebaGpu->log, "%s done=%d converged=%d iteration=%d eps=%14.7e\n",
methodName, done, amoebaGpu->mutualInducedConverged, iteration, amoebaGpu->mutualInducedCurrentEpsilon );
(void) fflush( amoebaGpu->log );
}
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
if( 1 ){ if( 1 ){
std::vector<int> fileId; std::vector<int> fileId;
......
...@@ -1613,8 +1613,12 @@ void kCalculateAmoebaLocalForces(amoebaGpuContext gpu) ...@@ -1613,8 +1613,12 @@ void kCalculateAmoebaLocalForces(amoebaGpuContext gpu)
{ {
if( gpu->log ){ if( gpu->log ){
(void) fprintf( gpu->log,"kCalculateAmoebaLocalForces: blks=%u thrds/blk=%u\n", static int call = 0;
gpu->gpuContext->sim.blocks, gpu->gpuContext->sim.localForces_threads_per_block); fflush( gpu->log ); if( call == 0 ){
(void) fprintf( gpu->log,"kCalculateAmoebaLocalForces: blks=%u thrds/blk=%u\n",
gpu->gpuContext->sim.blocks, gpu->gpuContext->sim.localForces_threads_per_block); fflush( gpu->log );
call++;
}
} }
kCalculateAmoebaLocalForces_kernel<<<gpu->gpuContext->sim.blocks, gpu->gpuContext->sim.localForces_threads_per_block>>>(); kCalculateAmoebaLocalForces_kernel<<<gpu->gpuContext->sim.blocks, gpu->gpuContext->sim.localForces_threads_per_block>>>();
......
...@@ -84,7 +84,9 @@ static std::string AMOEBA_FIXED_E_GK = "AmoebaF ...@@ -84,7 +84,9 @@ static std::string AMOEBA_FIXED_E_GK = "AmoebaF
static std::string AMOEBA_INDUCDED_DIPOLES = "AmoebaInducedDipoles"; static std::string AMOEBA_INDUCDED_DIPOLES = "AmoebaInducedDipoles";
static std::string AMOEBA_INDUCDED_DIPOLES_GK = "AmoebaInducedDipoles_GK"; static std::string AMOEBA_INDUCDED_DIPOLES_GK = "AmoebaInducedDipoles_GK";
static std::string INCLUDE_OBC_CAVITY_TERM = "INCLUDE_OBC_CAVITY_TERM"; static std::string INCLUDE_OBC_CAVITY_TERM = "includeObcCavityTerm";
static std::string MUTUAL_INDUCED_MAX_ITERATIONS = "mutualInducedMaxIterations";
static std::string MUTUAL_INDUCED_TARGET_EPSILON = "mutualInducedTargetEpsilon";
#define AmoebaHarmonicBondIndex 0 #define AmoebaHarmonicBondIndex 0
#define AmoebaHarmonicAngleIndex 1 #define AmoebaHarmonicAngleIndex 1
...@@ -147,6 +149,10 @@ typedef std::map< std::string, double > MapStringDouble; ...@@ -147,6 +149,10 @@ typedef std::map< std::string, double > MapStringDouble;
typedef MapStringDouble::iterator MapStringDoubleI; typedef MapStringDouble::iterator MapStringDoubleI;
typedef MapStringDouble::const_iterator MapStringDoubleCI; typedef MapStringDouble::const_iterator MapStringDoubleCI;
typedef std::map< std::string, Force*> MapStringForce;
typedef MapStringForce::iterator MapStringForceI;
typedef MapStringForce::const_iterator MapStringForceCI;
// default return value from methods // default return value from methods
static const int DefaultReturnValue = 0; static const int DefaultReturnValue = 0;
......
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