yuanming-hu / spgrid_topo_opt

Narrow-Band Topology Optimization on a Sparsely Populated Grid, ACM Transactions on Graphics (SIGGRAPH Asia 2018)
185 stars 37 forks source link

ti vd cudaErrorMemoryAllocation #4

Open slovak194 opened 4 years ago

slovak194 commented 4 years ago

Hi, Yuanming!

I'm struggling with visualization of a simple low-resolution bridge problem. I would be so grateful for any kind of help in this direction! Here is the log:

`➜ taichi git:(legacy) ti vd ./outputs/topo_opt/bridge/task-2020-03-08-17-34-41-r06039__v8_r0064/fem/00990.tcb.zip [T 03/08/20 22:07:54.815] [logging.cpp:Logger@67] Taichi core started. Thread ID = 3862 Loading module topo_opt

          ☯ ☯ ☯ ☯ ☯ ☯ ☯ ☯              

Taichi ~~ Open Source Computer Graphics Library


          ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷              

Running task [vd]... [I 03/08/20 22:07:54.974] [volume_renderer.cpp:run@842] Mode set to 'fem' [I 03/08/20 22:07:54.974] [volume_renderer.cpp:run@882] 1 tcb files found. [I 03/08/20 22:07:54.974] [volume_renderer.cpp:load_fem@413] Loading ./outputs/topo_opt/bridge/task-2020-03-08-17-34-41-r06039__v8_r0064/fem/00990.tcb.zip [T 03/08/20 22:07:54.975] [volume_renderer.cpp:load_fem@416] File loaded. [D 03/08/20 22:07:54.975] [volume_renderer.cpp:load_fem@441] res: { vec: (0, 0, 0) } [D 03/08/20 22:07:54.975] [volume_renderer.cpp:create_volume@575] res: { vec: (8, 12, 28) } CUDA error at /home/slovak/topoopt/taichi/projects/spgrid_topo_opt/misc/volume_rendering_kernel.cu:501 code=2(cudaErrorMemoryAllocation) "cudaMemcpyToSymbol(raw_box_size, size, sizeof(raw_box_size))" ➜ taichi git:(legacy) `

yuanming-hu commented 4 years ago

Thanks for the question. How much graphics memory does your GPU have? It seems that CUDA is failing to allocate memory.

slovak194 commented 4 years ago

I use laptop with NVIDIA GeForce 940MX 2GB, CUDA_ARCH=50. But it does not look like it tries to allocate a lot. I've reduced "n" in opt_bridge.py from 1800 to 64 and it still fails.