-
Notifications
You must be signed in to change notification settings - Fork 141
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
[Bug] Execution Freeze while using CudaDevice.count()
in global scope
#69
Comments
Seems like it pertains to name, i was directly running without setting the namespace, which led to the above error in the script, whereas in the ipython shell it is already set by already. |
CudaDevice.count()
in global scope
Hi @aradhyamathur, thanks for raising this. Having # test.py
from nvitop import CudaDevice
print(CudaDevice.count()) RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable. I opened a PR #70 to resolve this. Could you try the patch with the following command? pip3 install git+https://github.com/XuehaiPan/nvitop@spawn-subprocess |
This fix is included in release 1.1.2. pip3 install --upgrade nvitop |
Thanks I'll check. |
Yeah @XuehaiPan it works, thanks. |
Required prerequisites
Questions
Upon calling
print(CudaDevice.count())
I receive the following error and the execution gets stuck and have to interrupt it manually. Can you please guide ?nvitop version 1.1.1
NVIDIA-SMI 470.182.03 Driver Version: 470.182.03 CUDA Version: 11.4
The text was updated successfully, but these errors were encountered: