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

Fortran alternative to Matlab 'system' command

  1. Jun 8, 2012 #1
    Hi,

    I have been trying to run a linux executable (written in fortran77) into my another code (also in fortran77). In Matlab, I did it with "system('./<filename>')". But I am not able to do it in fortran script as './' is not simply working for me.

    I will really appreciate if anyone could tell me what alternative command I can use to execute an executable file into fortran code. A quick response will be extremely helpful and highly appreacited.

    Thanks in advance.

    mushi
     
  2. jcsd
  3. Jun 9, 2012 #2

    NascentOxygen

    User Avatar

    Staff: Mentor

    The command (if there is one in your Fortran) may not be "system()" but I have no idea of other possibilities. The "./" prefix is nothing to do with the language; it's a shortcut in Unix that says the executable is located in the current directory. So if the executable is not located in what the op sys will see as the current directory, you should specify the full pathname instead, e.g., '/mnt/hd1/usr/mushi/bin/filename'.
     
  4. Jun 11, 2012 #3
    Scroll down this

    http://www.sdsc.edu/~tkaiser/f90.html

    to see real random number generator Fortran programs written in Fortran 77 and Fortran 90.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Fortran alternative to Matlab 'system' command
  1. Alternative power (Replies: 13)

  2. RFAC in Fortran (Replies: 4)

Loading...