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

Report a bug: warp?(codes can be run well in my workstation) #2

Closed
leung1010 opened this issue Jun 12, 2024 · 10 comments
Closed

Report a bug: warp?(codes can be run well in my workstation) #2

leung1010 opened this issue Jun 12, 2024 · 10 comments

Comments

@leung1010
Copy link

when I excute the command:
xxx$python experiments/scripts/dataset/main.py
I got this, as follow:
`env:
blob:
bsdf_pcd:
type: diffuse
reflectance:
type: rgb
value:
- 0.92941176
- 0.32941176
- 0.23137255
material:
elasticity:
cls: CorotatedElasticity
E: 100000.0
nu: 0.2
requires_grad: false
random: false
plasticity:
cls: IdentityPlasticity
requires_grad: false
random: false
name: jelly
ckpt: null
shape:
type: cube
name: dataset
center:
- 0.5
- 0.5
- 0.5
size:
- 0.5
- 0.5
- 0.5
resolution: 10
mode: uniform
sort: null
vel:
random: false
lin_vel:
- 1.0
- -1.5
- -2.0
ang_vel:
- 4.0
- 4.0
- 4.0
name: jelly
rho: 1000.0
span:
- 0
- 1000
clip_bound: 0.5
render:
spp: 32
width: 512
height: 512
skip_frame: 25
bound: 1.75
mpm_mul: 6
sph_version: cuda_ad_rgb
pcd_version: cuda_ad_rgb
has_sphere_emitter: true
fps: 10
sim:
quality: low
num_steps: 1000
gravity:

  • 0.0
  • -9.8
  • 0.0
    bc: freeslip
    num_grids: 20
    dt: 0.0005
    bound: 3
    eps: 1.0e-07
    skip_frame: 1
    train:
    teacher:
    strategy: cosine
    start_lambda: 25
    end_lambda: 200
    num_epochs: 300
    batch_size: 128
    elasticity_lr: 1.0
    plasticity_lr: 0.1
    elasticity_wd: 0.0
    plasticity_wd: 0.0
    elasticity_grad_max_norm: 0.1
    plasticity_grad_max_norm: 0.1
    name: jelly/dataset
    seed: 0
    cpu: 0
    num_cpus: 128
    gpu: 0
    overwrite: false
    resume: false
    gt_name: null
    dataset: true

Warp 0.6.1 initialized:
CUDA not available
Devices:
"cpu" | x86_64
Kernel cache: /home/xxxx/.cache/warp/0.6.1
Error executing job with overrides: ['overwrite=False', 'resume=False', 'gpu=0', 'cpu=0', 'env=jelly', 'render=debug', 'sim=low', 'name=jelly/dataset', 'dataset=True']
Traceback (most recent call last):
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 137, in
main()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 457, in _run_app
run_and_report(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 458, in
lambda: hydra.run(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 132, in run
_ = ret.return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 35, in main
wp_device = wp.get_device(f'cuda:{cfg.gpu}')
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1676, in get_device
return runtime.get_device(ident)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1484, in get_device
return self.device_map[ident]
KeyError: 'cuda:0'
env:
blob:
bsdf_pcd:
type: diffuse
reflectance:
type: rgb
value:
- 0.96078431
- 0.88235294
- 0.63529412
material:
elasticity:
cls: SigmaElasticity
E: 1000000.0
nu: 0.2
requires_grad: false
random: false
plasticity:
cls: DruckerPragerPlasticity
E: 1000000.0
nu: 0.2
friction_angle: 25.0
cohesion: 0.0
requires_grad: false
random: false
name: sand
ckpt: null
shape:
type: cube
name: dataset
center:
- 0.5
- 0.5
- 0.5
size:
- 0.5
- 0.5
- 0.5
resolution: 10
mode: uniform
sort: null
vel:
random: false
lin_vel:
- 1.0
- -1.5
- -2.0
ang_vel:
- 4.0
- 4.0
- 4.0
name: sand
rho: 1000.0
span:
- 0
- 1000
clip_bound: 0.5
render:
spp: 32
width: 512
height: 512
skip_frame: 25
bound: 1.75
mpm_mul: 6
sph_version: cuda_ad_rgb
pcd_version: cuda_ad_rgb
has_sphere_emitter: true
fps: 10
sim:
quality: low
num_steps: 1000
gravity:

  • 0.0
  • -9.8
  • 0.0
    bc: freeslip
    num_grids: 20
    dt: 0.0005
    bound: 3
    eps: 1.0e-07
    skip_frame: 1
    train:
    teacher:
    strategy: cosine
    start_lambda: 25
    end_lambda: 200
    num_epochs: 300
    batch_size: 128
    elasticity_lr: 1.0
    plasticity_lr: 0.1
    elasticity_wd: 0.0
    plasticity_wd: 0.0
    elasticity_grad_max_norm: 0.1
    plasticity_grad_max_norm: 0.1
    name: sand/dataset
    seed: 0
    cpu: 0
    num_cpus: 128
    gpu: 0
    overwrite: false
    resume: false
    gt_name: null
    dataset: true

Warp 0.6.1 initialized:
CUDA not available
Devices:
"cpu" | x86_64
Kernel cache: /home/xxxx/.cache/warp/0.6.1
Error executing job with overrides: ['overwrite=False', 'resume=False', 'gpu=0', 'cpu=0', 'env=sand', 'render=debug', 'sim=low', 'name=sand/dataset', 'dataset=True']
Traceback (most recent call last):
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 137, in
main()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 457, in _run_app
run_and_report(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 458, in
lambda: hydra.run(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 132, in run
_ = ret.return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 35, in main
wp_device = wp.get_device(f'cuda:{cfg.gpu}')
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1676, in get_device
return runtime.get_device(ident)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1484, in get_device
return self.device_map[ident]
KeyError: 'cuda:0'
env:
blob:
bsdf_pcd:
type: diffuse
reflectance:
type: rgb
value:
- 0.59607843
- 0.98431373
- 0.59607843
material:
elasticity:
cls: SigmaElasticity
E: 300000.0
nu: 0.25
requires_grad: false
random: false
plasticity:
cls: VonMisesPlasticity
E: 300000.0
nu: 0.25
sigma_y: 5000.0
requires_grad: false
random: false
name: plasticine
ckpt: null
shape:
type: cube
name: dataset
center:
- 0.5
- 0.5
- 0.5
size:
- 0.5
- 0.5
- 0.5
resolution: 10
mode: uniform
sort: null
vel:
random: false
lin_vel:
- 1.0
- -1.5
- -2.0
ang_vel:
- 4.0
- 4.0
- 4.0
name: plasticine
rho: 1000.0
span:
- 0
- 1000
clip_bound: 0.5
render:
spp: 32
width: 512
height: 512
skip_frame: 25
bound: 1.75
mpm_mul: 6
sph_version: cuda_ad_rgb
pcd_version: cuda_ad_rgb
has_sphere_emitter: true
fps: 10
sim:
quality: low
num_steps: 1000
gravity:

  • 0.0
  • -9.8
  • 0.0
    bc: freeslip
    num_grids: 20
    dt: 0.0005
    bound: 3
    eps: 1.0e-07
    skip_frame: 1
    train:
    teacher:
    strategy: cosine
    start_lambda: 25
    end_lambda: 200
    num_epochs: 300
    batch_size: 128
    elasticity_lr: 1.0
    plasticity_lr: 0.1
    elasticity_wd: 0.0
    plasticity_wd: 0.0
    elasticity_grad_max_norm: 0.1
    plasticity_grad_max_norm: 0.1
    name: plasticine/dataset
    seed: 0
    cpu: 0
    num_cpus: 128
    gpu: 0
    overwrite: false
    resume: false
    gt_name: null
    dataset: true

Warp 0.6.1 initialized:
CUDA not available
Devices:
"cpu" | x86_64
Kernel cache: /home/xxxx/.cache/warp/0.6.1
Error executing job with overrides: ['overwrite=False', 'resume=False', 'gpu=0', 'cpu=0', 'env=plasticine', 'render=debug', 'sim=low', 'name=plasticine/dataset', 'dataset=True']
Traceback (most recent call last):
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 137, in
main()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 457, in _run_app
run_and_report(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 458, in
lambda: hydra.run(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 132, in run
_ = ret.return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 35, in main
wp_device = wp.get_device(f'cuda:{cfg.gpu}')
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1676, in get_device
return runtime.get_device(ident)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1484, in get_device
return self.device_map[ident]
KeyError: 'cuda:0'
env:
blob:
bsdf_pcd:
type: diffuse
reflectance:
type: rgb
value:
- 0.45490196
- 0.8
- 0.95686275
material:
elasticity:
cls: VolumeElasticity
E: 100000.0
nu: 0.3
mode: taichi
requires_grad: false
random: false
plasticity:
cls: SigmaPlasticity
requires_grad: false
random: false
name: water
ckpt: null
shape:
type: cube
name: dataset
center:
- 0.5
- 0.5
- 0.5
size:
- 0.5
- 0.5
- 0.5
resolution: 10
mode: uniform
sort: null
vel:
random: false
lin_vel:
- 1.0
- -1.5
- -2.0
ang_vel:
- 4.0
- 4.0
- 4.0
name: water
rho: 1000.0
span:
- 0
- 1000
clip_bound: 0.5
render:
spp: 32
width: 512
height: 512
skip_frame: 25
bound: 1.75
mpm_mul: 6
sph_version: cuda_ad_rgb
pcd_version: cuda_ad_rgb
has_sphere_emitter: true
fps: 10
sim:
quality: low
num_steps: 1000
gravity:

  • 0.0
  • -9.8
  • 0.0
    bc: freeslip
    num_grids: 20
    dt: 0.0005
    bound: 3
    eps: 1.0e-07
    skip_frame: 1
    train:
    teacher:
    strategy: cosine
    start_lambda: 25
    end_lambda: 200
    num_epochs: 300
    batch_size: 128
    elasticity_lr: 1.0
    plasticity_lr: 0.1
    elasticity_wd: 0.0
    plasticity_wd: 0.0
    elasticity_grad_max_norm: 0.1
    plasticity_grad_max_norm: 0.1
    name: water/dataset
    seed: 0
    cpu: 0
    num_cpus: 128
    gpu: 0
    overwrite: false
    resume: false
    gt_name: null
    dataset: true

Warp 0.6.1 initialized:
CUDA not available
Devices:
"cpu" | x86_64
Kernel cache: /home/xxxx/.cache/warp/0.6.1
Error executing job with overrides: ['overwrite=False', 'resume=False', 'gpu=0', 'cpu=0', 'env=water', 'render=debug', 'sim=low', 'name=water/dataset', 'dataset=True']
Traceback (most recent call last):
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 137, in
main()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 457, in _run_app
run_and_report(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/utils.py", line 458, in
lambda: hydra.run(
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 132, in run
_ = ret.return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "/home/xxxx/xxxx_research/NCLaw/experiments/eval.py", line 35, in main
wp_device = wp.get_device(f'cuda:{cfg.gpu}')
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1676, in get_device
return runtime.get_device(ident)
File "/home/xxxx/miniconda3/envs/nclaw/lib/python3.10/site-packages/warp/context.py", line 1484, in get_device
return self.device_map[ident]
KeyError: 'cuda:0'`
Btw, I'm sure the CUDA has been installed correctly follow your provided instruction, so could your give me some advices to tackle this issue? Maybe the warp is the trouble maker?
Looking forward to your reply!!!

@XiaogeTian
Copy link

I got the same problem. I am not sure if that's the warp context problem. It cannot recognize the cuda path.

@amannier
Copy link

same problem

@amannier
Copy link

When I upgraded the warp version to 0.15.1, this issue was resolved. At the same time, replace the tape. py file with the one mentioned by the author in another issue.

@PingchuanMa
Copy link
Owner

Sorry for the late reply. I tried but I cannot reproduce the error on my end though. Could you attach more details about your workstation? Does cuda:0 works for your torch.device or it's only broken in warp?

@leung1010
Copy link
Author

leung1010 commented Aug 28, 2024 via email

@PingchuanMa
Copy link
Owner

did you install warp from scratch or from pypi? could you also attach the output of bash command which nvcc please?

@leung1010
Copy link
Author

leung1010 commented Aug 29, 2024 via email

@PingchuanMa
Copy link
Owner

I do presume that this is a warp installation problem. Could you try to compile warp from scratch? The warp version used in this repo is attached in third_party/warp. I will also try to reproduce this on a computer with cuda 11.x to see if it's a cuda problem. Will let you know.

@leung1010
Copy link
Author

leung1010 commented Aug 30, 2024 via email

@leung1010
Copy link
Author

I do presume that this is a warp installation problem. Could you try to compile warp from scratch? The warp version used in this repo is attached in third_party/warp. I will also try to reproduce this on a computer with cuda 11.x to see if it's a cuda problem. Will let you know.

Hi pingchuan,

Sry for late reply. I didn't work these days.
Right now, I ran
pip uninstall -y warp warp-lang pip install warp-lang=0.15.1
It works well now.

Many thanks!

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

4 participants