"platforms/opencl/include/OpenCLKernels.h" did not exist on "15811b7c56b65a5e94e4c7b212100b37b4de331f"
Commit 9966f134 authored by Peter Eastman's avatar Peter Eastman
Browse files

Test cases detect if CPU is not supported and exit rather than crashing

parent bd543402
......@@ -223,6 +223,10 @@ void testForce(int numParticles, NonbondedForce::NonbondedMethod method, GBSAOBC
int main() {
try {
if (!CpuPlatform::isProcessorSupported()) {
cout << "CPU is not supported. Exiting." << endl;
return 0;
}
testSingleParticle();
testCutoffAndPeriodic();
for (int i = 5; i < 11; i++) {
......
......@@ -264,6 +264,10 @@ void testRandomSeed() {
int main() {
try {
if (!CpuPlatform::isProcessorSupported()) {
cout << "CPU is not supported. Exiting." << endl;
return 0;
}
testSingleBond();
testTemperature();
testConstraints();
......
......@@ -105,6 +105,10 @@ void testConstraints() {
int main(int argc, char* argv[]) {
try {
if (!CpuPlatform::isProcessorSupported()) {
cout << "CPU is not supported. Exiting." << endl;
return 0;
}
testConstraints();
}
catch(const exception& e) {
......
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