-
Notifications
You must be signed in to change notification settings - Fork 0
kltpicker gpu capable does not run on cpu only node when cuda is present #1
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
Comments
Thank you very much for noting this.
I believe I fixed the problem as you suggested.
The repository https://github.com/ShkolniskyLab/kltpicker has been updated.
Could you please verify that the updated version meets your expectations?
If so, I will update the version on pypi.
Thanks a lot!
Yoel
…On Tue, May 11, 2021 at 1:18 PM Eric Deveaud ***@***.***> wrote:
Hello,
I tested kltpicker-1.2.8 on 3 different hardware.
it was built with cupy-11.2 support on a node with gpu.
1. gpu node with cuda installed
2. cpu node without cuda
3. cpu node with cuda installed, no gpu cards
it runs fine on gpu node, see:
maestro-builder:kltpicker/1.2.8-gpu > kltpicker -i ../../datas/kltpicker -o /opt/gensoft/tests/kltpicker/1.2.8-gpu -s 1 -p 1 -n 1
Running on 1 files.
Using GPUs 0.
/opt/gensoft/tests/kltpicker/1.2.8-gpu
Preprocessing (usually takes up to 1 minute)...
runs fine on cpu only node, see:
kltpicker -i ../../datas/kltpicker -o /local/gensoft2/tests/kltpicker/1.2.8-cpu -s 1 -p 1 -n 1
Running on 1 files.
/local/gensoft2/tests/kltpicker/1.2.8-cpu
Preprocessing (usually takes up to 1 minute)...
Preprocess finished. Picking particles...
but when I run it on a node with installed cuda and no gpu cards it fails.
see:
***@***.*** kltpicker-1.2.8-cpu]$ kltpicker -h
Traceback (most recent call last):
File "/opt/gensoft/exe/kltpicker/1.2.8-gpu/bin/kltpicker", line 8, in <module>
sys.exit(main())
File "/opt/gensoft/exe/kltpicker/1.2.8-gpu/venv/lib/python3.8/site-packages/kltpicker/main.py", line 159, in main
args = parse_args(HAS_CUPY)
File "/opt/gensoft/exe/kltpicker/1.2.8-gpu/venv/lib/python3.8/site-packages/kltpicker/kltpicker_input.py", line 31, in parse_args
parser.add_argument('--gpus', help='Indices of GPUs to be used. Valid indices: 0,...,%d. Enter -1 to use all available GPUS.'%(num_gpus-1), default=[-1], nargs='+', type=check_range_gpu)
NameError: name 'num_gpus' is not defined
indeed there is no graphics card installed so
kltpicker_input.py fails silently here
try:
import cupy
num_gpus = cupy.cuda.runtime.getDeviceCount()
except:
pass
IMHO it is legit to have cuda insatlled on system without gpu cards
I would suggest the follwoing fix that allows kltpicker to runn on all 3
conditions
just change main.py check for cupy import, to also test if there is any
gpu card available.
something like:
# Check if CuPy is installed AND we have gpu devices
try:
import cupy as cp
cp.cuda.runtime.getDeviceCount()
HAS_CUPY = 1
except:
HAS_CUPY = 0
whith this patch I was abble to succesfully run ltpicker on all my nodes
regards
Eric
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA52MT53VREE2W3HG5JWQ2DTNEABBANCNFSM44VAPKSA>
.
|
yes it does thanks Eric |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I tested kltpicker-1.2.8 on 3 different hardware.
it was built with cupy-11.2 support on a node with gpu.
it runs fine on gpu node, see:
runs fine on cpu only node, see:
but when I run it on a node with installed cuda and no gpu cards it fails. see:
indeed there is no graphics card installed so
kltpicker_input.py
fails silently hereIMHO it is legit to have cuda insatlled on system without gpu cards
I would suggest the follwoing fix that allows kltpicker to runn on all 3 conditions
just change
main.py
check for cupy import, to also test if there is any gpu card available.something like:
whith this patch I was abble to succesfully run ltpicker on all my nodes
regards
Eric
The text was updated successfully, but these errors were encountered: