Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Compiling fortran on portable device

  1. Jul 22, 2012 #1
    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!
  2. jcsd
  3. Jul 22, 2012 #2


    Staff: Mentor

    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.
  4. Jul 22, 2012 #3


    User Avatar
    Gold Member

    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.
  5. Jul 22, 2012 #4


    Staff: Mentor

    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.
  6. Jul 23, 2012 #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.
  7. Jul 23, 2012 #6


    User Avatar
    Gold Member

    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.
  8. Jul 23, 2012 #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
  9. Jul 23, 2012 #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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for Compiling fortran portable Date
Fortran Fortran77 data compiler problem Jan 19, 2017
Fortran Fortran compile error I can't figure out Jan 15, 2016
Fortran [FORTRAN] FFT of delta function, issue w/ MKL & Intel compiler Aug 14, 2015
Fortran [FORTRAN]Compiler if statements Nov 4, 2014
Can we compile fortran 90 on external hdd? Jun 22, 2014