Closed josemendez-villanueva closed 1 year ago
notes:
os
is different for Windows. os.setsid
does not exist in Windows.
preexec_fn=os.setsid
now implemented by setting start_new_session=True
from the subprocess documentation
Note If you need to modify the environment for the child use the env parameter rather than doing it in a preexec_fn. The start_new_session and process_group parameters should take the place of code using preexec_fn to call os.setsid() or os.setpgid() in the child.
/bin/bash
is not OS agnostic, and executer now specifies sh
which should be a predefined alias if bash is supported
This should help windows users though WSL now available and may be preferred implementation.
So far, the new PR has been working. Will close for now and can reopen if issue reappears.
Running netpyne/examples/asdOptima/batch.py and netpyne/examples/optunaOptim/batch.py generate the following error:
AttributeError: module 'os' has no attribute 'setsid'
Both files in netpyne/netpyne/batch/asd_parallel.py and netpyne/netpyne/batch/optuna_parallel.py have this attribute 'setsid' that is not usable in Windows.