Notice that context buffer is created before gpu assignment:
|
unsigned scale = createContext(context, use_pbo, cameraInput.cameraType, |
|
cameraInput.width, |
|
cameraInput.height, |
|
mode, |
|
cameraInput.sampleNum, |
|
maxPathLength, |
|
rrBeginLength ); |
|
|
|
if(gpuIds.size() != 0){ |
|
std::cout<<"GPU Num: "<<gpuIds.size()<<std::endl; |
|
context -> setDevices(gpuIds.begin(), gpuIds.end() ); |
|
} |
This could induce serious memory harassment when there are other jobs running on a multi-GPU server. If any one gpu memory is used up, the program will throw out of memory exception and quit, despite that there are plenty of free devices.
The gpu should be set before the createBuffer() line in createContext():
|
Buffer outputBuffer = context -> createBuffer(RT_BUFFER_OUTPUT, RT_FORMAT_FLOAT3, bWidth, bHeight); |
Notice that context buffer is created before gpu assignment:
OptixRenderer/src/optixRenderer/src/optixRenderer.cpp
Lines 514 to 525 in 84b48be
This could induce serious memory harassment when there are other jobs running on a multi-GPU server. If any one gpu memory is used up, the program will throw out of memory exception and quit, despite that there are plenty of free devices.
The gpu should be set before the createBuffer() line in createContext():
OptixRenderer/src/optixRenderer/src/creator/createContext.cpp
Line 36 in 84b48be