View previous topic :: View next topic |
Author |
Message |
saturn
Joined: 22 Apr 2008 Posts: 12
|
Posted: Tue Dec 29, 2009 1:00 pm Post subject: FTN95 and 64 bit OS |
|
|
I am getting a "Floating Point Stack Fault" run-time error when running an FTN95 compiled program under 64-bit Windows XP and Windows 7. The program works fine with 32-bit version of XP and 7.
When debugging, the Debugger stops at a line in the code, which has no relevance to the error type.
Any solutions on this? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Dec 29, 2009 3:32 pm Post subject: |
|
|
Is it possible to reduce the problem to a few lines in a fully working program?
If you can post this in the forum then someone may be able to help. |
|
Back to top |
|
|
saturn
Joined: 22 Apr 2008 Posts: 12
|
Posted: Wed Dec 30, 2009 11:56 am Post subject: |
|
|
Thanks for the prompt response Paul.
It's not possible to reduce the problem to a few lines in a fully working program. The software consists of 1000s of routines in several source files.
What I can do is provide the extended list file complied with EXPLIST option as well as the corresponding source file with subrotuine where the crash occurs for you to have a look.
Is this OK? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Thu Dec 31, 2009 8:57 am Post subject: |
|
|
This kind of error message usually occurs when a function is called without its return type being declared. For example you might have a function named foo returning a integer value whilst the compiler expects it to return a real value if it is not explicitly declared.
This would be trapped by using IMPLICIT NONE and you can set this on the FTN95 command line or you can configure the compiler to use it all the time.
Alternatively you could post a few lines of your Fortran code in the vicinity of the failure. |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 445 Location: Manchester
|
Posted: Thu Jan 28, 2010 11:06 am Post subject: |
|
|
This may be an incidence of an issue we have uncovered relating to the way x64 OSs handle underflows. You would see a floating point stack and the indicated position is not always the one that causes the issue (it can be the next floating point instruction). This can typically happen when a number is converted to an integer.
Would you be willing to test a salflibc for us? |
|
Back to top |
|
|
saturn
Joined: 22 Apr 2008 Posts: 12
|
Posted: Fri Feb 05, 2010 12:59 pm Post subject: |
|
|
Yes. |
|
Back to top |
|
|
erom
Joined: 26 Oct 2009 Posts: 4 Location: Los Angeles, CA. USA
|
Posted: Sat Feb 06, 2010 4:36 am Post subject: |
|
|
At first my Fortran example program did not FTN95 link ok on a win 7 quad 64 bit intel box
'Rebuild' returned lines like:
<clip>
Compilation completed with no errors.
Linking...
Access violation: ...
<clip>
The fix:
From the Plato top ruler, 'Project' > 'Properties...' > Debugging > uncheck, at least, all debugging option boxes, including, from 'Checking code' to 'Fail on underflow'. Then click 'Apply to All'
Now rebuild returns:
<clip>
Compilation completed with no errors.
Linking...
Creating executable: Release\Win32\myfile.exe
Linking completed.
My program example is an F95 main that calls 8 legacy F77 subroutines.
Thanks to all at SilverFrost !!
Last edited by erom on Tue Jun 15, 2010 5:09 am; edited 11 times in total |
|
Back to top |
|
|
fmolina
Joined: 15 Oct 2009 Posts: 10 Location: Buenos Aires, Argentina
|
Posted: Tue Feb 09, 2010 8:41 pm Post subject: |
|
|
Hello all,
I am also trying to run FTN95 on XP 64 bit. Tried on three different machines, the last one with all new installation. A very simple program like this:
Code: | program test1
real*8 a
a = 1.00000001d0
write (*, *) a - 1.0d0
end program test1
|
gives the following response when compiling either Chekmate, Debug or Release profiles (in this case unchecking all options as mentioned by erom:
Quote: |
Compiling file: test1.f95
Access violation:
The instruction at address 00538dfe attempted to write to location 7fff0000
00538da8 allocate_constant_entity(<ptr>structᅣconstant_entity) [+0056]
005355e6 inst_memref(void) [+0373]
00535f3b send_instruction(<ptr>structᅣpending_instruction) [+1a9b]
0053500f complete_emit(void) [+0250]
00534bb5 emitr(enumᅣmachine_instruction,enumᅣcpu_register) [+002a]
0047a60d do_function_top(<ptr>structᅣtree_record) [+0603]
0051e1aa code_generator(<ref>structᅣtree_ptr) [+2022]
00416e11 end_function(int) [+10f0]
eax=7fff0000 ebx=005c1bd4 ecx=00000004
edx=00000000 esi=08af37f4 edi=7fff0000
ebp=0384f2d0 esp=0384f2ac IOPL=0
ds=002b es=002b fs=0053
gs=002b cs=0023 ss=002b
flgs=00210206 [NC EP NZ SN DN NV]
0360/2020 TSTK=4 [ ]
00538dfe rep
00538dff movsb
Compilation completed with no errors.
Linking...
*** Could not open: C:\Documents and Settings\electro\My Documents\FTN95 Examples\Release\Win32\test1.obj
|
However, it compiles and runs OK on Win7 64 bits!
OSes:
Win XP x64 Pro SP2 w/latest updates
Win 7 pro with latest updates
(same machine, dual boot)
FTN95 personal v 5.40
Any ideas?
Regards,
Fernando |
|
Back to top |
|
|
|