Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

[help]: Print statement and SIGBUS error?

Li_Dong
Beginner
743 Views
Dear all,
I am writing an implementation of Delaunay triangulation and Voronoi diagram. And I am facing a strange error, that is if I add a print statement before some subroutine (line 522 in DelaunayAndVoronoi.F90), there is no error, but if not, SIGBUS or segmentation error will occur.
My code can be obtained through
git clone git://github.com/dongli/DelaunayAndVoronoi.git
then go into "UnitTest" dir and type "make".
PS: If youdon't have installed NetCDF library, you can comment out "use NFWrap" and "DelaunayAndVoronoi_Output" subroutine in DelaunayAndVoronoi.F90, and also the object dependency in Makefile.
Thanks for any help!
Cheers,
DONG Li
0 Kudos
1 Reply
Li_Dong
Beginner
743 Views
I have found the bug, which hides very deeply.
When I use recursive subroutine, I declare two version of a variable "found" and "realFound", which should be merged. The judging condition for using which one is buggy. Now the bug has gone. : ) If you are interested, you can check out my code managered by git.
Cheers,
DONG Li
0 Kudos
Reply