Floating point exception

I’m incorporating OptiX into my HPC code. Normally, my code runs with floating point exceptions unmasked. However, with FPEs unmasked, I’m getting a floating point divide-by-zero exception when calling optixPipelineCreate somewhere way down in nvrtum64.dll. I’m able to reproduce the exception with Ingo Wald’s OptiX 7.0 examples. For example https://gitlab.com/ingowald/optix7course/-/tree/master/example02_pipelineAndRayGen. Simply add the function call:

_controlfp((unsigned)(~( _EM_INVALID |_EM_ZERODIVIDE | _EM_OVERFLOW )), _MCW_EM );

to main() before the try block.

Some build details:
windows Version 10.0.18363 Build 18363
device Quadro M4000
MSVC 19.16.27034.0 (VS 2017)
Cuda compilation tools, release 10.1, V10.1.243
GPU driver 441.22
OptiX 7.0.0

And for what it’s worth, on linux it works OK with FPEs unmasked using GCC 8.3, CUDA 10.1.168, GPU driver 440.33.01 and OptiX 7.0.0.

Is this a known problem or should I report it through the usual channels?


Hi Allen, thank you for the report. I can reproduce this easily with your instructions. I’ll make sure it’s filed now if it hasn’t been already.


OK. Thanks for the reply.