Compiling fortran on portable device

  • Fortran
  • Thread starter geouke
  • Start date
  • #1
9
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!
 

Answers and Replies

  • #2
34,964
6,715
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.
 
  • #3
phinds
Science Advisor
Insights Author
Gold Member
16,900
7,863
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.
 
  • #4
34,964
6,715
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.
 
  • #5
145
0
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.
 
  • #6
phinds
Science Advisor
Insights Author
Gold Member
16,900
7,863
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.
 
  • #7
9
0
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
 
  • #8
145
0
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.
 

Related Threads on Compiling fortran on portable device

  • Last Post
Replies
4
Views
4K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
9
Views
8K
Replies
1
Views
2K
  • Last Post
Replies
6
Views
2K
Replies
2
Views
5K
Replies
2
Views
14K
Replies
3
Views
9K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
10
Views
3K
Top