Closed nelse003 closed 6 years ago
Using a fixed function seems to work:
def f_1(x, magic_string):
print(magic_string)
return x**2
def try_f_caller():
f_call = f_caller(magic_string="CATS")
result = libtbx.easy_mp.pool_map(fixed_func=f_call, args=range(101))
print(result)
return result
class f_caller (object) :
def __init__ (self, magic_string) :
self._obj = magic_string
def __call__ (self, x) :
return f_1(x,magic_string = self._obj)
and the corresponding test
def test_try_f_caller():
result = try_f_caller()
assert result[-1] == 10000
Passes.
Lets look at the exact failure of test_validation?
pytest -s allows printing for update of whats going on. Use screen for crashes of ssh connection
Pytest no longer used
Creating a simple instance of libtbx implemented multiprocessing to test in pytest:
And the corresponding test:
This test passes (locally on ccp4-python -m pytest). This implies that multiprocessing may not be the issue. Try an example with a call with a fixed function?