Commit b915aca5 authored by peastman's avatar peastman
Browse files

Merge pull request #343 from rmcgibbo/test-cpu-settle

[WIP] TestCpuSettle segfault on travis
parents e6410ce2 b41dc1fc
...@@ -5,13 +5,14 @@ compiler: ...@@ -5,13 +5,14 @@ compiler:
before_install: before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq libpcre3 libpcre3-dev gromacs - sudo apt-get install -qq libpcre3 libpcre3-dev gromacs
- sudo apt-get install -qq swig doxygen - sudo apt-get install -qq swig doxygen llvm-3.3
- sudo apt-get install -qq python-numpy python-scipy python-nose - sudo apt-get install -qq python-numpy python-scipy python-nose
- export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.3
script: script:
- cmake -DCMAKE_INSTALL_PREFIX=~/OpenMM . - cmake -DCMAKE_INSTALL_PREFIX=~/OpenMM -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-g -fsanitize=address -fno-omit-frame-pointer -O2" .
- make - make
- make test - make test
- make install - make install
- ls ~/OpenMM/include - ls ~/OpenMM/include
- export LD_LIBRARY_PATH=~/OpenMM/lib/ - export LD_LIBRARY_PATH=~/OpenMM/lib/
......
...@@ -41,7 +41,9 @@ public: ...@@ -41,7 +41,9 @@ public:
inverseMasses(inverseMasses), tolerance(tolerance), threadSettle(threadSettle) { inverseMasses(inverseMasses), tolerance(tolerance), threadSettle(threadSettle) {
} }
void execute(ThreadPool& threads, int threadIndex) { void execute(ThreadPool& threads, int threadIndex) {
threadSettle[threadIndex]->apply(atomCoordinates, atomCoordinatesP, inverseMasses, tolerance); if (threadIndex < threadSettle.size()) {
threadSettle[threadIndex]->apply(atomCoordinates, atomCoordinatesP, inverseMasses, tolerance);
}
} }
vector<OpenMM::RealVec>& atomCoordinates; vector<OpenMM::RealVec>& atomCoordinates;
vector<OpenMM::RealVec>& atomCoordinatesP; vector<OpenMM::RealVec>& atomCoordinatesP;
......
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