mdanalysis
mdanalysis copied to clipboard
asv: fix benchmark tests: analysis.rms.SimpleRmsBench.time_rmsd
Expected behavior
All ASV benchmarks for the latest develop run (see benchmarks.benchmarks for the code and the MDAnalysis/benchmarks repo + the benchmarks wiki for more details.)
Actual behavior
Some analysis.rms.SimpleRmsBench.time_rmsd tests fail as shown below (recent output from nightly run on Python 3.6)
[ 96.15%] ··· analysis.rms.SimpleRmsBench.time_rmsd 12/24 failed
[ 96.15%] ··· =========== ============ ======== =============== =============
num_atoms weights center superposition
----------- ------------ -------- --------------- -------------
100 None False False 13.9±0.06μs
100 None False True 36.3±0.1μs
100 None True False 42.9±0.2μs
100 None True True 36.5±0.2μs
100 [1.0, 0.5] False False failed
100 [1.0, 0.5] False True failed
100 [1.0, 0.5] True False failed
100 [1.0, 0.5] True True failed
500 None False False 17.5±0.08μs
500 None False True 57.2±0.4μs
500 None True False 66.2±0.2μs
500 None True True 56.9±0.2μs
500 [1.0, 0.5] False False failed
500 [1.0, 0.5] False True failed
500 [1.0, 0.5] True False failed
500 [1.0, 0.5] True True failed
2000 None False False 28.4±0.1μs
2000 None False True 130±0.2μs
2000 None True False 148±0.4μs
2000 None True True 130±0.8μs
2000 [1.0, 0.5] False False failed
2000 [1.0, 0.5] False True failed
2000 [1.0, 0.5] True False failed
2000 [1.0, 0.5] True True failed
=========== ============ ======== =============== =============
[ 96.15%] ···· For parameters: 100, [1.0, 0.5], False, False
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 239, in rmsd
raise ValueError('weights must have same length as a and b')
ValueError: weights must have same length as a and b
For parameters: 100, [1.0, 0.5], False, True
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 100, [1.0, 0.5], True, False
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 100, [1.0, 0.5], True, True
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 500, [1.0, 0.5], False, False
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 239, in rmsd
raise ValueError('weights must have same length as a and b')
ValueError: weights must have same length as a and b
For parameters: 500, [1.0, 0.5], False, True
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 500, [1.0, 0.5], True, False
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 500, [1.0, 0.5], True, True
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 2000, [1.0, 0.5], False, False
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 239, in rmsd
raise ValueError('weights must have same length as a and b')
ValueError: weights must have same length as a and b
For parameters: 2000, [1.0, 0.5], False, True
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 2000, [1.0, 0.5], True, False
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.
For parameters: 2000, [1.0, 0.5], True, True
Traceback (most recent call last):
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1184, in main_run_server
main_run(run_args)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 1058, in main_run
result = benchmark.do_run()
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 537, in do_run
return self.run(*self._current_params)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 631, in run
min_run_count=self.min_run_count)
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 663, in benchmark_timing
timing = timer.timeit(number)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/timeit.py", line 178, in timeit
timing = self.inner(it, self.timer)
File "<timeit-src>", line 6, in inner
File "~/miniconda3/envs/benchmark/lib/python3.6/site-packages/asv/benchmark.py", line 599, in <lambda>
func = lambda: self.func(*param)
File "~/mdanalysis/benchmarks/benchmarks/analysis/rms.py", line 50, in time_rmsd
superposition=superposition)
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/MDAnalysis/analysis/rms.py", line 234, in rmsd
a = a - np.average(a, axis=0, weights=weights)
File "<__array_function__ internals>", line 6, in average
File "~/mdanalysis/benchmarks/env/80c5ba7efaa89366b97da3ced85c0c44/lib/python3.6/site-packages/numpy/lib/function_base.py", line 414, in average
"Length of weights not compatible with specified axis.")
ValueError: Length of weights not compatible with specified axis.