Compiling fortran on portable device

In summary, Mark44 is looking for advice on finding a portable device that is amenable to running his Fortran program. The program takes an input from the user (an incorrect luminance value read from a 40 year old light meter) and calculates shutter speeds and f-stops to give proper exposure. The device must be simple enough that it can fit in his pocket and have an OS that has a readily available Fortran compiler.
  • #1
geouke
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!
 
Technology news on Phys.org
  • #2
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
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
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
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
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.
 
  • #7
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
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.
 

1. What is the purpose of compiling Fortran on a portable device?

The purpose of compiling Fortran on a portable device is to be able to run Fortran programs and applications on a mobile or tablet device. This allows for greater flexibility and accessibility in using Fortran for scientific or engineering purposes on-the-go.

2. Can any portable device be used to compile Fortran?

No, not all portable devices are capable of compiling Fortran. It requires a certain level of processing power and memory to run the necessary compilers and tools. It is best to check the specifications of your device before attempting to compile Fortran.

3. What are the steps involved in compiling Fortran on a portable device?

The steps involved in compiling Fortran on a portable device may vary depending on the specific device and operating system. However, the general steps include installing a Fortran compiler, setting up the necessary environment variables, writing and saving the Fortran code, and using the compiler to create an executable file.

4. Are there any limitations to compiling Fortran on a portable device?

One limitation of compiling Fortran on a portable device is the potential lack of available resources compared to a desktop or laptop computer. This may result in longer compilation times or the inability to compile larger or more complex programs. Additionally, some portable devices may not be able to handle certain features or libraries used in Fortran programs.

5. Are there any tips for optimizing Fortran compilation on a portable device?

To optimize Fortran compilation on a portable device, it is recommended to close any unnecessary applications or programs to free up memory and processing power. It may also be helpful to use a text editor specifically designed for coding to make the process smoother. Additionally, breaking up larger programs into smaller, more manageable files can also help with compilation on a portable device.

Similar threads

  • Programming and Computer Science
Replies
1
Views
3K
Replies
152
Views
5K
  • STEM Academic Advising
Replies
13
Views
4K
  • General Engineering
Replies
19
Views
10K
Replies
4
Views
30K
Back
Top