Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what GUI for your fortran programs?

692 views
Skip to first unread message

ralf.schaa

unread,
Feb 6, 2010, 5:47:28 PM2/6/10
to
I am thinking of developing a GUI (including OpenGL) for a Fortran
program - specifically I think of using Java for this task, given the
platform independence. Now, I do not know Java or C/C++ and older
threads recommend a simple way by communicating through text files ...
more fancy ways seem quite elaborate via C/C++.
Has anything changed since Fortran 2003, given the C-
interoperability?

Are other languages than Java more suitable for this task? What do you
use?

Cheers
-Ralf

Arjan

unread,
Feb 6, 2010, 7:00:09 PM2/6/10
to
Try constructing something in TCL/TK. Immediate results! The resulting
gui works on Windows, linux and Mac with the same source code! I
constructed a very nice gui for my ASCII-input-file-based fortran
program. With some help from the people on comp.lang.tcl... Browse the
wiki!

Arjan

Gib Bogle

unread,
Feb 7, 2010, 12:28:50 AM2/7/10
to

Faced with this question I decided to try the Python option, using the access to
Qt provided by PyQt. This comes with an easy-to-use program for creating a UI
with the usual widgets, called QtDesigner. My program is built as a dynamic
link library (DLL, or .so) which is loaded by Python, making the Fortran
subroutines available (those that are exposed). In my case it was very simple,
because I just need to call the subroutine that executes the program.

I chose to communicate on-the-fly model output to the GUI via sockets, which are
read at the Python end in separate threads. Currently I'm doing only simple 2D
graphics (using PyQwt), but at some point I'll probably venture into 3D graphics
using one of the Python libraries that provides OpenGL functions.

baf

unread,
Feb 7, 2010, 10:54:35 PM2/7/10
to

dislin (dislin.de) has a nice set of gui widgets that do the job without
having to interface with a different language. Works under linux,
windows, and osx.

aerogeek

unread,
Feb 8, 2010, 10:39:21 AM2/8/10
to

I use excel for my GUI's. Backend is fortran's dll and the GUI is VBA
based form. Though it only works for Windows!!

Arjen Markus

unread,
Feb 9, 2010, 5:58:26 AM2/9/10
to

The Wiki Arjan is referring to is: http://wiki.tcl.tk

There are a number of ways you can use Tcl/Tk to create GUIs for
Fortran programs:

- The GUI prepares all the input for the Fortran program
- The GUI takes over the dialogue that the Fortran program normally
presents
- The GUI uses the Fortran routines directly to do the computations
- Create the GUI from within the Fortran program using the facilities
offered by Tcl/Tk.

For the first nothing special is required. For the second, the Tclers'
Wiki
provides a few examples (though they may require some help from the
Fortran
program - due to buffering the output!).

For the third (and - incomplete! - the fourth), have a look at my Ftcl
project -
http://ftcl.sf.net.

Regards,

Arjen

senhortomas

unread,
Feb 9, 2010, 3:54:25 PM2/9/10
to

I have placed a ZIP file containing a demonstration (MENU.EXE) of a
textual user interface at the link:

http://www.corrugraphics.com/TUI/Fortran TUI.zip


You may download the file and view my demo. I would be interested in
comments regarding its utility. The code was written and compiled
with Microsoft Powerstation and uses some internal subprograms unique
to that particular compiler. Some difficulties I have had with
converting the code to CVF 6.5 can be read about on the thread How to
print Extended ASCII Characters:

http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/7bce0094d9f082bd#

senhortomas

unread,
Feb 9, 2010, 4:00:13 PM2/9/10
to
On Feb 6, 4:47 pm, "ralf.schaa" <ralf.sc...@gmail.com> wrote:

I have placed a ZIP file containing a demonstration (MENU.EXE) of a


textual user interface at the link:

http://www.corrugraphics.com/TUI/Fortran_TUI.zip

user1

unread,
Feb 12, 2010, 8:52:21 AM2/12/10
to
senhortomas wrote:
>
>
> You may download the file and view my demo. I would be interested in
> comments regarding its utility. The code was written and compiled
> with Microsoft Powerstation and uses some internal subprograms unique
> to that particular compiler. Some difficulties I have had with
> converting the code to CVF 6.5 can be read about on the thread How to
> print Extended ASCII Characters:
>


Obsolete compiler and OS limits utility. For TUI work it may be more
portable to use pdcurses. It is, of course, written in C.

I stumbled onto a pdcurses module for fortran at
http://www.qimr.edu.au/davidD/Curses/testcurs.f95

albert

unread,
Feb 15, 2010, 1:58:41 AM2/15/10
to
I compile my Fortran Subroutines into dlls using gfortran, and write
guis to call the dlls and display results etc. using the Free Pascal
Compiler, Lazarus Project ide.
As Gfortran and Lazarus are available for Linux, Windows and Mac, it's
a cross platform solution. Also, Lazarus is released under the LGPL
licence so it's possible to build comercial software with it.

Regards

Albert

Mark Westwood

unread,
Feb 23, 2010, 3:56:52 AM2/23/10
to
I went through the pain of plugging one of our Fortran codes into a
GUI written in Java. I'll resign if I'm asked to do it again. Java
is not cross-platform, Java runs only on a JVM. If you are new to
Java I strongly suggest you do not start by trying to learn how to
interface Java with libraries (dll, so, lib .a, whatever) written in
other languages.

Regards

Mark

GaryScott

unread,
Feb 23, 2010, 10:32:11 AM2/23/10
to

Bradly Associates are pleased to announce the availability of GINO
v7.5.

A brief list of New features include:

* 32bit and 64bit versions supplied as one package

* Full Vista/Windows 7 support with better UAC control

* New driver for creating Flash/SWF files

* New XP/Vista icons in GINOMENU/GINOMENU Studio

* Full documentation now available on web-site

* New cursor types in GINOMENU

* Block commenting/uncommenting in GINOMENU Studio

* Block indenting/outdenting in GINOMENU Studio

* New look and feel to GINOMENU Studio

* Improved interface to C run-time libraries

* Ready for Visual Studio 2010

* Code-Signed Installation

BUY YOUR UPGRADE ON-LINE BEFORE 22ND MARCH 2010 AND RECEIVE A 25%
DISCOUNT.

Full details can be found at:

http://www.gino-graphics.com/version75.html

Abdul

unread,
Feb 24, 2010, 1:50:06 PM2/24/10
to

Try

Japi - an open source free software GUI toolkit allowing the
development of platform independent applications

http://www.japi.de/

AA

ralf.schaa

unread,
Feb 24, 2010, 5:10:54 PM2/24/10
to
Thanks all for your insights and suggestions - I am not sure yet and I
guess I will play a bit with some of the suggestions made!
Cheers
-Ralf

Gib Bogle

unread,
Feb 24, 2010, 8:22:26 PM2/24/10
to
Mark Westwood wrote:
> I went through the pain of plugging one of our Fortran codes into a
> GUI written in Java. I'll resign if I'm asked to do it again. Java
> is not cross-platform, Java runs only on a JVM. If you are new to
> Java I strongly suggest you do not start by trying to learn how to
> interface Java with libraries (dll, so, lib .a, whatever) written in
> other languages.
>
> Regards
>
> Mark

Python was pretty painless on Windows, and is probably just as easy on Linux
(I'll find out soon).

Gib

0 new messages