Segfault when extracting isosurface
Hi Ingo, thanks for sharing your UMESH versions of the NASA datasets. I was trying to extract an isosurface from the small dataset, with the command in the readme, but hit upon a segfault:
paulm@gcn3 15:20 /projects/1/viz/paulm/nasa-3dfun-lander$ ~/c/umesh-git/build/umeshExtractIsoSurface lander-small-rho-9000.umesh -iso 0.2 --obj test.obj
loading umesh from lander-small-rho-9000.umesh
done loading, found Umesh(#verts=144.9M,#tets=766.4M,#pyrs=47.5k,#wedges=32.0M,scalars=yes(name='rho')) ... now extracting iso-surface
Segmentation fault (core dumped)
paulm@gcn3 15:20 /projects/1/viz/paulm/nasa-3dfun-lander$ gdb ~/c/umesh-git/build/umeshExtractIsoSurface core.19951
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /nfs/home4/paulm/c/umesh-git/build/umeshExtractIsoSurface...done.
warning: core file may not match specified executable file.
[New LWP 19956]
[New LWP 19961]
[New LWP 19951]
[New LWP 19966]
[New LWP 19954]
[New LWP 19958]
[New LWP 19955]
[New LWP 19960]
[New LWP 19968]
[New LWP 19964]
[New LWP 19963]
[New LWP 19957]
[New LWP 19967]
[New LWP 19965]
[New LWP 19959]
[New LWP 19962]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/home/paulm/c/umesh-git/build/umeshExtractIsoSurface lander-small-rho-9000.umes'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000449640 in umesh::process (out=..., in=..., tet=..., isoValue=0.200000003) at /home/paulm/c/umesh-git/umesh/extractIsoSurface.cpp:354
354 const vec4f a(in->vertices[tet.x],in->perVertex->values[tet.x]);
warning: File "/nfs/admin/hpc/arch/AVX/RedHatEnterpriseServer7/EB_production/2020/software/GCCcore/9.3.0/lib64/libstdc++.so.6.0.28-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
To enable execution of this file add
add-auto-load-safe-path /nfs/admin/hpc/arch/AVX/RedHatEnterpriseServer7/EB_production/2020/software/GCCcore/9.3.0/lib64/libstdc++.so.6.0.28-gdb.py
line to your configuration file "/home/paulm/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/paulm/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
Missing separate debuginfos, use: debuginfo-install glibc-2.17-307.el7.1.x86_64
(gdb) bt
#0 0x0000000000449640 in umesh::process (out=..., in=..., tet=..., isoValue=0.200000003) at /home/paulm/c/umesh-git/umesh/extractIsoSurface.cpp:354
#1 0x000000000044ad09 in umesh::doIsoSurfaceTets (out=..., mutex=..., in=..., begin=47900672, end=47901696, isoValue=0.200000003) at /home/paulm/c/umesh-git/umesh/extractIsoSurface.cpp:494
#2 0x000000000044ae32 in umesh::<lambda(size_t, size_t)>::operator()(size_t, size_t) const (__closure=0x7ffec9e410b0, begin=47900672, end=47901696) at /home/paulm/c/umesh-git/umesh/extractIsoSurface.cpp:524
#3 0x000000000044b9af in umesh::<lambda(size_t)>::operator()(size_t) const (this=0x7ffec9e40fe0, blockID=46778) at /home/paulm/c/umesh-git/umesh/parallel_for.h:98
#4 0x0000000000451776 in tbb::internal::parallel_for_body<umesh::parallel_for_blocked(size_t, size_t, size_t, const TASK_T&) [with TASK_T = umesh::extractIsoSurface(umesh::UMesh::SP, float)::<lambda(size_t, size_t)>; size_t = long unsigned int]::<lambda(size_t)>, long unsigned int>::operator()(const tbb::blocked_range<unsigned long> &) const (this=0x2b1f47497560, r=...)
at /sw/arch/RedHatEnterpriseServer7/EB_production/2020/software/tbb/2020.1-GCCcore-9.3.0/include/tbb/parallel_for.h:177
#5 0x0000000000450bd3 in tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, tbb::internal::parallel_for_body<umesh::parallel_for_blocked(size_t, size_t, size_t, const TASK_T&) [with TASK_T = umesh::extractIsoSurface(umesh::UMesh::SP, float)::<lambda(size_t, size_t)>; size_t = long unsigned int]::<lambda(size_t)>, long unsigned int>, const tbb::auto_partitioner>::run_body(tbb::blocked_range<unsigned long> &) (
this=0x2b1f47497540, r=...) at /sw/arch/RedHatEnterpriseServer7/EB_production/2020/software/tbb/2020.1-GCCcore-9.3.0/include/tbb/parallel_for.h:115
#6 0x000000000044fe50 in tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> >::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, tbb::internal::parallel_for_body<umesh::parallel_for_blocked(size_t, size_t, size_t, const TASK_T&) [with TASK_T = umesh::extractIsoSurface(umesh::UMesh::SP, float)::<lambda(size_t, size_t)>]::<lambda(size_t)>, long unsigned int>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> >(tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, tbb::internal::parallel_for_body<umesh::parallel_for_blocked(size_t, size_t, size_t, const TASK_T&) [with TASK_T = umesh::extractIsoSurface(umesh::UMesh::SP, float)::<lambda(size_t, size_t)>; size_t = long unsigned int]::<lambda(size_t)>, long unsigned int>, const tbb::auto_partitioner> &, tbb::blocked_range<unsigned long> &) (this=0x2b1f47497578, start=..., range=...)
at /sw/arch/RedHatEnterpriseServer7/EB_production/2020/software/tbb/2020.1-GCCcore-9.3.0/include/tbb/partitioner.h:438
#7 0x000000000044e969 in tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, tbb::internal::parallel_for_body<umesh::parallel_for_blocked(size_t, size_t, size_t, const TASK_T&) [with TASK_T = umesh::extractIsoSurface(umesh::UMesh::SP, float)::<lambda(size_t, size_t)>]::<lambda(size_t)>, long unsigned int>, const tbb::auto_partitioner>, tbb::blocked_range<long unsigned int> >(tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, tbb::internal::parallel_for_body<umesh::parallel_for_blocked(size_t, size_t, size_t, const TASK_T&) [with TASK_T = umesh::extractIsoSurface(umesh::UMesh::SP, float)::<lambda(size_t, size_t)>; size_t = long unsigned int]::<lambda(size_t)>, long unsigned int>, const tbb::auto_partitioner> &, tbb::blocked_range<unsigned long> &) (this=0x2b1f47497578, start=..., range=...) at /sw/arch/RedHatEnterpriseServer7/EB_production/2020/software/tbb/2020.1-GCCcore-9.3.0/include/tbb/partitioner.h:256
#8 0x000000000044e328 in tbb::interface9::internal::start_for<tbb::blocked_range<long unsigned int>, tbb::internal::parallel_for_body<umesh::parallel_for_blocked(size_t, size_t, size_t, const TASK_T&) [with TASK_T = umesh::extractIsoSurface(umesh::UMesh::SP, float)::<lambda(size_t, size_t)>; size_t = long unsigned int]::<lambda(size_t)>, long unsigned int>, const tbb::auto_partitioner>::execute(void) (this=0x2b1f47497540)
at /sw/arch/RedHatEnterpriseServer7/EB_production/2020/software/tbb/2020.1-GCCcore-9.3.0/include/tbb/parallel_for.h:142
#9 0x00002b1ebbf20a05 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop (this=this@entry=0x2b1f47463e00, context_guard=..., t=0x2b1f47497540, isolation=isolation@entry=0)
at ../../src/tbb/scheduler.h:630
#10 0x00002b1ebbf20ccc in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x2b1f47463e00, parent=..., child=<optimized out>) at ../../include/tbb/task.h:992
#11 0x00002b1ebbf1a167 in tbb::internal::arena::process (this=0x2b1f4748a880, s=...) at ../../src/tbb/arena.cpp:196
#12 0x00002b1ebbf18b30 in tbb::internal::market::process (this=0x2b1f4749b580, j=...) at ../../src/tbb/market.cpp:667
#13 0x00002b1ebbf1527c in tbb::internal::rml::private_worker::run (this=0x2b1f474acf80) at ../../src/tbb/private_server.cpp:266
#14 0x00002b1ebbf15479 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at ../../src/tbb/private_server.cpp:219
#15 0x00002b1ebcbc1ea5 in start_thread () from /lib64/libpthread.so.0
#16 0x00002b1ebc6e68dd in clone () from /lib64/libc.so.6
This is with GCC 9.3.0, CMake 3.16.4, tbb 2020.1, CUDA 11.0.1 (latter not relevant here, I think).
Any clues what might be going on? I double-checked the integrity of the files downloaded from your google drive, plus the decompressed version.