mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.81k stars 430 forks source link

Crash in OptiXAggregate::buildBVHForTriangles when rendering transparent-machines/frame1266.pbrt #164

Closed jakoaltrd closed 3 years ago

jakoaltrd commented 3 years ago

hi, this time I set the PBRT_OPTIX7_PATH correctly in cmake, and when I build the solution, and run as follows:

pbrt --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt

then nothing happens, that means it didn't render at all! but when I run

pbrt D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt

it can slowly render a image. why can't I use --gpu option?

jakoaltrd commented 3 years ago

then I switch to ubuntu20.04, I found it can't successfully build pbrt-v4, it has the following errors:

nvcc fatal : Option '--ptx (-ptx)' is not allowed when compiling for multiple GPU architectures make[2]: [CMakeFiles/optix.cu.dir/build.make:82: CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx] Error 1 make[1]: [CMakeFiles/Makefile2:914: CMakeFiles/optix.cu.dir/all] Error 2

how to solve this?

pierremoreau commented 3 years ago

Could you please share the full nvcc command line? What you pasted only seem to contain the end of it:

--diag_suppress=virtual_function_decl_hidden -Xcudafe --diag_suppress=integer_sign_change -Xcudafe --diag_suppress=declared_but_not_referenced -Xcudafe --diag_suppress=implicit_return_from_non_void_function -std=c++17 -x cu -ptx /home/jakoaltrd/Desktop/pbrt-v4/src/pbrt/gpu/optix.cu -o CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx

Edit:

when I build the solution, and run as follows:

pbrt --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt

then nothing happens, that means it didn't render at all!

You do not even get error messages or any kind of messages from PBRT?

mmp commented 3 years ago

Regarding the build issue, this looks strange in the step for optix.cu: --generate-code=arch=compute_52,code=[compute_52,sm_52]. Have you changed anything in your copy of pbrt? I don't see anything in the build process that adds a --generate-code statement to the nvcc command-line and I don't see that being used when I build it myself.

(@pierremoreau: strangely, the entire command line came through in github's email with the bug update but it doesn't seem to be here on the website... sigh.)

@jakoaltrd try running pbrt using --log-level verbose with --gpu and it will print more about what it is doing and it may be easier to see why you're not getting any output.

jakoaltrd commented 3 years ago

_D:\pbrt-v4\build\Release>pbrt --log-level verbose --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt pbrt version 4 (built Aug 10 2021 at 22:31:48) Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but not the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. [ tid 4740 @ 0.000s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 2 [ tid 6072 @ 0.000s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 11 [ tid 6072 @ 0.001s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8340 @ 0.000s d:\pbrt-v4\src\pbrt\gpu\util.cpp:41 ] GPU CUDA driver 11.4, CUDA runtime 11.4 [ tid 3324 @ 0.001s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 4 [ tid 3324 @ 0.001s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2988 @ 0.001s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 7 [ tid 1996 @ 0.001s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 3 [ tid 1996 @ 0.002s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 4740 @ 0.000s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2988 @ 0.001s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 10208 @ 0.001s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 10 [ tid 13780 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 5 [ tid 13780 @ 0.002s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 14240 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 6 [ tid 14240 @ 0.002s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8340 @ 0.001s d:\pbrt-v4\src\pbrt\gpu\util.cpp:64 ] CUDA device 0 (NVIDIA GeForce RTX 3070 Laptop GPU) with 8192 MiB, 40 SMs running at 1560 MHz with shader model 8.6 [ tid 3240 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 14 [ tid 3240 @ 0.002s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 12636 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 8 [ tid 12636 @ 0.003s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2276 @ 0.003s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 13 [ tid 2276 @ 0.003s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8340 @ 0.002s d:\pbrt-v4\src\pbrt\gpu\util.cpp:80 ] Selecting GPU device 0 [ tid 10208 @ 0.002s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 6952 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 15 [ tid 6952 @ 0.004s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 6528 @ 0.001s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 9 [ tid 6528 @ 0.004s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 14316 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 12 [ tid 14316 @ 0.005s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 9528 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 1 [ tid 9528 @ 0.005s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8340 @ 0.005s d:\pbrt-v4\src\pbrt\gpu\util.cpp:96 ] Reset stack size to 8192 [ tid 8340 @ 0.560s D:\pbrt-v4\src\pbrt\parser.cpp:598 ] Started parsing D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 8340 @ 0.561s d:\pbrt-v4\src\pbrt\cameras.cpp:50 ] World-space position: [ 103.74101, 269.57877, -207.24113 ] [ tid 8340 @ 0.574s D:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 8340 @ 0.575s D:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 8340 @ 0.575s D:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 8340 @ 0.585s film.h:196 ] Created film with full resolution [ 1920, 840 ], pixelBounds [ [ 0, 0 ] - [ 1920, 840 ] ] [ tid 2988 @ 1.337s D:\pbrt-v4\src\pbrt\util\image.cpp:1106 ] Read EXR image D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\textures\sky.exr (2048 x 2048) [ tid 8340 @ 2.014s d:\pbrt-v4\src\pbrt\cameras.cpp:197 ] Camera min pos differentials: [ 0, 0, 0 ], [ 0, 0, 0 ] [ tid 8340 @ 2.014s d:\pbrt-v4\src\pbrt\cameras.cpp:199 ] Camera min dir differentials: [ 0.00015701354, -0.000039756298, 0 ], [ -0.000014401972, -0.0001629889, 0 ] [ tid 8340 @ 2.015s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:146 ] Starting to create textures [ tid 8340 @ 2.016s D:\pbrt-v4\src\pbrt\scene.cpp:1123 ] Starting to consume texture futures [ tid 8340 @ 2.016s D:\pbrt-v4\src\pbrt\scene.cpp:1128 ] Finished consuming texture futures [ tid 8340 @ 2.016s D:\pbrt-v4\src\pbrt\scene.cpp:1130 ] Starting to create remaining textures [ tid 8340 @ 2.016s D:\pbrt-v4\src\pbrt\scene.cpp:1187 ] Done creating textures [ tid 8340 @ 2.016s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:148 ] Done creating textures [ tid 8340 @ 2.016s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:150 ] Starting to create lights [ tid 8340 @ 2.016s D:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 8340 @ 2.017s D:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 8340 @ 2.017s D:\pbrt-v4\src\pbrt\scene.cpp:1244 ] Starting non-future lights [ tid 8340 @ 2.017s D:\pbrt-v4\src\pbrt\scene.cpp:1309 ] Finished non-future lights [ tid 8340 @ 2.017s D:\pbrt-v4\src\pbrt\scene.cpp:1311 ] Starting to consume non-area light futures [ tid 8340 @ 2.765s D:\pbrt-v4\src\pbrt\scene.cpp:1314 ] Finished consuming non-area light futures [ tid 8340 @ 2.765s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:163 ] Done creating lights [ tid 8340 @ 2.766s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:165 ] Starting to create materials [ tid 8340 @ 2.769s D:\pbrt-v4\src\pbrt\scene.cpp:1066 ] Starting to consume normal map futures [ tid 8340 @ 2.769s D:\pbrt-v4\src\pbrt\scene.cpp:1072 ] Finished consuming normal map futures [ tid 8340 @ 2.779s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:179 ] Finished creating materials [ tid 8340 @ 2.782s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1151 ] Starting OptiX initialization [ tid 8340 @ 3.344s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1166 ] Optix version 7.3.0 successfully initialized [ tid 8340 @ 15.613s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1051 ] Info: Pipeline parameter "params" size is 480 bytes Info: Module uses 3 payload values.Info: Module uses 4 attribute values. Pipeline configuration: 4. Info: Entry function "raygenfindClosest" with semantic type RAYGEN has 1 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 9 basic block(s), 542 instruction(s) Info: Entry function "missnoop" with semantic type MISS has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 1 basic block(s), 2 instruction(s) Info: Entry function "closesthittriangle" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 415 basic block(s), 9026 instruction(s) Info: Entry function "anyhittriangle" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 224 basic block(s), 3156 instruction(s) Info: Entry function "anyhitshadowTriangle" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 224 basic block(s), 3156 instruction(s) Info: Entry function "raygenshadow" with semantic type RAYGEN has 1 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 6 basic block(s), 153 instruction(s) Info: Entry function "missshadow" with semantic type MISS has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 1 basic block(s), 2 instruction(s) Info: Entry function "raygenshadow_Tr" with semantic type RAYGEN has 1 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 997 basic block(s), 14467 instruction(s) Info: Entry function "missshadow_Tr" with semantic type MISS has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 1 basic block(s), 2 instruction(s) Info: Entry function "closesthitquadric" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 595 basic block(s), 13013 instruction(s) Info: Entry function "anyhitshadowQuadric" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 1 basic block(s), 1 instruction(s) Info: Entry function "intersectionquadric" with semantic type INTERSECTION has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 1129 basic block(s), 23395 instruction(s) Info: Entry function "closesthitbilinearPatch" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 401 basic block(s), 8735 instruction(s) Info: Entry function "anyhitshadowBilinearPatch" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 1 basic block(s), 1 instruction(s) Info: Entry function "intersectionbilinearPatch" with semantic type INTERSECTION has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 141 basic block(s), 2035 instruction(s) Info: Entry function "raygenrandomHit" with semantic type RAYGEN has 2 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 36 basic block(s), 618 instruction(s) Info: Entry function "closesthitrandomHitTriangle" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 140 basic block(s), 3140 instruction(s) Info: Entry function "closesthitrandomHitBilinearPatch" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 39 basic block(s), 975 instruction(s) Info: Entry function "closesthitrandomHitQuadric" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 298 basic block(s), 9518 instruction(s) Info: 0 non-entry function(s) have 0 basic block(s), 0 instruction(s)

[ tid 8340 @ 15.773s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1238 ] Info: Pipeline has 1 module(s), 19 entry function(s), 5 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 4659 basic block(s) in entry functions, 91937 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions

[ tid 8340 @ 15.775s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1294 ] Finished OptiX initialization [ tid 8340 @ 15.775s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1306 ] Starting to create shapes and acceleration structures [ tid 8340 @ 15.775s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1314 ] Starting to read PLY meshes [ tid 8340 @ 16.266s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1317 ] Finished reading PLY meshes [ tid 8340 @ 16.266s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 3 instance definitions_

this is the output when using log-level , also it didn't render anything, why?

jakoaltrd commented 3 years ago

Regarding the build issue, this looks strange in the step for optix.cu: --generate-code=arch=compute_52,code=[compute_52,sm_52]. Have you changed anything in your copy of pbrt? I don't see anything in the build process that adds a --generate-code statement to the nvcc command-line and I don't see that being used when I build it myself.

I didn't change anything, but all following the building.md instructions, if this statement is illegal, can I ban that?

shadeops commented 3 years ago

As a general FYI, the comments were edited but you can see the previous versions of the comments by clicking the little down arrow next to the "edited" note at the top of the GitHub comment. (Which is why they showed up in the email but not currently.)

The full nvcc command line was

/usr/local/cuda/bin/nvcc -forward-unknown-to-host-compiler -DPBRT_BUILD_GPU_RENDERER -DPBRT_HAVE_MMAP -DPBRT_HAVE_POSIX_MEMALIGN -DPBRT_IS_LINUX -DPBRT_NOINLINE="attribute((noinline))" -DPBRT_RESTRICT=restrict -I/usr/local/cuda/targets/x86_64-linux/include -I/home/jakoaltrd/Downloads/NVIDIA-OptiX-SDK-7.3.0-linux64-x86_64/include -I/home/jakoaltrd/Desktop/pbrt-v4/src -I/home/jakoaltrd/Desktop/pbrt-v4/build -isystem=/home/jakoaltrd/Desktop/pbrt-v4/src/ext/openvdb/nanovdb -Xnvlink -suppress-stack-size-warning --gpu-architecture=sm_86 -O3 -DNDEBUG --generate-code=arch=compute_52,code=[compute_52,sm_52] -Xcudafe=--display_error_number -Xcudafe=--diag_suppress=20044 --std=c++17 --use_fast_math --expt-relaxed-constexpr --extended-lambda --forward-unknown-to-host-compiler -lineinfo -maxrregcount 128 -Xcudafe --diag_suppress=partial_override -Xcudafe --diag_suppress=virtual_function_decl_hidden -Xcudafe --diag_suppress=integer_sign_change -Xcudafe --diag_suppress=declared_but_not_referenced -Xcudafe --diag_suppress=implicit_return_from_non_void_function -std=c++17 -x cu -ptx /home/jakoaltrd/Desktop/pbrt-v4/src/pbrt/gpu/optix.cu -o CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx
jakoaltrd commented 3 years ago

(@pierremoreau: strangely, the entire command line came through in github's email with the bug update but it doesn't seem to be here on the website... sigh.)

yes, I had edit it, but it can still be viewed,and again I compiled the whole project in ubuntu20.04, and it yields:

jakoaltrd@jakoaltrd-ZERO:~/Desktop/pbrt-v4/build$ make
-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- OpenEXR at commit: 5cfb5dab6dfada731586b0281bdb15ee75e26782
-- Ptex at commit: 4cd8e9a6db2b06e478dfbbd8c26eb6df97f84483
-- double-conversion at commit: cc1f75a114aca8d2af69f73a5a959aecbab0e87a
-- filesystem at commit: f45da753728cde9b1c380b343e41c8b1ca6498d7
-- stb at commit: b42009b3b9d4ca35bc703f5310eedc74f584be58
-- OpenVDB at commit: 1c306bcaf7e9f7d52525bab716202bd4f7fff5d1
-- zlib at commit: 54d591eabf9fe0e84c725638f8d5d8d202a093fa
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
-- Could NOT find Imath (missing: Imath_DIR)
-- Could NOT find OpenEXR: Found unsuitable version "1.6.1", but required is at least "2.3" (found ILMBASE_INCLUDE_PATH-NOTFOUND)
-- OpenEXR not found; building it from scratch.
-- Configure ILMBASE Version: 2.5.3 Lib API: 25.0.2
-- Configure OpenEXR Version: 2.5.3 Lib API: 25.0.2
-- clang-format not found.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Unable to find -lprofiler
-- Found CUDA: 11.4.100
-- The CUDA compiler identification is NVIDIA 11.4.100
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Specified CUDA Architecture: sm_86
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jakoaltrd/Desktop/pbrt-v4/build
Scanning dependencies of target rgb2spec_opt
[  0%] Building CXX object CMakeFiles/rgb2spec_opt.dir/src/pbrt/cmd/rgb2spec_opt.cpp.o
[  0%] Linking CXX executable rgb2spec_opt
[  0%] Built target rgb2spec_opt
Scanning dependencies of target soac
[  0%] Building CXX object CMakeFiles/soac.dir/src/pbrt/cmd/soac.cpp.o
[  0%] Linking CXX executable soac
[  0%] Built target soac
Scanning dependencies of target pbrt_soa_generated
[  0%] Generating pbrt_soa.h
[  1%] Generating wavefront_workitems_soa.h
[  1%] Built target pbrt_soa_generated
Scanning dependencies of target optix.cu
[  2%] Building CUDA object CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx
nvcc fatal   : Option '--ptx (-ptx)' is not allowed when compiling for multiple GPU architectures
make[2]: *** [CMakeFiles/optix.cu.dir/build.make:82: CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx] Error 1
make[1]: *** [CMakeFiles/Makefile2:914: CMakeFiles/optix.cu.dir/all] Error 2
make: *** [Makefile:160: all] Error 2
Driver Version: 470.57.02    CUDA Version: 11.4  Optix7.3
jakoaltrd@jakoaltrd-ZERO:~/Desktop/pbrt-v4/build$ nvidia-smi
Fri Aug 13 11:57:57 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.57.02    Driver Version: 470.57.02    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   35C    P8     8W /  N/A |      0MiB /  7982MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
shadeops commented 3 years ago

I'm a little surprised there are no running processes reported under nvidia-smi. I would have expected to see at least Xorg

hu Aug 12 22:35:49 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.57.02    Driver Version: 470.57.02    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:0B:00.0  On |                  N/A |
| 33%   55C    P2   191W / 320W |   9823MiB /  9995MiB |     98%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1174      G   /usr/lib/xorg/Xorg               1552MiB |
|    0   N/A  N/A      1443      G   /usr/bin/kwin_x11                 666MiB |
|    0   N/A  N/A      1458      G   /usr/bin/plasmashell               38MiB |
|    0   N/A  N/A   1106073      G   /usr/bin/plasma-discover            4MiB |
|    0   N/A  N/A   3560528    C+G   /opt/hfs18.5/bin/houdini-bin      286MiB |

Are you on a laptop? And if so, is it an optimus setup?

jakoaltrd commented 3 years ago

it is on a laptop , I don't know why, maybe the driver is not working?

jakoaltrd commented 3 years ago

I am really hoping that someone can help me solve this issue, it bothered me for many days

Regarding the build issue, this looks strange in the step for optix.cu: --generate-code=arch=compute_52,code=[compute_52,sm_52]. Have you changed anything in your copy of pbrt? I don't see anything in the build process that adds a --generate-code statement to the nvcc command-line and I don't see that being used when I build it myself.

(@pierremoreau: strangely, the entire command line came through in github's email with the bug update but it doesn't seem to be here on the website... sigh.)

@jakoaltrd try running pbrt using --log-level verbose with --gpu and it will print more about what it is doing and it may be easier to see why you're not getting any output.

shadeops commented 3 years ago

I'm not sure what the issue is, but as an experiment you could try to disable the integrated graphics in the BIOS and boot into Linux with only the Nvidia GPU available. That way from the OS's perspective there is only one GPU, and you should see your processes show up under nvidia-smi.

I don't know if this will address the issue or not. (Or if it is even related.) But testing it could eliminate that as a potential difference between working systems.

pierremoreau commented 3 years ago

As a general FYI, the comments were edited but you can see the previous versions of the comments by clicking the little down arrow next to the "edited" note at the top of the GitHub comment. (Which is why they showed up in the email but not currently.)

Thanks; I had missed the edit!

@jakoaltrd Did you specify a CMAKE_CUDA_ARCHITECTURE (or CUDAARCHS environment variable) when configuring CMake or afterwards? It is weird that it is trying to compile for SM 5.2 on top of the SM 8.6 it detected. Could you please run cmake -LA ${path_to_build_directory} and paste the output here, to check all set variables?

[ tid 8340 @ 16.266s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 3 instance definitions_

this is the output when using log-level , also it didn't render anything, why?

If the last message is indeed “Starting to create IASes for 3 instance definitions_”, then it mostly likely crashes afterwards which would explain not getting any result. If everything worked out, it should have printed the following message afterwards, among others: “Finished creating IASes for instance definitions”. Try running the program with gdb --args pbrt --log-level verbose --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt, or even with cuda-gdb rather than gdb in case it’s something going wrong in the GPU code.

jakoaltrd commented 3 years ago

D:\downloads\cmake-3.17.1-win64-x64\bin>cmake -LA D:\pbrt-v4\build _-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042. -- OpenEXR at commit: 5cfb5dab6dfada731586b0281bdb15ee75e26782 -- OpenVDB at commit: 1c306bcaf7e9f7d52525bab716202bd4f7fff5d1 -- Ptex at commit: 4cd8e9a6db2b06e478dfbbd8c26eb6df97f84483 -- double-conversion at commit: cc1f75a114aca8d2af69f73a5a959aecbab0e87a -- filesystem at commit: f45da753728cde9b1c380b343e41c8b1ca6498d7 -- libdeflate at commit: 1fd0bea6ca2073c68493632dafc4b1ddda1bcbc3 -- stb at commit: b42009b3b9d4ca35bc703f5310eedc74f584be58 -- zlib at commit: 54d591eabf9fe0e84c725638f8d5d8d202a093fa -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -- Could NOT find Imath (missing: Imath_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find OpenEXR: Found unsuitable version "1.6.1", but required is at least "2.3" (found ILMBASE_INCLUDE_PATH-NOTFOUND) -- OpenEXR not found; building it from scratch. -- Configure ILMBASE Version: 2.5.3 Lib API: 25.0.2 -- WARNING pkg-config generation disabled -- Configure OpenEXR Version: 2.5.3 Lib API: 25.0.2 -- clang-format not found. -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Unable to find -lprofiler -- Found CUDA: 11.4.100 -- Specified CUDA Architecture: sm_86 -- Configuring done -- Generating done -- Build files have been written to: D:/pbrt-v4/build -- Cache values BIN2C:FILEPATH=D:/ProgramData/NVIDIA Corporation/bin/bin2c.exe BUILD_SHARED_LIBS:BOOL=OFF BUILD_TESTING:BOOL=ON BZRCOMMAND:FILEPATH=BZRCOMMAND-NOTFOUND CLANG_FORMAT_EXCLUDES:STRING= CLANG_FORMAT_EXE:FILEPATH=CLANG_FORMAT_EXE-NOTFOUND CLANG_FORMAT_INCLUDES:STRING=.h;.cpp CLANG_FORMAT_ROOT:PATH= CMAKE_ASM_COMPILER:FILEPATH=D:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe CMAKE_ASM_FLAGS:STRING= CMAKE_ASM_FLAGS_DEBUG:STRING= CMAKE_ASM_FLAGS_MINSIZEREL:STRING= CMAKE_ASM_FLAGS_RELEASE:STRING= CMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING= CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4 CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo CMAKE_CUDA_COMPILER:FILEPATH=D:/ProgramData/NVIDIA Corporation/bin/nvcc.exe CMAKE_CUDA_FLAGS:STRING=-D_WINDOWS -Xcompiler="/W3 /GR /EHsc" CMAKE_CUDA_FLAGS_DEBUG:STRING=-Xcompiler="-MDd -Zi -Ob0 -Od /RTC1" CMAKE_CUDA_FLAGS_MINSIZEREL:STRING=-Xcompiler="-MD -O1 -Ob1" -DNDEBUG CMAKE_CUDA_FLAGS_RELEASE:STRING=-Xcompiler="-MD -O2 -Ob2" -DNDEBUG CMAKE_CUDA_FLAGS_RELWITHDEBINFO:STRING=-Xcompiler="-MD -Zi -O2 -Ob1" -DNDEBUG CMAKE_CUDA_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1 CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1 CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib CMAKE_DEBUG_POSTFIX:STRING=_d CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64 CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL CMAKE_INSTALL_BINDIR:PATH=bin CMAKE_INSTALL_DATADIR:PATH= CMAKE_INSTALL_DATAROOTDIR:PATH=share CMAKE_INSTALL_DOCDIR:PATH= CMAKE_INSTALL_INCLUDEDIR:PATH=include CMAKE_INSTALL_INFODIR:PATH= CMAKE_INSTALL_LIBDIR:PATH=lib CMAKE_INSTALL_LIBEXECDIR:PATH=libexec CMAKE_INSTALL_LOCALEDIR:PATH= CMAKE_INSTALL_LOCALSTATEDIR:PATH=var CMAKE_INSTALL_MANDIR:PATH= CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/PBRT-V4 CMAKE_INSTALL_RUNSTATEDIR:PATH= CMAKE_INSTALL_SBINDIR:PATH=sbin CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com CMAKE_INSTALL_SYSCONFDIR:PATH=etc CMAKE_LINKER:FILEPATH=D:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/link.exe CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64 CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL CMAKE_MT:FILEPATH=CMAKE_MT-NOTFOUND CMAKE_RC_COMPILER:FILEPATH=rc CMAKE_RC_FLAGS:STRING=-DWIN32 CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG CMAKE_RC_FLAGS_MINSIZEREL:STRING= CMAKE_RC_FLAGS_RELEASE:STRING= CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING= CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64 CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF CMAKE_SKIP_RPATH:BOOL=OFF CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64 CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= CMAKE_VERBOSE_MAKEFILE:BOOL=OFF COVERAGE_COMMAND:FILEPATH=C:/MinGW/bin/gcov.exe COVERAGE_EXTRA_FLAGS:STRING=-l CTEST_SUBMIT_RETRY_COUNT:STRING=3 CTEST_SUBMIT_RETRY_DELAY:STRING=5 CUDA_64_BIT_DEVICE_CODE:BOOL=ON CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=ON CUDA_BUILD_CUBIN:BOOL=OFF CUDA_BUILD_EMULATION:BOOL=OFF CUDA_CUDART_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cudart.lib CUDA_CUDA_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cuda.lib CUDA_GENERATED_OUTPUT_DIR:PATH= CUDA_HOST_COMPILATION_CPP:BOOL=ON CUDA_HOST_COMPILER:FILEPATH=$(VCInstallDir)Tools/MSVC/$(VCToolsVersion)/bin/Host$(Platform)/$(PlatformTarget) CUDA_NVCC_EXECUTABLE:FILEPATH=D:/ProgramData/NVIDIA Corporation/bin/nvcc.exe CUDA_NVCC_FLAGS:STRING= CUDA_NVCC_FLAGS_DEBUG:STRING= CUDA_NVCC_FLAGS_MINSIZEREL:STRING= CUDA_NVCC_FLAGS_RELEASE:STRING= CUDA_NVCC_FLAGS_RELWITHDEBINFO:STRING= CUDA_OpenCL_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/OpenCL.lib CUDA_PROPAGATE_HOST_FLAGS:BOOL=ON CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_SEPARABLE_COMPILATION:BOOL=OFF CUDA_TOOLKIT_INCLUDE:PATH=D:/ProgramData/NVIDIA Corporation/include CUDA_TOOLKIT_ROOT_DIR:PATH=D:/ProgramData/NVIDIA Corporation CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=ON CUDA_VERBOSE_BUILD:BOOL=OFF CUDA_VERSION:STRING=11.4 CUDA_cublas_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cublas.lib CUDA_cudadevrt_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cudadevrt.lib CUDA_cudart_static_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cudart_static.lib CUDA_cufft_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cufft.lib CUDA_cupti_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/extras/CUPTI/lib64/cupti.lib CUDA_curand_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/curand.lib CUDA_cusolver_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cusolver.lib CUDA_cusparse_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/cusparse.lib CUDA_nppc_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppc.lib CUDA_nppial_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppial.lib CUDA_nppicc_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppicc.lib CUDA_nppicom_LIBRARY:FILEPATH=CUDA_nppicom_LIBRARY-NOTFOUND CUDA_nppidei_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppidei.lib CUDA_nppif_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppif.lib CUDA_nppig_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppig.lib CUDA_nppim_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppim.lib CUDA_nppist_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppist.lib CUDA_nppisu_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppisu.lib CUDA_nppitc_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/nppitc.lib CUDA_npps_LIBRARY:FILEPATH=D:/ProgramData/NVIDIA Corporation/lib/x64/npps.lib CUDA_nvToolsExt_LIBRARY:FILEPATH=CUDA_nvToolsExt_LIBRARY-NOTFOUND CUDA_nvcuvenc_LIBRARY:FILEPATH=CUDA_nvcuvenc_LIBRARY-NOTFOUND CUDA_nvcuvid_LIBRARY:FILEPATH=CUDA_nvcuvid_LIBRARY-NOTFOUND CVSCOMMAND:FILEPATH=CVSCOMMAND-NOTFOUND CVS_UPDATE_OPTIONS:STRING=-d -A -P DART_TESTING_TIMEOUT:STRING=1500 DEFLATE_BUILD_TEST_PROGRAMS:BOOL=OFF DEFLATE_DECOMPRESSION_ONLY:BOOL=OFF DEFLATE_DISABLE_GZIP:BOOL=OFF DEFLATE_DISABLE_ZLIB:BOOL=OFF DEFLATE_FREESTANDING:BOOL=OFF DEFLATE_TEST_SUPPORT__DO_NOT_USE:BOOL=OFF DOXYGEN_DOT_EXECUTABLE:FILEPATH=DOXYGEN_DOT_EXECUTABLE-NOTFOUND DOXYGEN_EXECUTABLE:FILEPATH=DOXYGEN_EXECUTABLE-NOTFOUND EXECUTABLE_OUTPUT_PATH:PATH= GITCOMMAND:FILEPATH=D:/Git/cmd/git.exe GIT_EXECUTABLE:FILEPATH=D:/Git/cmd/git.exe HGCOMMAND:FILEPATH=HGCOMMAND-NOTFOUND ILMBASE_BUILD_BOTH_STATIC_SHARED:BOOL=OFF ILMBASE_BUILD_SHARED_LIBS:BOOL=OFF ILMBASE_ENABLE_LARGE_STACK:BOOL=OFF ILMBASE_IEX_NAMESPACE:STRING=Iex ILMBASE_ILMTHREAD_NAMESPACE:STRING=IlmThread ILMBASE_IMATH_NAMESPACE:STRING=Imath ILMBASE_INCLUDE_PATH:PATH=ILMBASE_INCLUDE_PATH-NOTFOUND ILMBASE_INSTALL_PKG_CONFIG:BOOL=OFF ILMBASE_INTERNAL_IEX_NAMESPACE:STRING=Iex_2_5 ILMBASE_INTERNAL_ILMTHREAD_NAMESPACE:STRING=IlmThread_2_5 ILMBASE_INTERNAL_IMATH_NAMESPACE:STRING=Imath_2_5 ILMBASE_LIB_SUFFIX:STRING=-2_5 ILMBASE_NAMESPACE_CUSTOM:STRING=0 ILMBASE_NAMESPACE_VERSIONING:BOOL=OFF ILMBASE_OUTPUT_SUBDIR:STRING=OpenEXR ILMBASE_PACKAGE_NAME:STRING=IlmBase 2.5.3 ILMBASE_STATIC_LIB_SUFFIX:STRING=_static INSTALL_BIN_DIR:PATH=C:/Program Files (x86)/PBRT-V4/bin INSTALL_INC_DIR:PATH=C:/Program Files (x86)/PBRT-V4/include INSTALL_LIB_DIR:PATH=C:/Program Files (x86)/PBRT-V4/lib INSTALL_MAN_DIR:PATH=C:/Program Files (x86)/PBRT-V4/share/man INSTALL_OPENEXR_DOCS:BOOL=ON INSTALL_OPENEXR_EXAMPLES:BOOL=ON INSTALL_PKGCONFIG_DIR:PATH=C:/Program Files (x86)/PBRT-V4/share/pkgconfig IlmBase_DIR:PATH=D:/pbrt-v4/build/src/ext/openexr/IlmBase/config Imath_DIR:PATH=Imath_DIR-NOTFOUND LIBRARY_OUTPUT_PATH:PATH= MAKECOMMAND:STRING=D:\downloads\cmake-3.17.1-win64-x64\bin\cmake.exe --build . --config "${CTEST_CONFIGURATION_TYPE}" MEMORYCHECK_COMMAND:FILEPATH=MEMORYCHECK_COMMAND-NOTFOUND MEMORYCHECK_SUPPRESSIONS_FILE:FILEPATH= OPENEXR_BUILD_BOTH_STATIC_SHARED:BOOL=OFF OPENEXR_BUILD_SHARED_LIBS:BOOL=OFF OPENEXR_BUILD_UTILS:BOOL=OFF OPENEXR_CXX_STANDARD:STRING=17 OPENEXR_HALF_LIBRARY:FILEPATH=OPENEXR_HALF_LIBRARY-NOTFOUND OPENEXR_IEX_LIBRARY:FILEPATH=OPENEXR_IEX_LIBRARY-NOTFOUND OPENEXR_ILMIMF_LIBRARY:FILEPATH=OPENEXR_ILMIMF_LIBRARY-NOTFOUND OPENEXR_ILMTHREAD_LIBRARY:FILEPATH=OPENEXR_ILMTHREAD_LIBRARY-NOTFOUND OPENEXR_IMATH_LIBRARY:FILEPATH=OPENEXR_IMATH_LIBRARY-NOTFOUND OPENEXR_IMF_NAMESPACE:STRING=Imf OPENEXR_INCLUDE_PATH:PATH=OPENEXR_INCLUDE_PATH-NOTFOUND OPENEXR_INSTALL_PKG_CONFIG:BOOL=OFF OPENEXR_INTERNAL_IMF_NAMESPACE:STRING=Imf_2_5 OPENEXR_LIB_SUFFIX:STRING=-2_5 OPENEXR_NAMESPACE_CUSTOM:STRING=0 OPENEXR_NAMESPACE_VERSIONING:BOOL=OFF OPENEXR_OUTPUT_SUBDIR:STRING=OpenEXR OPENEXR_PACKAGE_NAME:STRING=OpenEXR 2.5.3 OPENEXR_RUN_FUZZ_TESTS:BOOL=OFF OPENEXR_STATIC_LIB_SUFFIX:STRING=_static OPENEXR_USE_CLANG_TIDY:BOOL=OFF OpenEXR_DIR:PATH=D:/pbrt-v4/build/src/ext/openexr/OpenEXR/config P4COMMAND:FILEPATH=P4COMMAND-NOTFOUND PBRT_BUILD_NATIVE_EXECUTABLE:BOOL=ON PBRT_FLOAT_AS_DOUBLE:BOOL=OFF PBRT_GPU_SHADER_MODEL:STRING=sm_86 PBRT_NVML:BOOL=OFF PBRT_NVTX:BOOL=OFF PBRT_OPTIX7_PATH:PATH=D:/ProgramData/NVIDIA Corporation/OptiX SDK 7.3.0 PBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES:BOOL=OFF PKG_CONFIG_EXECUTABLE:FILEPATH=PKG_CONFIG_EXECUTABLE-NOTFOUND PROFILE_LIB:FILEPATH=PROFILE_LIB-NOTFOUND PTEX_BUILD_SHARED_LIBS:BOOL=OFF PTEX_BUILD_STATIC_LIBS:BOOL=ON PYILMBASE_ENABLE:BOOL=OFF SANITIZE_ADDRESS:BOOL=OFF SANITIZE_LINK_STATIC:BOOL=OFF SANITIZE_MEMORY:BOOL=OFF SANITIZE_THREAD:BOOL=OFF SANITIZE_UNDEFINED:BOOL=OFF SITE:STRING=THUNDEROBOT SLURM_SBATCH_COMMAND:FILEPATH=SLURM_SBATCH_COMMAND-NOTFOUND SLURM_SRUN_COMMAND:FILEPATH=SLURM_SRUN_COMMAND-NOTFOUND SVNCOMMAND:FILEPATH=SVNCOMMAND-NOTFOUND ZLIB_BUILD_AMD64:BOOL=OFF ZLIB_BUILD_ASM686:BOOL=OFF ZLIB_BUILD_EXAMPLES:BOOL=OFF ZLIB_BUILD_SHARED_LIBS:BOOL=OFF ZLIB_BUILD_STATIC_LIBS:BOOL=ON ZLIB_INCLUDE_DIR:PATH=ZLIB_INCLUDE_DIR-NOTFOUND ZLIB_LIBRARY_DEBUG:FILEPATH=ZLIB_LIBRARY_DEBUG-NOTFOUND ZLIB_LIBRARY_RELEASE:FILEPATH=ZLIB_LIBRARYRELEASE-NOTFOUND

gdb --args pbrt --log-level verbose --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt is not usable?

jakoaltrd commented 3 years ago

when I run pbrt --log-level verbose --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt it is like this, nothing happens as well! _D:\pbrt-v4\build\Release>pbrt --log-level verbose --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt pbrt version 4 (built Aug 10 2021 at 22:31:48) Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but not the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. [ tid 11980 @ 0.000s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 1 [ tid 11980 @ 0.000s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 5580 @ 0.001s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 3 [ tid 5580 @ 0.002s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 6396 @ 0.000s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 2 [ tid 6396 @ 0.005s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 10616 @ 0.005s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 7 [ tid 10616 @ 0.005s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 3272 @ 0.005s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 6 [ tid 3272 @ 0.005s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2664 @ 0.006s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 11 [ tid 2664 @ 0.006s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 1644 @ 0.006s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 13 [ tid 1644 @ 0.006s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 1540 @ 0.005s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 9 [ tid 1540 @ 0.006s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8204 @ 0.000s d:\pbrt-v4\src\pbrt\gpu\util.cpp:41 ] GPU CUDA driver 11.4, CUDA runtime 11.4 [ tid 1544 @ 0.005s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 8 [ tid 1544 @ 0.007s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2968 @ 0.004s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 4 [ tid 2968 @ 0.007s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 5184 @ 0.005s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 12 [ tid 5184 @ 0.008s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 1092 @ 0.002s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 5 [ tid 1092 @ 0.008s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8204 @ 0.007s d:\pbrt-v4\src\pbrt\gpu\util.cpp:64 ] CUDA device 0 (NVIDIA GeForce RTX 3070 Laptop GPU) with 8192 MiB, 40 SMs running at 1560 MHz with shader model 8.6 [ tid 8204 @ 0.008s d:\pbrt-v4\src\pbrt\gpu\util.cpp:80 ] Selecting GPU device 0 [ tid 2736 @ 0.006s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 15 [ tid 2736 @ 0.009s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 10164 @ 0.006s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 14 [ tid 10164 @ 0.009s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 3040 @ 0.006s D:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 10 [ tid 3040 @ 0.010s d:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8204 @ 0.010s d:\pbrt-v4\src\pbrt\gpu\util.cpp:96 ] Reset stack size to 8192 [ tid 8204 @ 0.672s D:\pbrt-v4\src\pbrt\parser.cpp:598 ] Started parsing D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 8204 @ 0.672s d:\pbrt-v4\src\pbrt\cameras.cpp:50 ] World-space position: [ 103.74101, 269.57877, -207.24113 ] [ tid 8204 @ 0.685s D:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 8204 @ 0.686s D:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 8204 @ 0.686s D:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 8204 @ 0.696s film.h:196 ] Created film with full resolution [ 1920, 840 ], pixelBounds [ [ 0, 0 ] - [ 1920, 840 ] ] [ tid 2664 @ 1.323s D:\pbrt-v4\src\pbrt\util\image.cpp:1106 ] Read EXR image D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\textures\sky.exr (2048 x 2048) [ tid 8204 @ 2.206s d:\pbrt-v4\src\pbrt\cameras.cpp:197 ] Camera min pos differentials: [ 0, 0, 0 ], [ 0, 0, 0 ] [ tid 8204 @ 2.207s d:\pbrt-v4\src\pbrt\cameras.cpp:199 ] Camera min dir differentials: [ 0.00015701354, -0.000039756298, 0 ], [ -0.000014401972, -0.0001629889, 0 ] [ tid 8204 @ 2.207s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:146 ] Starting to create textures [ tid 8204 @ 2.210s D:\pbrt-v4\src\pbrt\scene.cpp:1123 ] Starting to consume texture futures [ tid 8204 @ 2.210s D:\pbrt-v4\src\pbrt\scene.cpp:1128 ] Finished consuming texture futures [ tid 8204 @ 2.211s D:\pbrt-v4\src\pbrt\scene.cpp:1130 ] Starting to create remaining textures [ tid 8204 @ 2.211s D:\pbrt-v4\src\pbrt\scene.cpp:1187 ] Done creating textures [ tid 8204 @ 2.211s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:148 ] Done creating textures [ tid 8204 @ 2.211s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:150 ] Starting to create lights [ tid 8204 @ 2.212s D:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 8204 @ 2.212s D:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 8204 @ 2.212s D:\pbrt-v4\src\pbrt\scene.cpp:1244 ] Starting non-future lights [ tid 8204 @ 2.212s D:\pbrt-v4\src\pbrt\scene.cpp:1309 ] Finished non-future lights [ tid 8204 @ 2.213s D:\pbrt-v4\src\pbrt\scene.cpp:1311 ] Starting to consume non-area light futures [ tid 8204 @ 2.867s D:\pbrt-v4\src\pbrt\scene.cpp:1314 ] Finished consuming non-area light futures [ tid 8204 @ 2.867s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:163 ] Done creating lights [ tid 8204 @ 2.868s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:165 ] Starting to create materials [ tid 8204 @ 2.871s D:\pbrt-v4\src\pbrt\scene.cpp:1066 ] Starting to consume normal map futures [ tid 8204 @ 2.871s D:\pbrt-v4\src\pbrt\scene.cpp:1072 ] Finished consuming normal map futures [ tid 8204 @ 2.873s d:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:179 ] Finished creating materials [ tid 8204 @ 2.876s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1151 ] Starting OptiX initialization [ tid 8204 @ 3.453s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1166 ] Optix version 7.3.0 successfully initialized [ tid 8204 @ 3.556s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1238 ] Info: Pipeline has 1 module(s), 19 entry function(s), 5 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 4659 basic block(s) in entry functions, 91937 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions

[ tid 8204 @ 3.558s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1294 ] Finished OptiX initialization [ tid 8204 @ 3.558s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1306 ] Starting to create shapes and acceleration structures [ tid 8204 @ 3.559s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1314 ] Starting to read PLY meshes [ tid 8204 @ 4.060s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1317 ] Finished reading PLY meshes [ tid 8204 @ 4.060s d:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 3 instance definitions_

jakoaltrd commented 3 years ago

@jakoaltrd Did you specify a CMAKE_CUDA_ARCHITECTURE (or CUDAARCHS environment variable) when configuring CMake or afterwards? It is weird that it is trying to compile for SM 5.2 on top of the SM 8.6 it detected. Could you please run cmake -LA ${path_to_build_directory} and paste the output here, to check all set variables?

I set the cuda arch to sm_86.

AaronChenJH commented 3 years ago

@jakoaltrd Did you specify a CMAKE_CUDA_ARCHITECTURE (or CUDAARCHS environment variable) when configuring CMake or afterwards? It is weird that it is trying to compile for SM 5.2 on top of the SM 8.6 it detected. Could you please run cmake -LA ${path_to_build_directory} and paste the output here, to check all set variables?

I set the cuda arch to sm_86.

I ran it(--gpu) successfully in Debug mode but I had the same problem with you in Release.Also, I ran it without gpu successfully in both of Debug and Release.

Debug with GPU E:\pbrt-v4\build_msvc\Debug>pbrt --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt pbrt version 4 (built Aug 14 2021 at 18:48:39) *** DEBUG BUILD *** Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but *not* the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. Rendering: [+++++++++++++++++++++++++++++++++++++++++ ] (159.7s|162.2s)

Release with GPU `E:\pbrt-v4\build_msvc\Release>pbrt --log-level verbose --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt pbrt version 4 (built Aug 14 2021 at 18:36:46) Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but not the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. [ tid 1400 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 1 [ tid 1400 @ 0.000s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 20356 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 2 [ tid 20324 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 3 [ tid 20324 @ 0.001s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 12344 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 5 [ tid 10480 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 4 [ tid 10480 @ 0.002s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 12344 @ 0.002s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 16944 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 8 [ tid 16944 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2636 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 7 [ tid 2636 @ 0.004s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 21072 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 6 [ tid 14992 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 9 [ tid 20356 @ 0.001s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 14804 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 10 [ tid 23264 @ 0.004s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 11 [ tid 14860 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:41 ] GPU CUDA driver 11.4, CUDA runtime 11.4 [ tid 21072 @ 0.005s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 14992 @ 0.006s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 14804 @ 0.006s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 23264 @ 0.007s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 14860 @ 0.007s e:\pbrt-v4\src\pbrt\gpu\util.cpp:64 ] CUDA device 0 (NVIDIA GeForce RTX 2070) with 8192 MiB, 36 SMs running at 1620 MHz with shader model 7.5 [ tid 14860 @ 0.012s e:\pbrt-v4\src\pbrt\gpu\util.cpp:80 ] Selecting GPU device 0 [ tid 14860 @ 0.014s e:\pbrt-v4\src\pbrt\gpu\util.cpp:96 ] Reset stack size to 8192 [ tid 14860 @ 0.381s E:\pbrt-v4\src\pbrt\util\display.cpp:112 ] Trying to connect to display server [ tid 14860 @ 2.415s E:\pbrt-v4\src\pbrt\util\display.cpp:146 ] Connection refused. Will try again... [ tid 14860 @ 2.415s E:\pbrt-v4\src\pbrt\util\display.cpp:160 ] Connected to display server [ tid 14860 @ 2.416s E:\pbrt-v4\src\pbrt\parser.cpp:598 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt [ tid 14860 @ 2.416s e:\pbrt-v4\src\pbrt\cameras.cpp:50 ] World-space position: [ 396.73477, 54.786186, 30 ] [ tid 14860 @ 2.417s E:\pbrt-v4\src\pbrt\parser.cpp:754 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 14860 @ 2.420s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 14860 @ 2.420s E:\pbrt-v4\src\pbrt\parser.cpp:754 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 14860 @ 2.422s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 14860 @ 2.422s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt [ tid 14860 @ 2.423s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 14860 @ 2.423s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 14860 @ 2.424s film.h:196 ] Created film with full resolution [ 700, 700 ], pixelBounds [ [ 0, 0 ] - [ 700, 700 ] ] [ tid 14860 @ 2.698s e:\pbrt-v4\src\pbrt\cameras.cpp:197 ] Camera min pos differentials: [ -0, 0, 0 ], [ -0, 0, 0 ] [ tid 14860 @ 2.698s e:\pbrt-v4\src\pbrt\cameras.cpp:199 ] Camera min dir differentials: [ 0.00011622906, 0.00084993243, -3.5762787e-7 ], [ 0.00083166367, -0.0002102554, -3.5762787e-7 ] [ tid 14860 @ 2.699s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:146 ] Starting to create textures [ tid 14860 @ 2.699s E:\pbrt-v4\src\pbrt\scene.cpp:1123 ] Starting to consume texture futures [ tid 14860 @ 2.700s E:\pbrt-v4\src\pbrt\scene.cpp:1128 ] Finished consuming texture futures [ tid 14860 @ 2.700s E:\pbrt-v4\src\pbrt\scene.cpp:1130 ] Starting to create remaining textures [ tid 14860 @ 2.700s E:\pbrt-v4\src\pbrt\scene.cpp:1187 ] Done creating textures [ tid 14860 @ 2.701s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:148 ] Done creating textures [ tid 14860 @ 2.701s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:150 ] Starting to create lights [ tid 14860 @ 2.702s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 14860 @ 2.702s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 14860 @ 2.702s E:\pbrt-v4\src\pbrt\scene.cpp:1244 ] Starting non-future lights [ tid 14860 @ 2.702s E:\pbrt-v4\src\pbrt\scene.cpp:1309 ] Finished non-future lights [ tid 14860 @ 2.703s E:\pbrt-v4\src\pbrt\scene.cpp:1311 ] Starting to consume non-area light futures [ tid 14860 @ 2.703s E:\pbrt-v4\src\pbrt\scene.cpp:1314 ] Finished consuming non-area light futures [ tid 14860 @ 2.703s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:163 ] Done creating lights [ tid 14860 @ 2.703s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:165 ] Starting to create materials [ tid 14860 @ 2.704s E:\pbrt-v4\src\pbrt\scene.cpp:1066 ] Starting to consume normal map futures [ tid 14860 @ 2.704s E:\pbrt-v4\src\pbrt\scene.cpp:1072 ] Finished consuming normal map futures [ tid 14860 @ 2.704s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:179 ] Finished creating materials [ tid 14860 @ 2.707s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1151 ] Starting OptiX initialization [ tid 14860 @ 3.056s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1166 ] Optix version 7.3.0 successfully initialized [ tid 14860 @ 3.145s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1238 ] Info: Pipeline has 1 module(s), 19 entry function(s), 5 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 4659 basic block(s) in entry functions, 91937 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions

[ tid 14860 @ 3.147s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1294 ] Finished OptiX initialization [ tid 14860 @ 3.147s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1306 ] Starting to create shapes and acceleration structures [ tid 14860 @ 3.147s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1314 ] Starting to read PLY meshes [ tid 14860 @ 3.148s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1317 ] Finished reading PLY meshes [ tid 14860 @ 3.148s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 0 instance definitions [ tid 14860 @ 3.149s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1422 ] Finished creating IASes for instance definitions [ tid 14860 @ 3.149s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1426 ] Starting to create 0 OptixInstances [ tid 14860 @ 3.150s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1466 ] Starting to consume top-level GAS futures `

Debug without GPU E:\pbrt-v4\build_msvc\Debug>pbrt --log-level verbose --display-server localhost:14158 E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt pbrt version 4 (built Aug 14 2021 at 18:48:39) *** DEBUG BUILD *** Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but *not* the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. [ tid 20248 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 1 [ tid 20372 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 2 [ tid 20964 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 3 [ tid 4516 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 4 [ tid 23440 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 5 [ tid 4416 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 6 [ tid 21644 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 7 [ tid 20912 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 8 [ tid 4136 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 9 [ tid 11056 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 10 [ tid 17172 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 11 [ tid 156 @ 0.010s E:\pbrt-v4\src\pbrt\util\display.cpp:112 ] Trying to connect to display server [ tid 156 @ 2.045s E:\pbrt-v4\src\pbrt\util\display.cpp:146 ] Connection refused. Will try again... [ tid 156 @ 2.046s E:\pbrt-v4\src\pbrt\util\display.cpp:160 ] Connected to display server [ tid 156 @ 2.047s E:\pbrt-v4\src\pbrt\parser.cpp:598 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt [ tid 156 @ 2.047s e:\pbrt-v4\src\pbrt\cameras.cpp:50 ] World-space position: [ 396.73477, 54.786186, 30 ] [ tid 156 @ 2.048s E:\pbrt-v4\src\pbrt\parser.cpp:754 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 156 @ 2.069s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 156 @ 2.070s E:\pbrt-v4\src\pbrt\parser.cpp:754 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 156 @ 2.091s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 156 @ 2.092s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt [ tid 156 @ 2.092s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 156 @ 2.092s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 156 @ 2.093s film.h:196 ] Created film with full resolution [ 700, 700 ], pixelBounds [ [ 0, 0 ] - [ 700, 700 ] ] [ tid 156 @ 2.148s e:\pbrt-v4\src\pbrt\cameras.cpp:197 ] Camera min pos differentials: [ -0, 0, 0 ], [ -0, 0, 0 ] [ tid 156 @ 2.148s e:\pbrt-v4\src\pbrt\cameras.cpp:199 ] Camera min dir differentials: [ 0.00011622906, 0.00084993243, -3.5762787e-7 ], [ 0.00083166367, -0.0002102554, -3.5762787e-7 ] [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\cpu\render.cpp:76 ] Starting textures [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\scene.cpp:1123 ] Starting to consume texture futures [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\scene.cpp:1128 ] Finished consuming texture futures [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\scene.cpp:1130 ] Starting to create remaining textures [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\scene.cpp:1187 ] Done creating textures [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\cpu\render.cpp:78 ] Finished textures [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 156 @ 2.207s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\scene.cpp:1244 ] Starting non-future lights [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\scene.cpp:1309 ] Finished non-future lights [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\scene.cpp:1311 ] Starting to consume non-area light futures [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\scene.cpp:1314 ] Finished consuming non-area light futures [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\cpu\render.cpp:85 ] Starting materials [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\scene.cpp:1066 ] Starting to consume normal map futures [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\scene.cpp:1072 ] Finished consuming normal map futures [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\cpu\render.cpp:89 ] Finished materials [ tid 156 @ 2.208s E:\pbrt-v4\src\pbrt\scene.cpp:1411 ] Starting shapes [ tid 156 @ 2.431s E:\pbrt-v4\src\pbrt\scene.cpp:1486 ] Finished shapes [ tid 156 @ 2.431s E:\pbrt-v4\src\pbrt\scene.cpp:1489 ] Starting instances [ tid 156 @ 2.432s E:\pbrt-v4\src\pbrt\scene.cpp:1548 ] Finished instances [ tid 156 @ 2.432s E:\pbrt-v4\src\pbrt\scene.cpp:1552 ] Starting top-level accelerator [ tid 156 @ 5.353s E:\pbrt-v4\src\pbrt\cpu\aggregates.cpp:183 ] BVH created with 129783 nodes for 66533 primitives (3.96 MB) [ tid 156 @ 5.367s E:\pbrt-v4\src\pbrt\scene.cpp:1556 ] Finished top-level accelerator [ tid 156 @ 5.368s cpu/integrators.h:70 ] Scene bounds [ [ -1396.7347, -1054.7861, -1170 ] - [ 603.26526, 945.2138, 830 ] ] [ tid 156 @ 5.368s E:\pbrt-v4\src\pbrt\cpu\render.cpp:145 ] Memory used after scene creation: 82886656 Rendering: [ ] (3.6s|2228.3s)

Release without GPU E:\pbrt-v4\build_msvc\Release>pbrt --log-level verbose --display-server localhost:14158 E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt pbrt version 4 (built Aug 14 2021 at 18:36:46) Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but *not* the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. [ tid 21364 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 1 [ tid 17828 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 2 [ tid 12688 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 3 [ tid 22560 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 4 [ tid 8532 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 5 [ tid 8468 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 6 [ tid 22548 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 7 [ tid 5996 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 8 [ tid 23012 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 9 [ tid 7568 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 10 [ tid 17480 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 11 [ tid 15024 @ 0.003s E:\pbrt-v4\src\pbrt\util\display.cpp:112 ] Trying to connect to display server [ tid 15024 @ 2.021s E:\pbrt-v4\src\pbrt\util\display.cpp:146 ] Connection refused. Will try again... [ tid 15024 @ 2.022s E:\pbrt-v4\src\pbrt\util\display.cpp:160 ] Connected to display server [ tid 15024 @ 2.023s E:\pbrt-v4\src\pbrt\parser.cpp:598 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt [ tid 15024 @ 2.023s e:\pbrt-v4\src\pbrt\cameras.cpp:50 ] World-space position: [ 396.73477, 54.786186, 30 ] [ tid 15024 @ 2.023s E:\pbrt-v4\src\pbrt\parser.cpp:754 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 15024 @ 2.026s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 15024 @ 2.026s E:\pbrt-v4\src\pbrt\parser.cpp:754 ] Started parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 15024 @ 2.028s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\geometry\killeroo.pbrt [ tid 15024 @ 2.028s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt [ tid 15024 @ 2.029s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 15024 @ 2.030s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 15024 @ 2.030s film.h:196 ] Created film with full resolution [ 700, 700 ], pixelBounds [ [ 0, 0 ] - [ 700, 700 ] ] [ tid 15024 @ 2.043s e:\pbrt-v4\src\pbrt\cameras.cpp:197 ] Camera min pos differentials: [ -0, 0, 0 ], [ -0, 0, 0 ] [ tid 15024 @ 2.043s e:\pbrt-v4\src\pbrt\cameras.cpp:199 ] Camera min dir differentials: [ 0.00011622906, 0.00084993243, -3.5762787e-7 ], [ 0.00083166367, -0.0002102554, -3.5762787e-7 ] [ tid 15024 @ 2.066s E:\pbrt-v4\src\pbrt\cpu\render.cpp:76 ] Starting textures [ tid 15024 @ 2.066s E:\pbrt-v4\src\pbrt\scene.cpp:1123 ] Starting to consume texture futures [ tid 15024 @ 2.066s E:\pbrt-v4\src\pbrt\scene.cpp:1128 ] Finished consuming texture futures [ tid 15024 @ 2.070s E:\pbrt-v4\src\pbrt\scene.cpp:1130 ] Starting to create remaining textures [ tid 15024 @ 2.071s E:\pbrt-v4\src\pbrt\scene.cpp:1187 ] Done creating textures [ tid 15024 @ 2.071s E:\pbrt-v4\src\pbrt\cpu\render.cpp:78 ] Finished textures [ tid 15024 @ 2.072s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 15024 @ 2.073s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 15024 @ 2.073s E:\pbrt-v4\src\pbrt\scene.cpp:1244 ] Starting non-future lights [ tid 15024 @ 2.073s E:\pbrt-v4\src\pbrt\scene.cpp:1309 ] Finished non-future lights [ tid 15024 @ 2.074s E:\pbrt-v4\src\pbrt\scene.cpp:1311 ] Starting to consume non-area light futures [ tid 15024 @ 2.074s E:\pbrt-v4\src\pbrt\scene.cpp:1314 ] Finished consuming non-area light futures [ tid 15024 @ 2.074s E:\pbrt-v4\src\pbrt\cpu\render.cpp:85 ] Starting materials [ tid 15024 @ 2.075s E:\pbrt-v4\src\pbrt\scene.cpp:1066 ] Starting to consume normal map futures [ tid 15024 @ 2.075s E:\pbrt-v4\src\pbrt\scene.cpp:1072 ] Finished consuming normal map futures [ tid 15024 @ 2.075s E:\pbrt-v4\src\pbrt\cpu\render.cpp:89 ] Finished materials [ tid 15024 @ 2.076s E:\pbrt-v4\src\pbrt\scene.cpp:1411 ] Starting shapes [ tid 15024 @ 2.106s E:\pbrt-v4\src\pbrt\scene.cpp:1486 ] Finished shapes [ tid 15024 @ 2.106s E:\pbrt-v4\src\pbrt\scene.cpp:1489 ] Starting instances [ tid 15024 @ 2.107s E:\pbrt-v4\src\pbrt\scene.cpp:1548 ] Finished instances [ tid 15024 @ 2.108s E:\pbrt-v4\src\pbrt\scene.cpp:1552 ] Starting top-level accelerator [ tid 15024 @ 2.161s E:\pbrt-v4\src\pbrt\cpu\aggregates.cpp:183 ] BVH created with 129783 nodes for 66533 primitives (3.96 MB) [ tid 15024 @ 2.163s E:\pbrt-v4\src\pbrt\scene.cpp:1556 ] Finished top-level accelerator [ tid 15024 @ 2.163s cpu/integrators.h:70 ] Scene bounds [ [ -1396.7347, -1054.7861, -1170 ] - [ 603.26526, 945.2138, 830 ] ] [ tid 15024 @ 2.164s E:\pbrt-v4\src\pbrt\cpu\render.cpp:145 ] Memory used after scene creation: 73551872 Rendering: [++++++++++++ ] (13.5s|135.0s)

jakoaltrd commented 3 years ago

I ran it(--gpu) successfully in Debug mode but I had the same problem with you in Release.Also, I ran it without gpu successfully in both of Debug and Release.

Debug with GPU E:\pbrt-v4\build_msvc\Debug>pbrt --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt pbrt version 4 (built Aug 14 2021 at 18:48:39) *** DEBUG BUILD *** Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but *not* the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. Rendering: [+++++++++++++++++++++++++++++++++++++++++ ] (159.7s|162.2s)

what is the --display-server localhost:14158 mean ? BTW, debug or release, whichever I build , it shows nothing at all. I don't know why

pierremoreau commented 3 years ago

Thank you for the output of cmake -LA; no mention there of sm52 AFAICS, so no idea where it might be coming from.

gdb --args pbrt --log-level verbose --gpu D:\pbrt-v4\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt is not usable?

Sorry I somehow thought you were on Linux. I managed to get the data I was after and posted it below: the program is indeed crashing while it is still setting up everything for rendering, which is why you do not get any rendering.

I tested on Windows with CUDA 11.3.109 and OptiX 7.2.0, and ran into an unhandled exception when rendering the transparent-machines/frame1266.pbrt scene, in both Release and Debug mode. Below are details from the RelWithDebInfo run:

Exception details:

Unhandled exception at 0x00007FFCBAB112DB (vcruntime140.dll) in pbrt.exe: 0xC0000006: In page error writing location 0x000000111F600000 (status code 0xC0000022).

Call stack:

vcruntime140.dll!00007ffcbab112db()
pbrt.exe!std::_Copy_memmove<pbrt::Normal3<float> const *,pbrt::Normal3<float> *>(const pbrt::Normal3<float> * _First, const pbrt::Normal3<float> * _Last, pbrt::Normal3<float> * _Dest) Line 4169
    at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xutility(4169)
[Inline Frame] pbrt.exe!std::_Copy_unchecked(const pbrt::Normal3<float> *) Line 4193
    at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xutility(4193)
[Inline Frame] pbrt.exe!std::copy(const pbrt::Normal3<float> * _Last, const pbrt::Normal3<float> *) Line 4210
    at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xutility(4210)
pbrt.exe!pbrt::BufferCache<pbrt::Normal3<float>>::LookupOrAdd(pstd::span<pbrt::Normal3<float> const> buf, pstd::pmr::polymorphic_allocator<enum std::byte> alloc) Line 53
    at D:\Softwares\pbrt-v4\src\pbrt\util\buffercache.h(53)
pbrt.exe!pbrt::TriangleMesh::TriangleMesh(const pbrt::Transform & renderFromObject, bool reverseOrientation, std::vector<int,std::allocator<int>> indices, std::vector<pbrt::Point3<float>,std::allocator<pbrt::Point3<float>>> p, std::vector<pbrt::Vector3<float>,std::allocator<pbrt::Vector3<float>>> s, std::vector<pbrt::Normal3<float>,std::allocator<pbrt::Normal3<float>>> n, std::vector<pbrt::Point2<float>,std::allocator<pbrt::Point2<float>>> uv, std::vector<int,std::allocator<int>> faceIndices, pstd::pmr::polymorphic_allocator<enum std::byte> alloc) Line 56
    at D:\Softwares\pbrt-v4\src\pbrt\util\mesh.cpp(56)
[Inline Frame] pbrt.exe!pstd::pmr::polymorphic_allocator<enum std::byte>::construct(pbrt::TriangleMesh *) Line 668
    at D:\Softwares\pbrt-v4\src\pbrt\util\pstd.h(668)
[Inline Frame] pbrt.exe!pstd::pmr::polymorphic_allocator<enum std::byte>::new_object(const pbrt::Transform &) Line 658
    at D:\Softwares\pbrt-v4\src\pbrt\util\pstd.h(658)
pbrt.exe!pbrt::OptiXAggregate::buildBVHForTriangles::__l2::<lambda>(__int64 meshIndex) Line 414
    at D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp(414)
[External Code]
[Inline Frame] pbrt.exe!std::_Func_class<void,__int64,__int64>::operator()(__int64 <_Args_0>, __int64 <_Args_1>) Line 968
    at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\functional(968)
pbrt.exe!pbrt::ParallelForLoop1D::RunStep(std::unique_lock<std::mutex> * lock) Line 296
    at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp(296)
pbrt.exe!pbrt::ThreadPool::WorkOrWait(std::unique_lock<std::mutex> * lock) Line 121
    at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp(121)
pbrt.exe!pbrt::ThreadPool::workerFunc(int index) Line 92
    at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp(92)
[External Code]
AaronChenJH commented 3 years ago

I ran it(--gpu) successfully in Debug mode but I had the same problem with you in Release.Also, I ran it without gpu successfully in both of Debug and Release. Debug with GPU E:\pbrt-v4\build_msvc\Debug>pbrt --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\killeroos\killeroo-simple.pbrt pbrt version 4 (built Aug 14 2021 at 18:48:39) *** DEBUG BUILD *** Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but *not* the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. Rendering: [+++++++++++++++++++++++++++++++++++++++++ ] (159.7s|162.2s)

what is the --display-server localhost:14158 mean ? BTW, debug or release, whichever I build , it shows nothing at all. I don't know why

pbrt-v4 can work together with the tev image viewer to display the image as it's being rendered. As of recent versions, tev can display images provided to it via a network socket; by default, it listens to port 14158, though this can be changed via its --hostname command-line option. If you have an instance of tev running, you can run pbrt like: pbrt --display-server localhost:14158 scene.pbrt so, --display-server localhost:14158 is only a display and is irrelevant to the question!

jakoaltrd commented 3 years ago

I test just now in debug mode, with sssdragon scene, it can render an output, but it takes nearly half an hour, I think gpu mode should be much faster! _Debug>pbrt --gpu D:\pbrt-v4\pbrt-v4-scenes-master\sssdragon\dragon250.pbrt BTW, through the task manager, i can see my GPU is not active, both GPU0 and GPU1, and cpu is 13% in use! that means it didn't using my gpu, why?

pierremoreau commented 3 years ago

@AaronChenJH I can confirm what you experienced with killeroo-simple, but it might be a different issue. More details below:

I tested on Windows with CUDA 11.3.109 and OptiX 7.2.0, and ran into a launch timing out when rendering the _killeroos/killeroo-simple.pbrt scene, Release mode only (Debug works fine):

Log:

[ tid 14836 @     0.990s D:\Softwares\pbrt-v4\src\pbrt\scene.cpp:1007 ] Starting to consume normal map futures
[ tid 14836 @     0.991s D:\Softwares\pbrt-v4\src\pbrt\scene.cpp:1013 ] Finished consuming normal map futures
[ tid 14836 @     0.991s D:\Softwares\pbrt-v4\src\pbrt\wavefront\integrator.cpp:179 ] Finished creating materials
[ tid 14836 @     0.999s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1151 ] Starting OptiX initialization
[ tid 14836 @     1.203s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1166 ] Optix version 7.2.0 successfully initialized
[ tid 14836 @     1.239s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1238 ] Info: Pipeline has 1 module(s), 19 entry function(s), 5 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 4650 basic block(s) in entry functions, 97808 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions

[ tid 14836 @     1.240s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1294 ] Finished OptiX initialization
[ tid 14836 @     1.240s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1306 ] Starting to create shapes and acceleration structures
[ tid 14836 @     1.241s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1314 ] Starting to read PLY meshes
[ tid 14836 @     1.241s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1317 ] Finished reading PLY meshes
[ tid 14836 @     1.242s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 0 instance definitions
[ tid 14836 @     1.242s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1422 ] Finished creating IASes for instance definitions
[ tid 14836 @     1.243s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1426 ] Starting to create 0 OptixInstances
[ tid 14836 @     1.249s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1465 ] Starting to consume top-level GAS futures
[ tid 15648 @    22.159s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:139 ] FATAL CUDA error: the launch timed out and was terminated
(D:\Softwares\pbrt-v4\src\pbrt\util\check.cpp)  0x00007FF6F8FA2D70 - pbrt::PrintStackTrace + line 121
(D:\Softwares\pbrt-v4\src\pbrt\util\check.cpp)  0x00007FF6F8FA2C40 - pbrt::CheckCallbackScope::Fail + line 148
(D:\Softwares\pbrt-v4\src\pbrt\util\log.cpp)    0x00007FF6F8BF6970 - pbrt::LogFatal + line 401
(D:\Softwares\pbrt-v4\src\pbrt\util\log.h)      0x00007FF6F8BE1EB0 - pbrt::LogFatal<char const *> + line 116
(D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp)       0x00007FF6F9264AA0 - pbrt::OptiXAggregate::buildOptixBVH + line 139
(D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp)       0x00007FF6F92626F0 - pbrt::OptiXAggregate::buildBVHForQuadrics + line 981
(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\functional)    0x00007FF6F925DCC0 - std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,<lambda_dbbceffabbca08e40e57ee11dd082ce7> &>,`pbrt::OptiXAggregate::OptiXAggregate'::`2'::GAS>::_Do_call + line 920
(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future)        0x00007FF6F925C920 - std::_Packaged_state<`pbrt::OptiXAggregate::OptiXAggregate'::`2'::GAS __cdecl(void)>::_Call_immediate + line 496
(D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp)       0x00007FF6F8CEC420 - pbrt::ThreadPool::WorkOrWait + line 121
(D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp)       0x00007FF6F8CECE50 - pbrt::ThreadPool::workerFunc + line 92
(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\thread)        0x00007FF6F8CE4A10 - std::thread::_Invoke<std::tuple<void (__cdecl pbrt::ThreadPool::*)(int),pbrt::ThreadPool *,int>,0,1,2> + line 56
(unknown                                 )      0x00007FFCD4511B20 - configthreadlocale
(unknown                                 )      0x00007FFCD6217020 - BaseThreadInitThunk
(unknown                                 )      0x00007FFCD68E2630 - RtlUserThreadStart

Call stack:

ucrtbase.dll!00007ffcd456286e()
pbrt.exe!pbrt::CheckCallbackScope::Fail() Line 158
    at D:\Softwares\pbrt-v4\src\pbrt\util\check.cpp(158)
pbrt.exe!pbrt::LogFatal(pbrt::LogLevel level, const char * file, int line, const char * s) Line 401
    at D:\Softwares\pbrt-v4\src\pbrt\util\log.cpp(401)
pbrt.exe!pbrt::LogFatal<char const *>(pbrt::LogLevel level, const char * file, int line, const char * fmt, const char * && <args_0>) Line 116
    at D:\Softwares\pbrt-v4\src\pbrt\util\log.h(116)
pbrt.exe!pbrt::OptiXAggregate::buildOptixBVH(OptixDeviceContext_t * optixContext, const std::vector<OptixBuildInput,std::allocator<OptixBuildInput>> & buildInputs, pbrt::ThreadLocal<CUstream_st *,256> & threadCUDAStreams) Line 139
    at D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp(139)
pbrt.exe!pbrt::OptiXAggregate::buildBVHForQuadrics(const std::vector<pbrt::ShapeSceneEntity,std::allocator<pbrt::ShapeSceneEntity>> & shapes, OptixDeviceContext_t * optixContext, OptixProgramGroup_t * const & intersectPG, OptixProgramGroup_t * const & shadowPG, OptixProgramGroup_t * const & randomHitPG, const std::map<std::string,pbrt::FloatTexture,std::less<std::string>,std::allocator<std::pair<std::string const ,pbrt::FloatTexture>>> & floatTextures, const std::map<std::string,pbrt::Material,std::less<std::string>,std::allocator<std::pair<std::string const ,pbrt::Material>>> & namedMaterials, const std::vector<pbrt::Material,std::allocator<pbrt::Material>> & materials, const std::map<std::string,pbrt::Medium,std::less<std::string>,std::allocator<std::pair<std::string const ,pbrt::Medium>>> & media, const std::map<int,pstd::vector<pbrt::Light,pstd::pmr::polymorphic_allocator<pbrt::Light>> *,std::less<int>,std::allocator<std::pair<int const ,pstd::vector<pbrt::Light,pstd::pmr::polymorphic_allocator<pbrt::Light>> *>>> & shapeIndexToAreaLights, pbrt::ThreadLocal<pstd::pmr::polymorphic_allocator<enum std::byte>,256> & threadAllocators, pbrt::ThreadLocal<CUstream_st *,256> & threadCUDAStreams) Line 981
    at D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp(981)
[External Code]
pbrt.exe!pbrt::ThreadPool::WorkOrWait(std::unique_lock<std::mutex> * lock) Line 121
    at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp(121)
pbrt.exe!pbrt::ThreadPool::workerFunc(int index) Line 92
    at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp(92)
[External Code]
pierremoreau commented 3 years ago

I test just now in debug mode, with sssdragon scene, it can render an output, but it takes nearly half an hour, I think gpu mode should be much faster! _Debug>pbrt --gpu D:\pbrt-v4\pbrt-v4-scenes-master\sssdragon\dragon250.pbrt

I'll give it a try in Debug on my computer and see how long it takes. How long does it take for you in Release mode? Here it is about 33 seconds.

BTW, through the task manager, i can see my GPU is not active, both GPU0 and GPU1, and cpu is 13% in use! that means it didn't using my gpu, why?

Not necessarily: the graph and utilisation shown in Task Manager (unless looking at a specific engine in particular) is based on what Task Manager thinks is the most relevant (usually the 3D engine) and tends to fail providing useful info in purely compute situations. If you click on your GPU in Task Manager, and then select "Cuda" from the drown down next to 3D in the top left corner, you should see better results. For example, here is what I get in Task Manager when running pbrt with the --gpu option: the 3D view and the graph under GPU0 seem to tell nothing is happening, despite the Cuda "engine" being at 100% utilisation. image

jakoaltrd commented 3 years ago

I test just now in debug mode, with sssdragon scene, it can render an output, but it takes nearly half an hour, I think gpu mode should be much faster! _Debug>pbrt --gpu D:\pbrt-v4\pbrt-v4-scenes-master\sssdragon\dragon250.pbrt BTW, through the task manager, i can see my GPU is not active, both GPU0 and GPU1, and cpu is 13% in use! that means it didn't using my gpu, why?

this time I use release mode to render the same scene, it took 47s. I see the GPU1 is 3% in use, does that mean there exist optimizations to run the code faster, and why transparent machines can't be rendered, is that a bug? I also test the debug mode, it took half an hour, and this time GPU1 is active, cuda usage is 90%, why does debug mode so slow, in what condition GPU will outperform cpu mode? BTW, why transparent machines can't work

pierremoreau commented 3 years ago

why does debug mode so slow

In Debug mode, the generated code is not as optimised and there might be additional synchronisation and checks enabled compared to Release mode, to help with debugging the program when needed. With that said, it is especially slow for the dragon scene and I am not sure why. It has been running for 15 minutes now on my computer, and it is still processing the scene/setting up everything and has not started yet with the actual rendering.

BTW, why transparent machines can't work

As I mentioned in my earlier reply, pbrt crashes while building some acceleration structure around the triangles. Exactly why that happens, I do not know, but it explains why you do not get any results.

jakoaltrd commented 3 years ago

BTW, why transparent machines can't work

As I mentioned in my earlier reply, pbrt crashes while building some acceleration structure around the triangles. Exactly why that happens, I do not know, but it explains why you do not get any results.

thanks for your patience, should that be reported as a bug, and will it be fixed in the next branch?

then I test another scene 'sanmiguel-realistic-courtyard.pbrt' , it can't be rendered, neither debug nor release

AaronChenJH commented 3 years ago

@AaronChenJH I can confirm what you experienced with killeroo-simple, but it might be a different issue. More details below:

I tested on Windows with CUDA 11.3.109 and OptiX 7.2.0, and ran into a launch timing out when rendering the _killeroos/killeroo-simple.pbrt scene, Release mode only (Debug works fine):

Log:

[ tid 14836 @     0.990s D:\Softwares\pbrt-v4\src\pbrt\scene.cpp:1007 ] Starting to consume normal map futures
[ tid 14836 @     0.991s D:\Softwares\pbrt-v4\src\pbrt\scene.cpp:1013 ] Finished consuming normal map futures
[ tid 14836 @     0.991s D:\Softwares\pbrt-v4\src\pbrt\wavefront\integrator.cpp:179 ] Finished creating materials
[ tid 14836 @     0.999s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1151 ] Starting OptiX initialization
[ tid 14836 @     1.203s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1166 ] Optix version 7.2.0 successfully initialized
[ tid 14836 @     1.239s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1238 ] Info: Pipeline has 1 module(s), 19 entry function(s), 5 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 4650 basic block(s) in entry functions, 97808 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions

[ tid 14836 @     1.240s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1294 ] Finished OptiX initialization
[ tid 14836 @     1.240s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1306 ] Starting to create shapes and acceleration structures
[ tid 14836 @     1.241s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1314 ] Starting to read PLY meshes
[ tid 14836 @     1.241s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1317 ] Finished reading PLY meshes
[ tid 14836 @     1.242s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 0 instance definitions
[ tid 14836 @     1.242s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1422 ] Finished creating IASes for instance definitions
[ tid 14836 @     1.243s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1426 ] Starting to create 0 OptixInstances
[ tid 14836 @     1.249s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1465 ] Starting to consume top-level GAS futures
[ tid 15648 @    22.159s D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp:139 ] FATAL CUDA error: the launch timed out and was terminated
(D:\Softwares\pbrt-v4\src\pbrt\util\check.cpp)  0x00007FF6F8FA2D70 - pbrt::PrintStackTrace + line 121
(D:\Softwares\pbrt-v4\src\pbrt\util\check.cpp)  0x00007FF6F8FA2C40 - pbrt::CheckCallbackScope::Fail + line 148
(D:\Softwares\pbrt-v4\src\pbrt\util\log.cpp)    0x00007FF6F8BF6970 - pbrt::LogFatal + line 401
(D:\Softwares\pbrt-v4\src\pbrt\util\log.h)      0x00007FF6F8BE1EB0 - pbrt::LogFatal<char const *> + line 116
(D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp)       0x00007FF6F9264AA0 - pbrt::OptiXAggregate::buildOptixBVH + line 139
(D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp)       0x00007FF6F92626F0 - pbrt::OptiXAggregate::buildBVHForQuadrics + line 981
(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\functional)    0x00007FF6F925DCC0 - std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,<lambda_dbbceffabbca08e40e57ee11dd082ce7> &>,`pbrt::OptiXAggregate::OptiXAggregate'::`2'::GAS>::_Do_call + line 920
(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future)        0x00007FF6F925C920 - std::_Packaged_state<`pbrt::OptiXAggregate::OptiXAggregate'::`2'::GAS __cdecl(void)>::_Call_immediate + line 496
(D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp)       0x00007FF6F8CEC420 - pbrt::ThreadPool::WorkOrWait + line 121
(D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp)       0x00007FF6F8CECE50 - pbrt::ThreadPool::workerFunc + line 92
(C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\thread)        0x00007FF6F8CE4A10 - std::thread::_Invoke<std::tuple<void (__cdecl pbrt::ThreadPool::*)(int),pbrt::ThreadPool *,int>,0,1,2> + line 56
(unknown                                 )      0x00007FFCD4511B20 - configthreadlocale
(unknown                                 )      0x00007FFCD6217020 - BaseThreadInitThunk
(unknown                                 )      0x00007FFCD68E2630 - RtlUserThreadStart

Call stack:

ucrtbase.dll!00007ffcd456286e()
pbrt.exe!pbrt::CheckCallbackScope::Fail() Line 158
  at D:\Softwares\pbrt-v4\src\pbrt\util\check.cpp(158)
pbrt.exe!pbrt::LogFatal(pbrt::LogLevel level, const char * file, int line, const char * s) Line 401
  at D:\Softwares\pbrt-v4\src\pbrt\util\log.cpp(401)
pbrt.exe!pbrt::LogFatal<char const *>(pbrt::LogLevel level, const char * file, int line, const char * fmt, const char * && <args_0>) Line 116
  at D:\Softwares\pbrt-v4\src\pbrt\util\log.h(116)
pbrt.exe!pbrt::OptiXAggregate::buildOptixBVH(OptixDeviceContext_t * optixContext, const std::vector<OptixBuildInput,std::allocator<OptixBuildInput>> & buildInputs, pbrt::ThreadLocal<CUstream_st *,256> & threadCUDAStreams) Line 139
  at D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp(139)
pbrt.exe!pbrt::OptiXAggregate::buildBVHForQuadrics(const std::vector<pbrt::ShapeSceneEntity,std::allocator<pbrt::ShapeSceneEntity>> & shapes, OptixDeviceContext_t * optixContext, OptixProgramGroup_t * const & intersectPG, OptixProgramGroup_t * const & shadowPG, OptixProgramGroup_t * const & randomHitPG, const std::map<std::string,pbrt::FloatTexture,std::less<std::string>,std::allocator<std::pair<std::string const ,pbrt::FloatTexture>>> & floatTextures, const std::map<std::string,pbrt::Material,std::less<std::string>,std::allocator<std::pair<std::string const ,pbrt::Material>>> & namedMaterials, const std::vector<pbrt::Material,std::allocator<pbrt::Material>> & materials, const std::map<std::string,pbrt::Medium,std::less<std::string>,std::allocator<std::pair<std::string const ,pbrt::Medium>>> & media, const std::map<int,pstd::vector<pbrt::Light,pstd::pmr::polymorphic_allocator<pbrt::Light>> *,std::less<int>,std::allocator<std::pair<int const ,pstd::vector<pbrt::Light,pstd::pmr::polymorphic_allocator<pbrt::Light>> *>>> & shapeIndexToAreaLights, pbrt::ThreadLocal<pstd::pmr::polymorphic_allocator<enum std::byte>,256> & threadAllocators, pbrt::ThreadLocal<CUstream_st *,256> & threadCUDAStreams) Line 981
  at D:\Softwares\pbrt-v4\src\pbrt\gpu\aggregate.cpp(981)
[External Code]
pbrt.exe!pbrt::ThreadPool::WorkOrWait(std::unique_lock<std::mutex> * lock) Line 121
  at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp(121)
pbrt.exe!pbrt::ThreadPool::workerFunc(int index) Line 92
  at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.cpp(92)
[External Code]

E:\pbrt-v4\build_msvc\Release>pbrt --log-level verbose --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\head\head.pbrt Yes,you are right! It may not be the same question. I run it(pbrt --log-level verbose --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\head\head.pbrt)successfully on Windows with CUDA 11.4.10 and OptiX 7.3.0. And when I tested the frame1266.pbrt, I failed, too.I tested it twice. First, I got the mesege feedback: FATAL CUDA error: an illegal memory access was encountered . Second,I got nothing.

First to test the frame1266.pbrt, FATAL CUDA error: an illegal memory access was encountered ` E:\pbrt-v4\build_msvc\Release>pbrt --log-level verbose --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt pbrt version 4 (built Aug 14 2021 at 18:36:46) Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but not the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. [ tid 2168 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 1 [ tid 2168 @ 0.000s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 19772 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 2 [ tid 19772 @ 0.000s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 21904 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 3 [ tid 21904 @ 0.001s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 20800 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 4 [ tid 20800 @ 0.001s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 4868 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 5 [ tid 4868 @ 0.001s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 9804 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 6 [ tid 9804 @ 0.001s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 19892 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 7 [ tid 19892 @ 0.002s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 22004 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 8 [ tid 22004 @ 0.002s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 23072 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 9 [ tid 23072 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 14380 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 11 [ tid 2460 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 10 [ tid 4564 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:41 ] GPU CUDA driver 11.4, CUDA runtime 11.4 [ tid 14380 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2460 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 4564 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:64 ] CUDA device 0 (NVIDIA GeForce RTX 2070) with 8192 MiB, 36 SMs running at 1620 MHz with shader model 7.5 [ tid 4564 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:80 ] Selecting GPU device 0 [ tid 4564 @ 0.004s e:\pbrt-v4\src\pbrt\gpu\util.cpp:96 ] Reset stack size to 8192 [ tid 4564 @ 0.245s E:\pbrt-v4\src\pbrt\util\display.cpp:112 ] Trying to connect to display server [ tid 4564 @ 2.290s E:\pbrt-v4\src\pbrt\util\display.cpp:146 ] Connection refused. Will try again... [ tid 4564 @ 2.290s E:\pbrt-v4\src\pbrt\util\display.cpp:160 ] Connected to display server [ tid 4564 @ 2.294s E:\pbrt-v4\src\pbrt\parser.cpp:598 ] Started parsing E:\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 4564 @ 2.294s e:\pbrt-v4\src\pbrt\cameras.cpp:50 ] World-space position: [ 103.74101, 269.57877, -207.24113 ] [ tid 4564 @ 2.306s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 4564 @ 2.307s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 4564 @ 2.307s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 4564 @ 2.308s film.h:196 ] Created film with full resolution [ 1920, 840 ], pixelBounds [ [ 0, 0 ] - [ 1920, 840 ] ] [ tid 22004 @ 3.014s E:\pbrt-v4\src\pbrt\util\image.cpp:1106 ] Read EXR image E:\pbrt-v4-scenes-master\transparent-machines\textures\sky.exr (2048 x 2048) [ tid 4564 @ 3.077s e:\pbrt-v4\src\pbrt\cameras.cpp:197 ] Camera min pos differentials: [ 0, 0, 0 ], [ 0, 0, 0 ] [ tid 4564 @ 3.077s e:\pbrt-v4\src\pbrt\cameras.cpp:199 ] Camera min dir differentials: [ 0.00015701354, -0.000039756298, 0 ], [ -0.000014401972, -0.0001629889, 0 ] [ tid 4564 @ 3.077s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:146 ] Starting to create textures [ tid 4564 @ 3.078s E:\pbrt-v4\src\pbrt\scene.cpp:1123 ] Starting to consume texture futures [ tid 4564 @ 3.078s E:\pbrt-v4\src\pbrt\scene.cpp:1128 ] Finished consuming texture futures [ tid 4564 @ 3.078s E:\pbrt-v4\src\pbrt\scene.cpp:1130 ] Starting to create remaining textures [ tid 4564 @ 3.078s E:\pbrt-v4\src\pbrt\scene.cpp:1187 ] Done creating textures [ tid 4564 @ 3.078s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:148 ] Done creating textures [ tid 4564 @ 3.078s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:150 ] Starting to create lights [ tid 4564 @ 3.078s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 4564 @ 3.078s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 4564 @ 3.079s E:\pbrt-v4\src\pbrt\scene.cpp:1244 ] Starting non-future lights [ tid 4564 @ 3.079s E:\pbrt-v4\src\pbrt\scene.cpp:1309 ] Finished non-future lights [ tid 4564 @ 3.079s E:\pbrt-v4\src\pbrt\scene.cpp:1311 ] Starting to consume non-area light futures [ tid 4564 @ 3.839s E:\pbrt-v4\src\pbrt\scene.cpp:1314 ] Finished consuming non-area light futures [ tid 4564 @ 3.839s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:163 ] Done creating lights [ tid 4564 @ 3.840s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:165 ] Starting to create materials [ tid 4564 @ 3.840s E:\pbrt-v4\src\pbrt\scene.cpp:1066 ] Starting to consume normal map futures [ tid 4564 @ 3.840s E:\pbrt-v4\src\pbrt\scene.cpp:1072 ] Finished consuming normal map futures [ tid 4564 @ 3.840s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:179 ] Finished creating materials [ tid 4564 @ 3.843s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1151 ] Starting OptiX initialization [ tid 4564 @ 3.962s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1166 ] Optix version 7.3.0 successfully initialized [ tid 4564 @ 3.986s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1238 ] Info: Pipeline has 1 module(s), 19 entry function(s), 5 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 4659 basic block(s) in entry functions, 91937 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions

[ tid 4564 @ 3.988s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1294 ] Finished OptiX initialization [ tid 4564 @ 3.988s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1306 ] Starting to create shapes and acceleration structures [ tid 4564 @ 3.988s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1314 ] Starting to read PLY meshes [ tid 4564 @ 7.028s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1317 ] Finished reading PLY meshes [ tid 4564 @ 7.028s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 3 instance definitions [ tid 19892 @ 8.540s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:139 ] FATAL CUDA error: an illegal memory access was encountered `

Second to test the frame1266.pbrt ` E:\pbrt-v4\build_msvc\Release>pbrt --log-level verbose --gpu --display-server localhost:14158 E:\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt pbrt version 4 (built Aug 14 2021 at 18:36:46) Copyright (c)1998-2021 Matt Pharr, Wenzel Jakob, and Greg Humphreys. The source code to pbrt (but not the book contents) is covered by the Apache 2.0 License. See the file LICENSE.txt for the conditions of the license. [ tid 19624 @ 0.000s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 1 [ tid 19624 @ 0.000s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 21712 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 2 [ tid 21712 @ 0.001s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2860 @ 0.001s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 3 [ tid 21964 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 4 [ tid 21964 @ 0.002s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 2860 @ 0.002s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 1888 @ 0.002s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 5 [ tid 16500 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 8 [ tid 16500 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 1888 @ 0.003s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 22264 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 6 [ tid 22264 @ 0.004s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8288 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 7 [ tid 7684 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 10 [ tid 7684 @ 0.005s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 11228 @ 0.004s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 11 [ tid 11228 @ 0.005s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 8288 @ 0.004s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 21328 @ 0.004s e:\pbrt-v4\src\pbrt\gpu\util.cpp:41 ] GPU CUDA driver 11.4, CUDA runtime 11.4 [ tid 20228 @ 0.003s E:\pbrt-v4\src\pbrt\util\parallel.cpp:84 ] Started execution in worker thread 9 [ tid 20228 @ 0.006s e:\pbrt-v4\src\pbrt\gpu\util.cpp:115 ] Selecting GPU device 0 [ tid 21328 @ 0.005s e:\pbrt-v4\src\pbrt\gpu\util.cpp:64 ] CUDA device 0 (NVIDIA GeForce RTX 2070) with 8192 MiB, 36 SMs running at 1620 MHz with shader model 7.5 [ tid 21328 @ 0.006s e:\pbrt-v4\src\pbrt\gpu\util.cpp:80 ] Selecting GPU device 0 [ tid 21328 @ 0.007s e:\pbrt-v4\src\pbrt\gpu\util.cpp:96 ] Reset stack size to 8192 [ tid 21328 @ 0.261s E:\pbrt-v4\src\pbrt\util\display.cpp:112 ] Trying to connect to display server [ tid 21328 @ 2.308s E:\pbrt-v4\src\pbrt\util\display.cpp:146 ] Connection refused. Will try again... [ tid 21328 @ 2.308s E:\pbrt-v4\src\pbrt\util\display.cpp:160 ] Connected to display server [ tid 21328 @ 2.311s E:\pbrt-v4\src\pbrt\parser.cpp:598 ] Started parsing E:\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 21328 @ 2.311s e:\pbrt-v4\src\pbrt\cameras.cpp:50 ] World-space position: [ 103.74101, 269.57877, -207.24113 ] [ tid 21328 @ 2.325s E:\pbrt-v4\src\pbrt\parser.cpp:629 ] Finished parsing E:\pbrt-v4-scenes-master\transparent-machines\frame1266.pbrt [ tid 21328 @ 2.326s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 21328 @ 2.326s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 21328 @ 2.333s film.h:196 ] Created film with full resolution [ 1920, 840 ], pixelBounds [ [ 0, 0 ] - [ 1920, 840 ] ] [ tid 2860 @ 2.790s E:\pbrt-v4\src\pbrt\util\image.cpp:1106 ] Read EXR image E:\pbrt-v4-scenes-master\transparent-machines\textures\sky.exr (2048 x 2048) [ tid 21328 @ 3.172s e:\pbrt-v4\src\pbrt\cameras.cpp:197 ] Camera min pos differentials: [ 0, 0, 0 ], [ 0, 0, 0 ] [ tid 21328 @ 3.172s e:\pbrt-v4\src\pbrt\cameras.cpp:199 ] Camera min dir differentials: [ 0.00015701354, -0.000039756298, 0 ], [ -0.000014401972, -0.0001629889, 0 ] [ tid 21328 @ 3.172s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:146 ] Starting to create textures [ tid 21328 @ 3.172s E:\pbrt-v4\src\pbrt\scene.cpp:1123 ] Starting to consume texture futures [ tid 21328 @ 3.172s E:\pbrt-v4\src\pbrt\scene.cpp:1128 ] Finished consuming texture futures [ tid 21328 @ 3.173s E:\pbrt-v4\src\pbrt\scene.cpp:1130 ] Starting to create remaining textures [ tid 21328 @ 3.173s E:\pbrt-v4\src\pbrt\scene.cpp:1187 ] Done creating textures [ tid 21328 @ 3.173s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:148 ] Done creating textures [ tid 21328 @ 3.173s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:150 ] Starting to create lights [ tid 21328 @ 3.173s E:\pbrt-v4\src\pbrt\scene.cpp:1194 ] Consume media futures start [ tid 21328 @ 3.173s E:\pbrt-v4\src\pbrt\scene.cpp:1201 ] Consume media futures finished [ tid 21328 @ 3.174s E:\pbrt-v4\src\pbrt\scene.cpp:1244 ] Starting non-future lights [ tid 21328 @ 3.174s E:\pbrt-v4\src\pbrt\scene.cpp:1309 ] Finished non-future lights [ tid 21328 @ 3.174s E:\pbrt-v4\src\pbrt\scene.cpp:1311 ] Starting to consume non-area light futures [ tid 21328 @ 3.792s E:\pbrt-v4\src\pbrt\scene.cpp:1314 ] Finished consuming non-area light futures [ tid 21328 @ 3.793s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:163 ] Done creating lights [ tid 21328 @ 3.793s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:165 ] Starting to create materials [ tid 21328 @ 3.793s E:\pbrt-v4\src\pbrt\scene.cpp:1066 ] Starting to consume normal map futures [ tid 21328 @ 3.794s E:\pbrt-v4\src\pbrt\scene.cpp:1072 ] Finished consuming normal map futures [ tid 21328 @ 3.794s e:\pbrt-v4\src\pbrt\wavefront\integrator.cpp:179 ] Finished creating materials [ tid 21328 @ 3.797s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1151 ] Starting OptiX initialization [ tid 21328 @ 3.875s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1166 ] Optix version 7.3.0 successfully initialized [ tid 21328 @ 3.901s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1238 ] Info: Pipeline has 1 module(s), 19 entry function(s), 5 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 4659 basic block(s) in entry functions, 91937 instruction(s) in entry functions, 0 non-entry function(s), 0 basic block(s) in non-entry functions, 0 instruction(s) in non-entry functions

[ tid 21328 @ 3.902s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1294 ] Finished OptiX initialization [ tid 21328 @ 3.902s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1306 ] Starting to create shapes and acceleration structures [ tid 21328 @ 3.902s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1314 ] Starting to read PLY meshes [ tid 21328 @ 4.007s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1317 ] Finished reading PLY meshes [ tid 21328 @ 4.008s e:\pbrt-v4\src\pbrt\gpu\aggregate.cpp:1364 ] Starting to create IASes for 3 instance definitions `

pierremoreau commented 3 years ago

thanks for your patience, should that be reported as a bug, and will it be fixed in the next branch?

You are welcome 🙂

There is no need to report it as a separate bug: you already reported it here, and I am just adding some information to your report. As to when it will be fixed, it is hard to say how long it will take to 1) understand why it is going wrong, and 2) how to fix it. You could maybe rename this issue to something like "Crash in OptiXAggregate::buildBVHForTriangles when rendering transparent-machines/frame1266.pbrt" now that we know a bit more about the issue.

Regarding the dragon scene in Debug, I just cancelled it after 42 minutes of running, and it was still parsing the scene…

jakoaltrd commented 3 years ago

There is no need to report it as a separate bug: you already reported it here, and I am just adding some information to your report. As to when it will be fixed, it is hard to say how long it will take to 1) understand why it is going wrong, and 2) how to fix it. You could maybe rename this issue to something like "Crash in OptiXAggregate::buildBVHForTriangles when rendering transparent-machines/frame1266.pbrt" now that we know a bit more about the issue.

issue renamed! does that mean gpu implementation is at an early stage in pbrt-v4? some features are not complete, right?

mmp commented 3 years ago

Confirmed--I see this crash on Windows as well (though not with Ubuntu.) These seem related to recent work to better-parallelize things before rendering begins. As a temporary work-around, it looks like running with --nthreads 1 causes it to work fine; this shouldn't slow things down too much when rendering with the GPU. However, I will dig into this and try to figure it out.

@jakoaltrd there were a bunch of problems with building pbrt in the first place earlier in this bug report. Are all those resolved? Or more to the point, is there anything that needs to be fixed in pbrt?

jakoaltrd commented 3 years ago

nvcc fatal : Option '--ptx (-ptx)' is not allowed when compiling for multiple GPU architectures make[2]: [CMakeFiles/optix.cu.dir/build.make:82: CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx] Error 1 make[1]: [CMakeFiles/Makefile2:914: CMakeFiles/optix.cu.dir/all] Error 2 make: *** [Makefile:160: all] Error 2

as I had mentioned before, when I built pbrt-v4 on ubuntu, it failed all the time like above, I think this may be a bug or something, do others have this issue? or what is the problem with this, how to solve this? ubuntu20.04, rtx3070, cuda11.4, OptiX7.3, cmake3.17.1.

jakoaltrd commented 3 years ago

Scanning dependencies of target optix.cu [ 2%] Building CUDA object CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx nvcc fatal : Option '--ptx (-ptx)' is not allowed when compiling for multiple GPU architectures make[2]: [CMakeFiles/optix.cu.dir/build.make:82: CMakeFiles/optix.cu.dir/src/pbrt/gpu/optix.ptx] Error 1 make[1]: [CMakeFiles/Makefile2:914: CMakeFiles/optix.cu.dir/all] Error 2 make: *** [Makefile:160: all] Error 2

@mmp as I said before, I still can't successfully build pbrt-v4 on ubuntu, I think this may be a bug, I didn't know why this happen, if so , I may report it as a bug! ubuntu20.04 , RTX3070, CUDA11.4, OptiX7.3, CMake3.17.1

mmp commented 3 years ago

Can you send the exact commands that you're typing? On ubuntu20.04, if I run:

% cd /tmp
% git clone --recursive https://github.com/mmp/pbrt-v4.git
% mkdir build
% cd build
% cmake -DPBRT_OPTIX7_PATH=/home/mmp/optix-7.3.0  ..
% make -j32

then pbrt builds successfully. That is with CUDA 11.2, Optix7.3 and cmake 3.16.3, so not quite the same setup as you have. Can you report what happens if you run those commands, with the optix path updated accordingly for your system? Perhaps this is an issue with how pbrt builds with CUDA 11.4..

jakoaltrd commented 3 years ago

Can you send the exact commands that you're typing? On ubuntu20.04, if I run:

% cd /tmp
% git clone --recursive https://github.com/mmp/pbrt-v4.git
% mkdir build
% cd build
% cmake -DPBRT_OPTIX7_PATH=/home/mmp/optix-7.3.0  ..
% make -j32

then pbrt builds successfully. That is with CUDA 11.2, Optix7.3 and cmake 3.16.3, so not quite the same setup as you have. Can you report what happens if you run those commands, with the optix path updated accordingly for your system? Perhaps this is an issue with how pbrt builds with CUDA 11.4..

but when I build it on windows with 11.4, it works fine, and I set the optix in cmakelist, so in the source dir I just run

cmake .. make -j32 then it gets this error:

/home/jakoaltrd/Desktop/pbrt-v4/src/pbrt/util/float.h(507): error: more than one conversion function from "__half" to a built-in type applies:
function "__half::operator float() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(204): here
function "__half::operator short() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(222): here
function "__half::operator unsigned short() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(225): here
function "__half::operator int() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(228): here
function "__half::operator unsigned int() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(231): here
function "__half::operator long long() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(234): here
function "__half::operator unsigned long long() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(237): here
function "__half::operator __nv_bool() const"
/usr/local/cuda/targets/x86_64-linux/include/cuda_fp16.hpp(241): here

2 errors detected in the compilation of "/home/jakoaltrd/Desktop/pbrt-v4/src/pbrt/cmd/pspec_gpu.cpp". make[2]: [CMakeFiles/pbrt_lib.dir/build.make:420: CMakeFiles/pbrt_lib.dir/src/pbrt/cmd/pspec_gpu.cpp.o] Error 1 2 errors detected in the compilation of "/home/jakoaltrd/Desktop/pbrt-v4/src/pbrt/materials.cpp". make[2]: [CMakeFiles/pbrt_lib.dir/build.make:277: CMakeFiles/pbrt_lib.dir/src/pbrt/materials.cpp.o] Error 1 2 errors detected in the compilation of "/home/jakoaltrd/Desktop/pbrt-v4/src/pbrt/pbrt.cpp". make[2]: *** [CMakeFiles/pbrt_lib.dir/build.make:342: CMakeFiles/pbrt_lib.dir/src/pbrt/pbrt.cpp.o] Error 1 /home/jakoaltrd/Desktop/pbrt-v4/src/pbrt/textures.cpp(1326): warning: variable "filterOptions" was set but never used

mmp commented 3 years ago

Hm, it looks like something may have changed in CUDA 11.4. Could you try changing line 507 of util/float.h to:

        return (float)__ushort_as_half(h) == (float)__ushort_as_half(v.h);

and see if that fixes it? I will install CUDA 11.4 tomorrow and look at this further then.

jakoaltrd commented 3 years ago

Hm, it looks like something may have changed in CUDA 11.4. Could you try changing line 507 of util/float.h to:

        return (float)__ushort_as_half(h) == (float)__ushort_as_half(v.h);

and see if that fixes it? I will install CUDA 11.4 tomorrow and look at this further then.

I had changed the util/float.h in src/pbrt dir, this time it got another error, the error begins here:

[ 34%] Building CXX object CMakeFiles/pbrt_lib.dir/src/ext/gtest/gtest-all.cc.o
[ 34%] Building CXX object CMakeFiles/pbrt_lib.dir/src/ext/lodepng/lodepng.cpp.o
[ 34%] Building CXX object CMakeFiles/pbrt_lib.dir/src/ext/rply/rply.cpp.o
[ 34%] Linking CUDA device code CMakeFiles/pbrt_lib.dir/cmake_device_link.o
[ 34%] Linking CXX static library libpbrt_lib.a
[ 35%] Built target pbrt_lib
make: *** [Makefile:146: all] Error 2
jakoaltrd@jakoaltrd-ZERO:~/Desktop/pbrt-v4/build1$ 
mmp commented 3 years ago

FWIW I haven't been able to reproduce any build issues with CUDA 11.4 (and ubunutu 20.04, optix 7.3, etc.) pbrt's continuous builds on github now include CUDA 11.4 in the build matrix and it builds fine there as well.

pierremoreau commented 3 years ago

@mmp The program no longer crashes (yay!), but it seems to be stuck on waiting for non-area light futures consumption.

Tested with Visual Studio 2019 16.11.2, CUDA: 11.3.1, OptiX: 7.2.0, and after 50 minutes (in Release mode!) of running pbrt.exe --gpu --log-level verbose "D:\\3D Scenes\\pbrt-v4-scenes\\transparent-machines\\frame1266.pbrt", the main thread is still waiting on some future. Call stack for that main thread:

[External Code]
[Inline Frame] pbrt.exe!std::_State_manager<pbrt::Light>::wait() Line 759
    at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\future(759)
[Inline Frame] pbrt.exe!pbrt::Future<pbrt::Light>::Wait() Line 369
    at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.h(369)
[Inline Frame] pbrt.exe!pbrt::Future<pbrt::Light>::Get() Line 362
    at D:\Softwares\pbrt-v4\src\pbrt\util\parallel.h(362)
pbrt.exe!pbrt::BasicScene::CreateLights(const pbrt::NamedTextures & textures, std::map<int,pstd::vector<pbrt::Light,pstd::pmr::polymorphic_allocator<pbrt::Light>> *,std::less<int>,std::allocator<std::pair<int const ,pstd::vector<pbrt::Light,pstd::pmr::polymorphic_allocator<pbrt::Light>> *>>> * shapeIndexToAreaLights) Line 1273
    at D:\Softwares\pbrt-v4\src\pbrt\scene.cpp(1273)
pbrt.exe!pbrt::WavefrontPathIntegrator::WavefrontPathIntegrator(pstd::pmr::memory_resource * memoryResource, pbrt::BasicScene & scene) Line 129
    at D:\Softwares\pbrt-v4\src\pbrt\wavefront\integrator.cpp(129)
pbrt.exe!pbrt::RenderWavefront(pbrt::BasicScene & scene) Line 26
    at D:\Softwares\pbrt-v4\src\pbrt\wavefront\wavefront.cpp(26)
pbrt.exe!main(int argc, char * * argv) Line 268
    at D:\Softwares\pbrt-v4\src\pbrt\cmd\pbrt.cpp(268)
[External Code]
mmp commented 3 years ago

Sigh... This should be fixed now with 4fa5af5eed5e3cf62c92c76c33e2fc781d057f7a. Thanks for the heads up...

pierremoreau commented 3 years ago

That new commit fixed it up, and now the scene renders properly! Thanks for the quick fix!

@AaronChenJH You might want to open a separate bug report, if you haven't already, as that bug is still present (though it seems to have move around a bit).