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 

compile F77 code with ftn: array bound error

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



Joined: 16 Aug 2012
Posts: 1

PostPosted: Thu Aug 16, 2012 1:35 pm    Post subject: compile F77 code with ftn: array bound error Reply with quote

Dear All,
I am trying to compile HWM93 model ( ftp://nssdcftp.gsfc.nasa.gov/models/atmospheric/hwm93/ ) using ftn95 personal edition, but it gives me at compile-time a set of errors like

*** Array subscript for first rank of PB, 26, is greater than the declared
upper bound, 1

Is it possible to compile this model (which is F77 code) by playing
some options i.e. without source code modification? (I have a plenty
of code - except HWM93 - with such 'features', so modification will
cause a lot of old F77 code).

PS
This code is compiled with FPS4.0 without errors. The errors are due to array bounds checks (which is in F90, but not in F77).
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Tue Aug 21, 2012 2:35 am    Post subject: Reply with quote

You could try ftn95 /? in the command prompt to see a list of compiler options.
To overcome the old dimension a(1) syntax, the following compile option should overcome this for subroutine and function arguments:
ftn95 program /Old_arrays

John
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Aug 21, 2012 1:53 pm    Post subject: Reply with quote

I'm a big fan of Fortran 77, as a lot of the newer stuff either duplicates what is already there, or proposes an alternative - often, in my view, no better or probably worse than the original. However, when I took a look at the source code for which the link was given I was completely appalled - nobody could maintain or update code written like that.

Good luck to you Zolotovo, you are going to need it!

Eddie
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Thu Aug 23, 2012 2:06 am    Post subject: Reply with quote

Eddie,

That was the way some codes developed, when we only had the 026 card punch! The IDE is a long way from those difficult days.

John
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Aug 23, 2012 10:07 am    Post subject: Reply with quote

John,

I never wrote code like that.

Mind you, as far as compiling and running goes, it's probably quite fast.

When you see code like that from NASA, it turns you into a believer that the moon landings WERE filmed in a studio!

Eddie
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