Fortran Compiling fortran on portable device

  • Thread starter Thread starter geouke
  • Start date Start date
  • Tags Tags
    Device Fortran
AI Thread Summary
To run a Fortran program on a portable device, it's essential to choose hardware compatible with a Fortran compiler. The program, which processes user input from an old light meter to calculate shutter speeds and f-stops, could be adapted to various programming languages if necessary. Options for inexpensive portable devices include older mobile phones, tablets, or compact computers like Raspberry Pi, which support Fortran compilers. Additionally, there are Fortran compilers available for Android devices, making them a viable choice. Ultimately, the user needs to select hardware that meets their requirements while ensuring compiler availability for successful execution.
geouke
Messages
9
Reaction score
0
I have a fortran program I would like to run on some kind of portable device. Ideally, it would be an older and cheaper device. Does anyone have any advice?

The program takes an input from the user (which is an incorrect luminance value read from a 40 year old light meter) and feeds it through a simple calibration curve and outputs a list of shutter speeds (corresponding to those available on a camera) and calculated f-stops to give proper exposure.

I describe the program to make sure that it is known how simple the calculations are and how low-tech the device would need to be. Preferably it would be something that could fit in my pocket. Thanks!
 
Technology news on Phys.org
You don't say what kind of computer and operating system you're running your Fortran program on, or what kind of portable device and OS. This is important information for what you're trying to do.

To get an executable, a Fortran compiler of some kind was used, with its output being a binary that targets Windows (or possibly Linux) on a PC, or one of the Mac OSes on a Mac.

To get something that would run on the portable device, you would need a compiler whose output was compatible with the OS on the device. The calculations are of little concern, since your Fortran code could be ported to any of a number of other computer languages, and that ported code could be compiled for the device, assuming there is a compiler that targets that device.

Alternatively, your program could could be cross-compiled - that is, the compiler runs on a PC or Mac, and outputs a binary that can be downloaded to the device.

More details about the hardware, please.
 
Mark, your post is correct of course, but I think you're somewhat missing the point. He's asking if anyone can advise him what is some inexpensive portable device that is amenable to running his program, which was written in Fortran. He has no specific hardware in mind and doesn't care, he just wants something portable to give him his translation.
 
What I was saying, though, was whatever hardware he deems to be satisfactory, he's going to have to find a Fortran compiler for it. Having Fortran source code is almost irrelevant here, since what he has in mind could be coded in just about any language.
 
I am going to agree with Mark44 here.

Use one of the translation tools, convert the code into something that is commonly supported on modern devices, and you will save yourself a lot of trouble.
 
Mark44 said:
What I was saying, though, was whatever hardware he deems to be satisfactory, he's going to have to find a Fortran compiler for it. Having Fortran source code is almost irrelevant here, since what he has in mind could be coded in just about any language.

Oh, I agree w/ that, and I agree that he doesn't seem to realize that, but again, he doesn't want to chose the hardware, he wants us to do that, it seems.

Anyway, until we hear from the OP again, we're not going to be any help.
 
My apologies for any confusion. I stated what I was doing so there would be no question that just about any piece of hardware (even a programmable calculator) would have no problem doing the calculations.

I am looking for a hardware advisement. Something older/cheaper, with an OS that has a readily available fortran compiler would be perfect. Although, I guess I could just write a program for my TI-86... I hate to do that though since I occasionally write similar scripts and am not interested in learning the calculator's programming language :P
 
If it has to take input, not be a calculator, run a desktop programming environment and drive a screen or printer, you are looking at some kind of cheap mobile phone, tablet or new "credit card size" computers like Raspberry Pi.

If you can somehow automate the input and output I guess you could use any of the dozens of embedded systems like washing machine controllers. Maybe look at an Arduino?

edit: There are fortran compilers for Android which is a popular OS for tablets and phones. Raspberry Pi recommend fedora linux which of course being a full desktp linux OS, has fortran compilier support. I however know nothing about the language and can't tell you which dialect it is or what features it supports.
 
Back
Top