Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issues trying to recompile old F77 Unix code for Windows XP

Status
Not open for further replies.

JohnBradford

Technical User
Jul 31, 2009
1
US
I've got an old Fortran code that will currently compile and run just fine on an SGI Unix workstation using f77. I need to get this code recompiled for use on Windows platforms (XP).

I have been using the Compaq Visual Fortran SE (6.6) compiler and trying to create a "Fortran Console Application". When I compile the code, I get a number of errors that appear only as warnings on the SGI (primarily about re-declarations of arrays sizes - I did not write this code). I am able to resolve all of these errors and get the code compiled. The executable will then run, but the results are all garbage. I do not think I changed anything to cause the errors and it looks like all of the inputs are being read in properly.

My first question is if there are any specific flags/options I should be setting in the CVF compiler that will enable better compatibility with the SGI source code?

I can provide the source code to anyone interested in working this. I'd be most appreciative. I'd offer to pay someone to resolve this from my company, but I think that is against forum rules.

Thanks!
 
Why not get something like gfortran or g95. They're free and they can build f77 without any problems.

I don't know anything about SGI - is it a 16/32 or 64 bit platform?

Possibilities on array sizes. It is quite common to have spelling errors with common block members and not realize it. For instance
Code:
INTEGER DEFAULTVALUE(5)
REAL INITIALVALUE(5)
COMMON /VALS/INITIALVALUE, DEFUALTVALUE
It may be declared like that in some places and DEFAULTVALUE may be correctly spelt in other places. In places where the spelling is incorrect, you get 6 reals instead of 5 reals and 5 integers. The simple way around it is to put the entire common block and its member declarations in an include file. Just include it wherever you need it and such problems will just cease.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top