Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Fortran compilers

Status
Not open for further replies.

geesamand

Mechanical
Jun 2, 2006
688
0
0
US
I'm trying to resuscitate an old command-line analysis program that was last compiled in an 8-bit mode. It runs on 32-bit Windows OS's but not 64-bit Windows versions. We have the source code, done in Fortran 90 I assume because it's mostly free of line numbers.

I downloaded a compiler (mingw) but so far I'm unsuccessful in compiling. It's probably not fully installed so I'm not done there yet.

That said, has anyone else successfully brought forth and old program and recompiled it? What compiler did you use?

Thanks,

David
 
Replies continue below

Recommended for you

I am told by the FORTRAN people here that Gfortran (GNU Fortran, replacement for the rubbish g77) is a modern, viable compiler. Recompiling old Fortran programs using modern Fortran compilers is usually a walk in the park, given how stupidly simple the language is. If it doesn't compile, there are bugs in it that have gone unnoticed. If it connects to some cutesy graphical library that the original environment provided, you're onto a loser.

- Steve
 
Sounds very likely. Fortran (like C and C++) has no concept of graphics - they all come from (generally proprietary) libraries. Visual Basic might have some built-in graphics stuff based on MS graphics libs, but I've not used it. Possibly worth a look. I think it's free too, or at least an "Express" version may be free.

You may be better off going back to the program's original requirements and creating something in a more modern environment. If it's doing some file input, data processing and results presentation, I'd be tempted to suggest an interpreted language suce as Matlab (which costs money) or one of the free substitutes (octave, or python with suitable maths and graphics add-ons).



- Steve
 
Yeah, I wasn't specific but this is a very small scope "project" - we have kept this program around but I know a re-write is out of the question.
Our IT programming staff is booked out 2 years right now.

I was simply trying to recompile into a 16-bit executable (is currently 8-bit) so that we wouldn't need a shell emulator to continue using this program on 64-bit workstations.

David
 
Our company is not very large - we have an IT department that has two people supporting the servers, mobile devices, and workstations and two application developers that do customizations to our ERP system and custom web-based applications on our Intranet. As you probably know, once a company gets into customizing their applications, they stay busy.
 
You might want to look for a Windows 32-bit virtual machine, which could run on top of your current operating system.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
I did - My IT director was very concerned with how it creates and entirely second virtual workstation, with all of the due requirements for network connections, logins to the domain, etc. I think a 3rd party shell emulator designed for this makes more sense.
 
Yeah, I remember trying to get help out of my IT department. They started laying off people when the backlog got down to ten years.

A more recent employer is running a POS system they bought in 1972, on modern IBM hardware, through Linux and multiple layers of emulation. My experience with that horrid, undocumented patchwork makes me appreciate your IT Director's reticence.

... but come to think of it, every IT Director I've encountered was basically a Useless Impediment. I capitalized the phrase because they work so hard at it.

Can you get the project authorized as an Engineering Project, not under control of IT in any way? You might still be able to get a little off-line help from the IT staff, but understand that helping you on company time would be a Career Decision for them. They teach that in IT Director School.










Mike Halloran
Pembroke Pines, FL, USA
 
Well the emulator option seems to be working, disaster avoided for now.

It may be possible to bring the code forward and recompile using gfortran but I'm still bewildered by the old code and variety of code styles in these old files. Doesn't resemble any of the F77 I did back in college.

David
 
[ponder]Mike, is that 'POS' for Point of Sale or Piece of Sh*t?



"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
It was originally a Point Of Sale system, but it was hacked and extended and patched to be everything to everyone. It does POS at retail counters, plus inventory control, purchasing, personnel, accounts payable, accounts receivable, ERP, and every other IT computer function, for a meta- company and eight separate companies spread over ~15 locations in ~8 states, and manages to do all of it, including the POS, rather badly, so it's also a Piece Of Shit.

Now, they're in a position where they can't fix it, because the long term users scream if any of the counterintuitive and bizarre keystroke sequences they've memorized are changed even a little bit. They don't even look at the screen to navigate the system, mostly because the screen prompts are misleading or missing.

I tried to map it. It seems to have pieces and subfunctions that I've seen in other AS/400 based systems, but there isn't a menu system linking it all together. It's like they stole a piece from one place and another piece from another place, and so on, which is sort of what they did, as functions were added over the years by different generations of folks who were used to doing things in different ways.

I had them add a simple derivative menu option for me. It took a couple of days, and worked as I had asked. ... but none of my coworkers could see it. IT had to add that menu option individually for every user who would like to have it. ... word of mouth was the only way to find out about the existence of menu options that might be of use to you. The perfect menu suite for my uses is probably still hidden in there, somewhere.







Mike Halloran
Pembroke Pines, FL, USA
 
Well the emulator option seems to be working, disaster avoided for now.

As my old boss was fond of saying: A problem postponed is a problem half solved. You haven't solved your problem, you've just put off the inevitable to a later date.

An anecdote from my experiences over the years:

When I first started working for my current employer (1990), Matlab was not as ubiquitous as it is today. It was seen as a tool for people with serious data analysis and reduction needs. So it was popular in our controls (matrix maths) and NVH (signal analysis) departments. A colleague of mine had written huge amounts of Matlab extensions (in C) to speed up the tasks that standalone Matlab had problems with. So we had a large toolbox of (largely undocumented) C functions to recompile each time Matlab moved through a version barrier that prevented the existing binaries from working. The original author made several hacks to allow the original (obsolete) code to be recompiled - the hacks got dirtier and dirtier. Then he left. By now the department was handing out (selling) compiled binaries to customers - compiled binaries from an uncontrolled, hacked source that nobody understood or even knew how to recompile. I told the manager on many occasions that there will be a point where it all falls over and he should be investing in getting this code into the modern era and under some kind of control and have someone in charge of it. But immediate gains outweighed long-term strategy, as is always the case.



- Steve
 
That's a nice story but it does not apply to this analysis program and our company. I could explain the differences but it's irrelevant.
 
If I am faced with the need to bring it forward yet again, we would subcontract the work out to properly skilled individuals. It wouldn't be left to a mechanical engineer like me.
 
I've had good luck with sending one-off programs to cottage programmers to do in their basement. I've done it 3 different times and gotten slick, well-documented code and compiled executables back all three times. I found them on the internet. Exchanged e-mails to establish a relationship, called them to discuss terms and expectations, then got the results on time. I know others have had the opposite experience with Internet free-lancers, but it has worked for me for relatively small, old Fortran programs.

David Simpson, PE
MuleShoe Engineering

"Belief" is the acceptance of an hypotheses in the absence of data.
"Prejudice" is having an opinion not supported by the preponderance of the data.
"Knowledge" is only found through the accumulation and analysis of data.
The plural of anecdote is not "data"
 
Status
Not open for further replies.
Back
Top