mirror of
https://git.freebsd.org/ports.git
synced 2025-06-07 22:00:31 -04:00
Version 0.19.2 is too old and does not support Python-3.9. Remark: threadpoolctl is disabled in this port. See <https://github.com/MDAnalysis/mdanalysis/pull/2950> for the impacts on performance. Releases notes at <https://github.com/MDAnalysis/mdanalysis/releases>. PR: 264716 Approved by: yuri (maintainer)
54 lines
2.1 KiB
Python
54 lines
2.1 KiB
Python
--- MDAnalysisTests/transformations/test_base.py.orig 2022-06-02 18:49:13 UTC
|
|
+++ MDAnalysisTests/transformations/test_base.py
|
|
@@ -23,7 +23,8 @@ from numpy.testing import assert_equal
|
|
import numpy as np
|
|
import pytest
|
|
from numpy.testing import assert_equal
|
|
-from threadpoolctl import threadpool_info
|
|
+# threadpoolctl is not yet usable on FreeBSD
|
|
+#from threadpoolctl import threadpool_info
|
|
|
|
import MDAnalysis as mda
|
|
from MDAnalysisTests.datafiles import PSF, DCD
|
|
@@ -36,7 +37,7 @@ class DefaultTransformation(TransformationBase):
|
|
super().__init__()
|
|
|
|
def _transform(self, ts):
|
|
- self.runtime_info = threadpool_info()
|
|
+ """self.runtime_info = threadpool_info()"""
|
|
ts.positions = ts.positions + 1
|
|
return ts
|
|
|
|
@@ -54,7 +55,7 @@ class CustomTransformation(TransformationBase):
|
|
parallelizable=parallelizable)
|
|
|
|
def _transform(self, ts):
|
|
- self.runtime_info = threadpool_info()
|
|
+ """self.runtime_info = threadpool_info()"""
|
|
ts.positions = ts.positions + 1
|
|
return ts
|
|
|
|
@@ -88,17 +89,17 @@ def test_thread_limit_apply(u):
|
|
|
|
|
|
def test_thread_limit_apply(u):
|
|
- default_thread_info = threadpool_info()
|
|
+ """default_thread_info = threadpool_info()
|
|
default_num_thread_limit_list = [thread_info['num_threads']
|
|
for thread_info in default_thread_info]
|
|
|
|
new_trans = CustomTransformation(max_threads=2)
|
|
_ = new_trans(u.trajectory.ts)
|
|
- for thread_info in new_trans.runtime_info:
|
|
- assert thread_info['num_threads'] == 2
|
|
+ for thread_info in new_trans.runtime_info:"""
|
|
+ assert thread_info['num_threads'] == 2
|
|
|
|
# test the thread limit is only applied locally.
|
|
- new_thread_info = threadpool_info()
|
|
+ """new_thread_info = threadpool_info()
|
|
new_num_thread_limit_list = [thread_info['num_threads']
|
|
- for thread_info in new_thread_info]
|
|
- assert_equal(default_num_thread_limit_list, new_num_thread_limit_list)
|
|
+ for thread_info in new_thread_info]"""
|
|
+ assert_equal(default_num_thread_limit_list, 2)
|