Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel prediction not working on Windows #12

Open
mhellstr opened this issue Aug 26, 2020 · 0 comments
Open

parallel prediction not working on Windows #12

mhellstr opened this issue Aug 26, 2020 · 0 comments

Comments

@mhellstr
Copy link

If I use the ASE interface on Windows I get the below error. It works fine if I comment out the line with prepare_parallel() in SGDMLCalculator (such that I run in serial?). Would it be possible to check for the OS and run sgdml-via-ase in serial on Windows?

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "C:\AMS2019.405.r87185\bin\python3.6\lib\multiprocessing\pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\matti\.scm\python\AMS2019.4.venv\lib\site-packages\sgdml\predict.py", line 121, in _predict_wkr
    glob = globs[glob_id]
NameError: name 'globs' is not defined
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:/AMS2019.405.r87185/scripting/standalone/external_engines/ase_calculators.py", line 50, in <module>
    ase_calculator = engine_interface.get_ase_calculator(model_name=args.model_name, params_path=args.params_path)
  File "C:\AMS2019.405.r87185\scripting\scm\external_engines\core.py", line 223, in get_ase_calculator
    calc = SGDMLCalculator(params_path, E_to_eV=E_to_eV, F_to_eV_Ang=F_to_eV_Ang)
  File "C:\Users\matti\.scm\python\AMS2019.4.venv\lib\site-packages\sgdml\intf\ase_calc.py", line 70, in __init__
    self.gdml_predict.prepare_parallel()
  File "C:\Users\matti\.scm\python\AMS2019.4.venv\lib\site-packages\sgdml\predict.py", line 756, in prepare_parallel
    gps = n_bulk * n_reps / timeit.timeit(_dummy_predict, number=n_reps)
  File "C:\AMS2019.405.r87185\bin\python3.6\lib\timeit.py", line 233, in timeit
    return Timer(stmt, setup, timer, globals).timeit(number)
  File "C:\AMS2019.405.r87185\bin\python3.6\lib\timeit.py", line 178, in timeit
    timing = self.inner(it, self.timer)
  File "<timeit-src>", line 6, in inner
  File "C:\Users\matti\.scm\python\AMS2019.4.venv\lib\site-packages\sgdml\predict.py", line 699, in _dummy_predict
    self.predict(r_dummy)
  File "C:\Users\matti\.scm\python\AMS2019.4.venv\lib\site-packages\sgdml\predict.py", line 1088, in predict
    _predict_wo_wkr_starts_stops, self.wkr_starts_stops
  File "C:\AMS2019.405.r87185\bin\python3.6\lib\multiprocessing\pool.py", line 735, in next
    raise value
NameError: name 'globs' is not defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant