Floating Point Error Stack Fault
Support View previous topic :: View next topic Author Message JohnMansellJoined: 10 May 2006Posts: 18Location: Darlington Posted: Tue Sep 28, 2010 1:47 pm Post subject: Floating Point Stack Fault, slink problems 0. I've got 32-bit XP, SP3, ft995 5.50. It's a Dell Dimension 8250, so its a few years old. 1. On my PC, slink crashes with AV (fgetc) when in interactive mode (it writes the * to the console, then crashes). It works on another machine with identical hardware with XP, SP3. It works OK with command line arguments, so my makefile works. 2 a. When I run the executables, I get a floating stack fault. On another computer, the executables run OK. 2 b. When I run the crashing program via sdbg, it crashes with floating point error in a routine that reads an integer array from a disk file (NOT the place reported in the original traceback). In fact, in this routine, all variables are of type integer. 3. In another project, I have not encountered any problems with the floating point stack problem. Any clues? Are the AV and FP stack fault part of the same thing, or are they separate issues? Back to top JohnMansellJoined: 10 May 2006Posts: 18Location: Darlington Posted: Tue Sep 28, 2010 5:22 pm Post subject: Further digging. I have found another PC where slink falls over with an AV. This is the dump of the error ########## Runtime error from program:c:\salford\ftn95\slink.exe Access Violation The instruction at address 1001b39d attempted to read from location 006e006d 1001b1e8 fgetc [+01b5] 1001bb0c fgets [+0278] 00402398 readCommand(
LearningModern CodeNetworkingOpen SourceStorageToolsDeveloper TypeEmbedded SystemsGame DevMediaTechnical, Enterprise, HPCWebOSAll ToolsAndroid*HTML5Linux*OS X*Windows*ResourcesCode SamplesContact SupportDocumentationFree SoftwareIntel Registration CenterProduct ForumsSDKsResourcesPartner with IntelAcademic ProgramPartner SpotlightBlack Belt DeveloperDeveloper MeshInnovator ProgramSuccess StoriesLearnBlogBusiness TipsEventsVideosSupportContact SupportDeveloper EvangelistsFAQsForums Search form Search You are hereHome › Forums › IntelĀ® Software Development Products › IntelĀ® Visual Fortran Compiler for Windows* FacebookLinkedInTwitterDiggDeliciousGoogle Plus What does "Floating Point Stack Check" mean What does "Floating Point Stack Check" mean ferrad Fri, 02/03/2006 - 21:38 http://forums.silverfrost.com/viewtopic.php?p=8185&sid=53b36460eadd98abe7890d9a42f1506c My code was merrily running along for a few minutes, then suddenly stopped in the debugger with a "Floating Point Stack Check", and took me to the offending line, which is a calculation: Code: new_flux(isol) = . d1_curr*h*(d0*(temp_res-temperature(istage,ifluid))-sume)/ . (d0*d1_curr + h*(d1_curr*sqrt(delt_loc) + d0*delt_loc)) Is https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/275223 the line too complex? Why only now after happily executing it hundreds of times before? Adrian RSS Top 13 posts / 0 new Last post For more complete information about compiler optimizations, see our Optimization Notice. ferrad Fri, 02/03/2006 - 22:26 I tried breaking this calc up onto two lines, then it just stopped again later on another line with the same error. Adrian Top Tim P. Fri, 02/03/2006 - 23:04 If you are using a compilation for x87 code (e.g. ifort 32-bit with no SSE options, such as -QxW, or maybe when using -Op or -fltconsistency), it looks like the compiler has exceeded the stack register size (8 items on stack). This would be likely to be a compiler bug, as the compiler should be tracking stack size. If so, reducing optimizat
for sprites, which make no use of 80x87 instructions. When testing the assembler routines with a C/C++ program (BC++ 4.01) http://stackoverflow.com/questions/29433518/floating-point-error-gfortran everything works fine unless I don't make use of float's. If I do so, after some seconds the program floating point crashes with the error: "Floating point error: stack fault". All assembler procedures called by the C/C++ program use the following code: LOCALS .MODEL LARGE C Procedure PROC C FAR floating point error USES DS, SI, DI ;Save the 'important' registers ... Procedure ENDP assistance! Chris (Hamburg, Germany) Mon, 11 Jan 1999 03:00:00 GMT Page 1 of 1 [ 1 post ] Relevant Pages 1. Floating point error: Stack fault 2. Floating point error: Stack fault 3. "Floating point formats not linked" error 4. Question about "Floating point error : Domain" 5. Floating point optimization "annoyance" 6. "floating point formats not linked" 7. Are Floating Point Constants "constant" 8. floating-point numbers..."precision" 9. TC++: "floating point formats not linked" 10. "PCH creation point" error 11. Error "free"-ing "malloc"-ed memory 12. "Floating point formats n Powered by phpBB Forum Software
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up floating point error gfortran up vote 0 down vote favorite I am trying to debug a Fortran program. To catch floating point errors, I'm using the following compiler options for gfortran 4.9.0: FFLAGS1 = -std=f2003 -ffree-form -fdefault-real-8 -fdefault-double-8 \ -Ofast -fall-intrinsics -fcheck=all -m64 \ -fno-trapping-math -c \ -ffpe-trap=invalid,zero,overflow,underflow,precision,denormal -Wall With these options, the program fails at this line: read(ctrlUnit,*) slope_fasst, aspect when trying to read these inputs: 10.0 70.0 If I remove -ffpe-trap=invalid,zero,overflow,underflow,precision,denormal from the compiler options, it reads the following line just fine. Both variables are declared as real(8). In the input file, I've tried spaces, commas, etc. but see no changes. Does anyone have a suggestion? fortran gfortran floating-point-exceptions share|improve this question edited Apr 4 '15 at 12:45 francescalus 9,15341538 asked Apr 3 '15 at 13:52 user2417662 193 2 What error does the run-time system report ? And what is the program trying to read when it fails ? –High Performance Mark Apr 3 '15 at 13:56 I'm trying to read these inputs: 10.0 70.0 –user2417662 Apr 3 '15 at 17:20 Are those the only inputs that are being read? That's somewhat interesting, in that 10.0 and 70.0 are exactly representable in either single- or double-precision IEEE 754 floating-point, so it must be errors that occur during the conversion process that trigger the trap. Ideally, the conversion from string would only set the inexact flag if the final result is not exactly representable. –Mark Dickinson Apr 3 '15 at 18:36 If @user2417662 comes