forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTN95 and 64 bit OS

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
saturn



Joined: 22 Apr 2008
Posts: 12

PostPosted: Tue Dec 29, 2009 1:00 pm    Post subject: FTN95 and 64 bit OS Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Tue Dec 29, 2009 3:32 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
saturn



Joined: 22 Apr 2008
Posts: 12

PostPosted: Wed Dec 30, 2009 11:56 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Thu Dec 31, 2009 8:57 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Robert



Joined: 29 Nov 2006
Posts: 445
Location: Manchester

PostPosted: Thu Jan 28, 2010 11:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
saturn



Joined: 22 Apr 2008
Posts: 12

PostPosted: Fri Feb 05, 2010 12:59 pm    Post subject: Reply with quote

Yes.
Back to top
View user's profile Send private message
erom



Joined: 26 Oct 2009
Posts: 4
Location: Los Angeles, CA. USA

PostPosted: Sat Feb 06, 2010 4:36 am    Post subject: Reply with quote

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
View user's profile Send private message
fmolina



Joined: 15 Oct 2009
Posts: 10
Location: Buenos Aires, Argentina

PostPosted: Tue Feb 09, 2010 8:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group