Commit 9e66f0b1 authored by peastman's avatar peastman
Browse files

Merge pull request #1469 from peastman/properties

Unified names of platform properties
parents 25d21454 cc4caaba
...@@ -3066,7 +3066,7 @@ int main(int argc, char* argv[]) { ...@@ -3066,7 +3066,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaMultipoleForce running test..." << std::endl; std::cout << "TestCudaAmoebaMultipoleForce running test..." << std::endl;
registerAmoebaCudaKernelFactories(); registerAmoebaCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
// tests using two ammonia molecules // tests using two ammonia molecules
......
...@@ -490,7 +490,7 @@ int main(int argc, char* argv[]) { ...@@ -490,7 +490,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaOutOfPlaneBendForce running test..." << std::endl; std::cout << "TestCudaAmoebaOutOfPlaneBendForce running test..." << std::endl;
registerAmoebaCudaKernelFactories(); registerAmoebaCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testOneOutOfPlaneBend(); testOneOutOfPlaneBend();
testPeriodic(); testPeriodic();
......
...@@ -328,7 +328,7 @@ int main(int argc, char* argv[]) { ...@@ -328,7 +328,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaPiTorsionForce running test..." << std::endl; std::cout << "TestCudaAmoebaPiTorsionForce running test..." << std::endl;
registerAmoebaCudaKernelFactories(); registerAmoebaCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testOnePiTorsion(); testOnePiTorsion();
testPeriodic(); testPeriodic();
} catch(const std::exception& e) { } catch(const std::exception& e) {
......
...@@ -306,7 +306,7 @@ int main(int argc, char* argv[]) { ...@@ -306,7 +306,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaStretchBendForce running test..." << std::endl; std::cout << "TestCudaAmoebaStretchBendForce running test..." << std::endl;
registerAmoebaCudaKernelFactories(); registerAmoebaCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testOneStretchBend(); testOneStretchBend();
testPeriodic(); testPeriodic();
} catch(const std::exception& e) { } catch(const std::exception& e) {
......
...@@ -2711,7 +2711,7 @@ int main(int argc, char* argv[]) { ...@@ -2711,7 +2711,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaTorsionTorsionForce running test..." << std::endl; std::cout << "TestCudaAmoebaTorsionTorsionForce running test..." << std::endl;
registerAmoebaCudaKernelFactories(); registerAmoebaCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testTorsionTorsion(1); testTorsionTorsion(1);
testPeriodic(); testPeriodic();
} catch(const std::exception& e) { } catch(const std::exception& e) {
......
...@@ -2015,7 +2015,7 @@ int main(int argc, char* argv[]) { ...@@ -2015,7 +2015,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaVdwForce running test..." << std::endl; std::cout << "TestCudaAmoebaVdwForce running test..." << std::endl;
registerAmoebaCudaKernelFactories(); registerAmoebaCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testVdw(); testVdw();
......
...@@ -172,7 +172,7 @@ int main(int argc, char* argv[]) { ...@@ -172,7 +172,7 @@ int main(int argc, char* argv[]) {
std::cout << "TestCudaAmoebaWcaDispersionForce running test..." << std::endl; std::cout << "TestCudaAmoebaWcaDispersionForce running test..." << std::endl;
registerAmoebaCudaKernelFactories(); registerAmoebaCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
// test Wca dispersion force using two ammonia molecules // test Wca dispersion force using two ammonia molecules
......
...@@ -197,7 +197,7 @@ int main(int argc, char* argv[]) { ...@@ -197,7 +197,7 @@ int main(int argc, char* argv[]) {
try { try {
registerDrudeCudaKernelFactories(); registerDrudeCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", std::string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", std::string(argv[1]));
testSingleParticle(); testSingleParticle();
testAnisotropicParticle(); testAnisotropicParticle();
testThole(); testThole();
......
...@@ -183,7 +183,7 @@ int main(int argc, char* argv[]) { ...@@ -183,7 +183,7 @@ int main(int argc, char* argv[]) {
try { try {
registerDrudeCudaKernelFactories(); registerDrudeCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", string(argv[1]));
testSinglePair(); testSinglePair();
testWater(); testWater();
} }
......
...@@ -110,7 +110,7 @@ void testWater() { ...@@ -110,7 +110,7 @@ void testWater() {
State state = context.getState(State::Energy); State state = context.getState(State::Energy);
double initialEnergy; double initialEnergy;
int numSteps = 1000; int numSteps = 1000;
double maxNorm = (platform.getPropertyValue(context, "CudaPrecision") == "double" ? 1.0 : 5.0); double maxNorm = (platform.getPropertyValue(context, "Precision") == "double" ? 1.0 : 5.0);
for (int i = 0; i < numSteps; i++) { for (int i = 0; i < numSteps; i++) {
integ.step(1); integ.step(1);
state = context.getState(State::Energy | State::Forces); state = context.getState(State::Energy | State::Forces);
...@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) { ...@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) {
try { try {
registerDrudeCudaKernelFactories(); registerDrudeCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", string(argv[1]));
testWater(); testWater();
} }
catch(const std::exception& e) { catch(const std::exception& e) {
......
...@@ -197,7 +197,7 @@ int main(int argc, char* argv[]) { ...@@ -197,7 +197,7 @@ int main(int argc, char* argv[]) {
try { try {
registerDrudeOpenCLKernelFactories(); registerDrudeOpenCLKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", std::string(argv[1])); Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", std::string(argv[1]));
testSingleParticle(); testSingleParticle();
testAnisotropicParticle(); testAnisotropicParticle();
testThole(); testThole();
......
...@@ -183,7 +183,7 @@ int main(int argc, char* argv[]) { ...@@ -183,7 +183,7 @@ int main(int argc, char* argv[]) {
try { try {
registerDrudeOpenCLKernelFactories(); registerDrudeOpenCLKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", string(argv[1])); Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", string(argv[1]));
testSinglePair(); testSinglePair();
testWater(); testWater();
} }
......
...@@ -110,7 +110,7 @@ void testWater() { ...@@ -110,7 +110,7 @@ void testWater() {
State state = context.getState(State::Energy); State state = context.getState(State::Energy);
double initialEnergy; double initialEnergy;
int numSteps = 1000; int numSteps = 1000;
double maxNorm = (platform.getPropertyValue(context, "OpenCLPrecision") == "double" ? 1.0 : 5.0); double maxNorm = (platform.getPropertyValue(context, "Precision") == "double" ? 1.0 : 5.0);
for (int i = 0; i < numSteps; i++) { for (int i = 0; i < numSteps; i++) {
integ.step(1); integ.step(1);
state = context.getState(State::Energy | State::Forces); state = context.getState(State::Energy | State::Forces);
...@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) { ...@@ -131,7 +131,7 @@ int main(int argc, char* argv[]) {
try { try {
registerDrudeOpenCLKernelFactories(); registerDrudeOpenCLKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", string(argv[1])); Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", string(argv[1]));
testWater(); testWater();
} }
catch(const std::exception& e) { catch(const std::exception& e) {
......
...@@ -554,7 +554,7 @@ int main(int argc, char* argv[]) { ...@@ -554,7 +554,7 @@ int main(int argc, char* argv[]) {
try { try {
registerRPMDCudaKernelFactories(); registerRPMDCudaKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("CUDA").setPropertyDefaultValue("CudaPrecision", string(argv[1])); Platform::getPlatformByName("CUDA").setPropertyDefaultValue("Precision", string(argv[1]));
testFreeParticles(); testFreeParticles();
testParaHydrogen(); testParaHydrogen();
testCMMotionRemoval(); testCMMotionRemoval();
......
...@@ -555,7 +555,7 @@ int main(int argc, char* argv[]) { ...@@ -555,7 +555,7 @@ int main(int argc, char* argv[]) {
try { try {
registerRPMDOpenCLKernelFactories(); registerRPMDOpenCLKernelFactories();
if (argc > 1) if (argc > 1)
Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("OpenCLPrecision", string(argv[1])); Platform::getPlatformByName("OpenCL").setPropertyDefaultValue("Precision", string(argv[1]));
testFreeParticles(); testFreeParticles();
testParaHydrogen(); testParaHydrogen();
testCMMotionRemoval(); testCMMotionRemoval();
......
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