How to call FORTRAN from Python
HOWTO convert a commandline FORTRAN program to a GUI Python program by Harry Mangalam, UCI email@example.com
Harry, may I post this on my http://intersci.ss.uci.edu/wiki/ instructional/research wiki? Its just what I need, some of my students too... - Show quoted text -
On Thu, Jul 31, 2008 at 11:07 AM, Harry Mangalam <firstname.lastname@example.org> wrote:
>From the intro at CaR (Computers and Research) talk: <http://forums.es.uci.edu/BioBB/viewforum.php?f=10>
Despite many reports of its demise, FORTRAN remains quite alive. For straight numerical computation, FORTRAN compilers are among the best available and there are a number of Open Source FORTRAN compilers available - F77, GNU FORTRAN, G95 are the ones that roll off the tip of my brain immediately. The Intel FORTRAN compiler for Linux, MacOSX, and Windows is also free for academic use and is very fast on Intel hardware.
However, despite its advantages for numerical code, it's not a particularly attractive program for dealing with humans. Handling commandline options, interfacing with GUI widget sets, and connecting with relational databases are among those things it's not particularly suited for.
In order to make existing FORTRAN programs more amenable to current uses, I've written a HOWTO on wrapping a FORTRAN program with Python, to use Python's interoperations with other programming languages, and other abilities to make for a more usable experience. It requires almost no modification of the existing FORTRAN code besides converting the main function into a callable subroutine (generally a 1 line modification). The FORTRAN code continues to run as fast as it ever did but using Python, you can easily add many features to the FORTRAN that would otherwise be quite difficult.
The HOWTO is currently hosted here: <http://moo.nac.uci.edu/~hjm/fd_rrt1d/index.html>
Thanks to Vladimir Mandelshtam for allowing his code to be used as the basis for this HOWTO.
-- Harry Mangalam - Research Computing, NACS, E2148, Engineering Gateway, UC Irvine 92697 949 824-0084(o), 949 285-4487(c) --
This is what I did so far http://intersci.ss.uci.edu/wiki/index.php/How_to_ca...
Doug White to Harry M
Login under your real name and edit as you please and create other pages as you please thanks, Doug White