<div dir="ltr"><div><div>Hi,<br></div>Thanks for the report. Seems like something is happening in the ITK code. Are other non cuda tests failing?<br>Did you also compile ITK with C++11? BTW, why is it required?</div><div>Best regards,</div>Simon<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 21, 2017 at 3:20 PM, Mathis Hoffmann <span dir="ltr"><<a href="mailto:mathis.hoffmann@fau.de" target="_blank">mathis.hoffmann@fau.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id="m_-4264960079297999483geary-body"><div>Hello,</div><div><br></div><div>I was able to build RTK using Cuda 9 on an Arch Linux machine with gcc 6.4 with only small modifications:</div><div><div> </div><div> #============================<wbr>=============================</div><div>diff --git a/cmake/nvcc-check.cmake b/cmake/nvcc-check.cmake</div><div>index c625b421..0e5c34e9 100644</div><div>--- a/cmake/nvcc-check.cmake</div><div>+++ b/cmake/nvcc-check.cmake</div><div>@@ -46,6 +46,9 @@ if(CUDA_FOUND)</div><div> if((CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC) OR APPLE)</div><div> # Compatible gcc can be checked in host_config.h</div><div> set(GCC_PATH "")</div><div>+ if(${CUDA_VERSION} VERSION_GREATER "8.99")</div><div>+ FIND_GCC(GCC_PATH "6" "4")</div><div>+ endif()</div><div> if(${CUDA_VERSION} VERSION_GREATER "6.99")</div><div> FIND_GC
C(GCC_PATH "4" "9")</div><div> endif()</div></div><div><br></div><div><br></div><div>In addition I had to set CMAKE_CXX_FLAGS to -std=gnu++11 manually in the ccmake dialog (unfortunately I was not able to integrate this in the top-level CMakeLists so far, CMake simply ignored it there..).</div><div><br></div><div>So far, so good. Unfortunately all Cuda tests fail with the same segfault. For example, rtkimportcudatest finishes with</div><div><br></div><div><div>****** Case 1: unsigned short ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div><br></div><div>****** Case 2: int ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB<
/div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div><br></div><div>****** Case 3: float ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div><br></div><div>****** Case 4: double ******</div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br></div><div>Test PASSED! </div><div><br></div><div>Error per Pixel = 0</div><div>MSE = 0</div><div>PSNR = infdB</div><div>QI = 1</div><div><br></div><div><br><u></u><div>Test PASSED! </div><div>Segmentation fault (core dumped)</div></div><div><br></div><div>To further investigate what is going wrong here, I ran valgrind. I think the most important message is this:</div><div><br></div><div><div>==30633== Process terminating with default action of signal 11 (SIGSEGV): dumping core</div><div>==30633== Access not within mapped region at address 0x8</div><div>==30633== at 0x12240072: (anonymous namespace)::<wbr>ObjectFactoryBasePrivateInitia<wbr>lizer::~<wbr>ObjectFactoryBasePrivateInitia<wbr>lizer() (in /home/mathis/dev/RTK/RTK-bin/<wbr>bin/libRTK.so)</div><div>==30633== by 0x1402B7B1: __cxa_finalize (in /usr/lib/<a href="http://libc-2.26.so" target="_blank">libc-2.26.so</a>)</div><div>==30633== by 0x121771D3: ??? (in /home/mathis/dev/RTK/RTK-bin/<wbr>bin/libRTK.so)</div><div>==30633== by 0x400FB92: _dl_fini (in /usr/lib/<a href="http://ld-2.26.so" target="_blank">ld-2.26.so</a>)</div><div>==30633== by 0x1402B447: __run_exit_handlers (in /usr/lib/<a href="http://libc-2.26.so" target="_blank">libc-2.26.so</a>)</div><div>==30633== by 0
x1402B499: exit (in /usr/lib/<a href="http://libc-2.26.so" target="_blank">libc-2.26.so</a>)</div><div>==30633== by 0x14014F50: (below main) (in /usr/lib/<a href="http://libc-2.26.so" target="_blank">libc-2.26.so</a>)</div><div>==30633== If you believe this happened as a result of a stack</div><div>==30633== overflow in your program's main thread (unlikely but</div><div>==30633== possible), you can try to increase the size of the</div><div>==30633== main thread stack using the --main-stacksize= flag.</div><div>==30633== The main thread stack size used in this run was 8388608.</div></div><div><br></div><div>I've put the full log here: <a href="https://pastebin.com/CBjJmUpB" target="_blank">https://pastebin.com/<wbr>CBjJmUpB</a></div><div><br></div><div>Does someone have any idea, what is going wrong here?</div><div><br></div><div>Thanks for any help!</div><span class="HOEnZb"><font color="#888888"><div>Mathis</div></font></span></div></div></div><br>______________________________<wbr>_________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/rtk-users</a><br>
<br></blockquote></div><br></div>