UCL / STIR

Software for Tomographic Image Reconstruction
http://stir.sourceforge.net/
Other
114 stars 95 forks source link

FBP3DRP hang with gcc 7.3.1 with -O2 and -O3 #272

Open KrisThielemans opened 6 years ago

KrisThielemans commented 6 years ago

Peter Bloomfield reported on the STIR mailing list a problem with FBP3DRP hanging on Discovery MI data

Duncan-Edwards commented 6 years ago

I recompiled the code with the -g option, and the following gdb .../Build/src/analytic/FBP3DRP/FBP3DRP (gdb) run FBP3DRP.par and the program aborted at the same point 'Forward projection of missing data first from ring No -1 to -1' wih the following FBP3DRP: .../src/recon_buildblock/ForwardProjectorByBinUsingRayTracing_Siddon.cxx:231: static bool stir::ForwardProjectorByBinUsingRayTracing::proj_Siddon(stir::Array<4, float>&, const stir::VoxelsOnCartesianGrid&, const stir::ProjDataInfoCylindrical*, float, float, float, float, float, int, int, float, int, float, float, bool) [with int symmetry_type = 1]: Assertion `difference.z() >= -.00001F' failed.

Dumping the stack, (gdb) info stack

0 0x00007ffff64f10e0 in raise () from /lib64/libc.so.6

1 0x00007ffff64f26c1 in abort () from /lib64/libc.so.6

2 0x00007ffff64e96fa in __assert_fail_base () from /lib64/libc.so.6

3 0x00007ffff64e9772 in __assert_fail () from /lib64/libc.so.6

4 0x0000000000767692 in stir::ForwardProjectorByBinUsingRayTracing::proj_Siddon<1> (Projptr=..., Bild=..., proj_data_info_ptr=0xd099d0, cphi=1, sphi=0, delta=0, s_in_mm=388.837097, R=387.5, rmin=-1, rmax=-1, offset=0, num_planes_per_axial_pos=1,

axial_pos_to_z_offset=0, norm_factor=1, restrict_to_cylindrical_FOV=true) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/ForwardProjectorByBinUsingRayTracing_Siddon.cxx:231

5 0x0000000000760232 in stir::ForwardProjectorByBinUsingRayTracing::forward_project_all_symmetries_2D (this=0xce61d0, pos_view=..., pos_plus90=..., pos_min180=..., pos_min90=..., image=..., min_axial_pos_num=-1, max_axial_pos_num=-1,

min_tangential_pos_num=-207, max_tangential_pos_num=207) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/ForwardProjectorByBinUsingRayTracing.cxx:1258

6 0x000000000075f82f in stir::ForwardProjectorByBinUsingRayTracing::forward_project_view_plus_90_2D (this=0xce61d0, pos_view=..., pos_plus90=..., image=..., min_axial_pos_num=-1, max_axial_pos_num=-1, min_tangential_pos_num=-207, max_tangential_pos_num=207)

at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/ForwardProjectorByBinUsingRayTracing.cxx:1065

7 0x000000000075c887 in stir::ForwardProjectorByBinUsingRayTracing::actual_forward_project (this=0xce61d0, viewgrams=..., density=..., min_axial_pos_num=-1, max_axial_pos_num=-1, min_tangential_pos_num=-207, max_tangential_pos_num=207)

at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/ForwardProjectorByBinUsingRayTracing.cxx:215

8 0x000000000075ba66 in stir::ForwardProjectorByBin::forward_project (this=0xce61d0, viewgrams=..., density=..., min_axial_pos_num=-1, max_axial_pos_num=-1, min_tangential_pos_num=-207, max_tangential_pos_num=207)

at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/ForwardProjectorByBin.cxx:141

9 0x000000000075b88c in stir::ForwardProjectorByBin::forward_project (this=0xce61d0, viewgrams=..., image=..., min_axial_pos_num=-1, max_axial_pos_num=-1) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/ForwardProjectorByBin.cxx:104

10 0x0000000000739a0c in stir::FBP3DRPReconstruction::do_forward_project_view (this=0x7fffffffbff0, viewgrams=..., new_min_axial_pos_num=-1, new_max_axial_pos_num=71, orig_min_axial_pos_num=0, orig_max_axial_pos_num=70)

at /home/peter/Src/STIR/STIR_V3.0/STIR/src/analytic/FBP3DRP/FBP3DRPReconstruction.cxx:815

11 0x000000000073a4fc in stir::FBP3DRPReconstruction::do_process_viewgrams (this=0x7fffffffbff0, viewgrams=..., new_min_axial_pos_num=-1, new_max_axial_pos_num=71, orig_min_axial_pos_num=0, orig_max_axial_pos_num=70, image=...)

at /home/peter/Src/STIR/STIR_V3.0/STIR/src/analytic/FBP3DRP/FBP3DRPReconstruction.cxx:1009

12 0x00000000007390a1 in stir::FBP3DRPReconstruction::do_3D_Reconstruction (this=0x7fffffffbff0, image=...) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/analytic/FBP3DRP/FBP3DRPReconstruction.cxx:699

13 0x0000000000738503 in stir::FBP3DRPReconstruction::actual_reconstruct (this=0x7fffffffbff0, target_image_ptr=...) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/analytic/FBP3DRP/FBP3DRPReconstruction.cxx:559

14 0x00000000007954c3 in stir::AnalyticReconstruction::reconstruct (this=0x7fffffffbff0, target_image_sptr=...) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/AnalyticReconstruction.cxx:220

15 0x00000000007953f2 in stir::AnalyticReconstruction::reconstruct (this=0x7fffffffbff0) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/AnalyticReconstruction.cxx:206

16 0x0000000000714051 in main (argc=2, argv=0x7fffffffc3d8) at /home/peter/Src/STIR/STIR_V3.0/STIR/src/analytic/FBP3DRP/FBP3DRP.cxx:50

(gdb)

Duncan-Edwards commented 6 years ago

Executed valgrind /home/peter/Src/STIR/STIR_V3.0/STIR/Build/src/analytic/FBP3DRP/FBP3DRP FBP3DRP.par Program aborted at the same point 'Forward projection of missing data first from ring No -1 to -1' with INFO: Determined voxel size by dividing default_bin_size (2.0147) by zoom FBP3DRP: /home/peter/Src/STIR/STIR_V3.0/STIR/src/recon_buildblock/ForwardProjectorByBinUsingRayTracing_Siddon.cxx:231: static bool stir::ForwardProjectorByBinUsingRayTracing::proj_Siddon(stir::Array<4, float>&, const stir::VoxelsOnCartesianGrid&, const sti::ProjDataInfoCylindrical, float, float, float, float, float, int, int, float, int, float, float, bool) [with int symmetry_type = 1]: Assertion `difference.z() >= -.00001F' failed. ==16694== ==16694== Process terminating with default action of signal 6 (SIGABRT) ==16694== at 0x63D20E0: raise (in /lib64/libc-2.26.so) ==16694== by 0x63D36C0: abort (in /lib64/libc-2.26.so) ==16694== by 0x63CA6F9: assert_fail_base (in /lib64/libc-2.26.so) ==16694== by 0x63CA771: assert_fail (in /lib64/libc-2.26.so) ==16694== by 0x767691: bool stir::ForwardProjectorByBinUsingRayTracing::proj_Siddon<1>(stir::Array<4, float>&, stir::VoxelsOnCartesianGrid const&, stir::ProjDataInfoCylindrical const, float, float, float, float, float, int, int, float, int, float, floa, bool) (ForwardProjectorByBinUsingRayTracing_Siddon.cxx:231) ==16694== by 0x760231: stir::ForwardProjectorByBinUsingRayTracing::forward_project_all_symmetries_2D(stir::Viewgram&, stir::Viewgram&, stir::Viewgram&, stir::Viewgram&, stir::VoxelsOnCartesianGrid const&, int, int, int, int) onst (ForwardProjectorByBinUsingRayTracing.cxx:1258) ==16694== by 0x75F82E: stir::ForwardProjectorByBinUsingRayTracing::forward_project_view_plus_90_2D(stir::Viewgram&, stir::Viewgram&, stir::VoxelsOnCartesianGrid const&, int, int, int, int) const (ForwardProjectorByBinUsingRayTracing.cxx:105) ==16694== by 0x75C886: stir::ForwardProjectorByBinUsingRayTracing::actual_forward_project(stir::RelatedViewgrams&, stir::DiscretisedDensity<3, float> const&, int, int, int, int) (ForwardProjectorByBinUsingRayTracing.cxx:215) ==16694== by 0x75BA65: stir::ForwardProjectorByBin::forward_project(stir::RelatedViewgrams&, stir::DiscretisedDensity<3, float> const&, int, int, int, int) (ForwardProjectorByBin.cxx:141) ==16694== by 0x75B88B: stir::ForwardProjectorByBin::forward_project(stir::RelatedViewgrams&, stir::DiscretisedDensity<3, float> const&, int, int) (ForwardProjectorByBin.cxx:104) ==16694== by 0x739A0B: stir::FBP3DRPReconstruction::do_forward_project_view(stir::RelatedViewgrams&, int, int, int, int) const (FBP3DRPReconstruction.cxx:815) ==16694== by 0x73A4FB: stir::FBP3DRPReconstruction::do_process_viewgrams(stir::RelatedViewgrams&, int, int, int, int, stir::VoxelsOnCartesianGrid&) (FBP3DRPReconstruction.cxx:1009) ==16694== ==16694== HEAP SUMMARY: ==16694== in use at exit: 60,697,638 bytes in 43,185 blocks ==16694== total heap usage: 235,897 allocs, 192,712 frees, 608,641,862 bytes allocated ==16694== ==16694== LEAK SUMMARY: ==16694== definitely lost: 560 bytes in 1 blocks ==16694== indirectly lost: 30,004 bytes in 80 blocks ==16694== possibly lost: 0 bytes in 0 blocks ==16694== still reachable: 60,667,074 bytes in 43,104 blocks ==16694== of which reachable via heuristic: ==16694== newarray : 2,119,736 bytes in 271 blocks ==16694== suppressed: 0 bytes in 0 blocks ==16694== Rerun with --leak-check=full to see details of leaked memory ==16694== ==16694== For counts of detected and suppressed errors, rerun with: -v ==16694== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Abort (core dumped)