Issue with large 3D program launch size

Hello,

I am wondering if there is a way tell if an OptiX 3D launch size is too large? I am running into an issue where
my RT_PROGRAM silently fails to execute when increasing the depth parameter (3rd dimension) of the program launch.

I am using OptiXpp with OptiX 5.1 on a K80 GPU. The error occurs when increasing the depth from 10,000 to 1,000,000. The width and height of the launch are just under 1,000.

I have all exceptions enabled and have checked the underlying RTresult of the program launch to ensure it is equal to RT_SUCCESS.

Thank you.

Why exactly do you need a single 10^12 launch size?

In any case it shouldn’t fail silently.
Do you use try-catch on host side to capture errors from the OptiX API in all other places as well?

If this is an out of memory error, it’s dependent on your program and the system when that happens.

Are you writing into individual buffer locations?
Even at one byte per launch index that would immediately fail to allocate the necessary VRAM amount.
Have you checked the amount of VRAM memory used when gradually increasing the launch size?
(nvidia-smi can log that information.)

Since this is a Tesla board, there shouldn’t be any issues with timeouts even for big launch sizes, but if this is about the memory consumption, it would be recommended to split he work into smaller launches which you can guarantee to work.

Detlef,

Thank you for your reply and suggestions.

I used nvidia-smi to monitor the memory usage while I ran my program. The memory utilization briefly spikes to 100% roughly when I attempt to use the large launch size. I am the only user of the machine and nvidia-smi shows my executable as the only process using the GPU.

Based on the memory usage spike, I first thought this could be an out of memory issue, but I tested the issue further and observed behavior that is not in line with my understanding of what an out of memory error would look like.

That is, I do not have any try-catch blocks wrapping the calls in my program and my program does not crash. Also, I added print statements to my code before and after launching the program, and it is reaching each successfully

e.g.

std::cout << "Before" << std::endl;
context->launch(programIndex, 1000, 1000, 1000000);
std::cout << "After" << std::endl;

will print out:

Before
After

But the program returns nearly instantly, which is unexpected. I am able to tell the program is not executing successfully by inspecting the contents of the rtBuffer the program modifies. The contents of the buffer are equal to their initial values. If I increase the width, height, or depth of the launch even further, the program takes the expected run-time and fills in the rtBuffer with the expected contents.