"wrappers/python/src/vscode:/vscode.git/clone" did not exist on "6281f23fc404f0ff01db05655dcc0479b796f454"
Commit 562283df authored by Yutong Zhao's avatar Yutong Zhao
Browse files

minor bug fixes

parent f4591cad
......@@ -394,7 +394,7 @@ CUmodule CudaContext::createModule(const string source, const map<string, string
// Write out the source to a temporary file.
stringstream tempFileName;
tempFileName << "openmmTempKernel" << this; // Include a pointer to this context as part of the filename to avoid collisions.
tempFileName << "openmmTempKernel" << rand(); //<< this; // Include a pointer to this context as part of the filename to avoid collisions.
string inputFile = (tempDir+tempFileName.str()+".cu");
string outputFile = (tempDir+tempFileName.str()+".ptx");
string logFile = (tempDir+tempFileName.str()+".log");
......@@ -438,15 +438,15 @@ CUmodule CudaContext::createModule(const string source, const map<string, string
m<<"Error loading CUDA module: "<<getErrorString(result)<<" ("<<result<<")";
throw OpenMMException(m.str());
}
remove(inputFile.c_str());
remove(outputFile.c_str());
remove(logFile.c_str());
//remove(inputFile.c_str());
//remove(outputFile.c_str());
//remove(logFile.c_str());
return module;
}
catch (...) {
remove(inputFile.c_str());
remove(outputFile.c_str());
remove(logFile.c_str());
//remove(inputFile.c_str());
//remove(outputFile.c_str());
//remove(logFile.c_str());
throw;
}
}
......
......@@ -415,8 +415,6 @@ void CudaNonbondedUtilities::setAtomBlockRange(double startFraction, double endF
numTiles = (int) (endFraction*totalTiles)-startTileIndex;
}
#include <map>
CUfunction CudaNonbondedUtilities::createInteractionKernel(const string& source, vector<ParameterInfo>& params, vector<ParameterInfo>& arguments, bool useExclusions, bool isSymmetric) {
map<string, string> defines;
......@@ -475,8 +473,7 @@ CUfunction CudaNonbondedUtilities::createInteractionKernel(const string& source,
// Part 1. Defines for on diagonal exclusion tiles
stringstream loadLocal1;
if(useShuffle) {
// not needed if using shuffles as we can directly fetch from
// LOAD_ATOM1_PARAMETERS
// not needed if using shuffles as we can directly fetch from register
} else {
for (int i = 0; i < (int) params.size(); i++) {
if (params[i].getNumComponents() == 1) {
......@@ -616,8 +613,6 @@ CUfunction CudaNonbondedUtilities::createInteractionKernel(const string& source,
defines["LAST_EXCLUSION_TILE"] = context.intToString(endExclusionIndex);
if ((localDataSize/4)%2 == 0 && !context.getUseDoublePrecision())
defines["PARAMETER_SIZE_IS_EVEN"] = "1";
//if (context.getComputeCapability() >= 3.0 && !context.getUseDoublePrecision())
// defines["ENABLE_SHUFFLE"] = "1";
CUmodule program = context.createModule(CudaKernelSources::vectorOps+context.replaceStrings(CudaKernelSources::nonbonded, replacements), defines);
CUfunction kernel = context.getKernel(program, "computeNonbonded");
......
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