Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kaan_Gök
Beginner
94 Views

Crash on realistic rendering sample using openmp

Hi;
I'm currently experimenting with IPP's rendering domain support.
On the ray-tracing sample, when I try to render this ply file:

ftp://ftp.cyberware.com/pub/samples/ms/satva/satva-100.zip

Using openmp multithreading support, the sample crashes while building the parallel kd-tree. (On the KDTreeBuildAlloc line)

This is my command line for using 8 threads (Development machine is core i7 920, but it crashes on a p4 too).
-n 8 j:\ipp\malaysia-100.ply 1024 1024 j:\ipp\malaysia-100.bmp

Note that _OPENMP must be defined, and openmp support should be enabled on compiler (VS 2008 compiler), otherwise the renderer runs on a single thread. (It incorrectly displays 8 threads used message on finish).

Does anybody have an opinion about this? Is the kdtreebuildalloc function really thread safe? I should note that the sample seems to be running on smaller datasets fine.
0 Kudos
3 Replies
Chao_Y_Intel
Employee
94 Views


Hello,

It looks to be a memory overflowing error. To process huge models in multithreaded mode, it needs to assign AvailMemory parameter in kd-tree building function appropriately, and prevent memory overflowing error.

The engineer suggested setting this parameter to (Overall available memory)/(numThreads).

Thanks,
Chao

Kaan_Gök
Beginner
94 Views

Thanks for the reply. It's been over 1 year since I asked that question :) , and I got the same answer from support. (I finished the project using single threaded kd tree construction btw).

The problem here is that available memory is not a solid defined thing, it varies, and memory fragmentation and other unforeseen factors still prevent successful kdtree construction sometimes. (Even if you have the memory).
I think that the AvailMemory parameter should be ditched in future versions and the kd tree constructor code should do the necessary error checking, and returns an error code so that the application never crashes by setting an incorrect AvailMemory parameter.
Chao_Y_Intel
Employee
94 Views


Thank you for the update. I agree that availMemory parameter should be check by the sample. I will forward to the code owner.

Chao
Reply