First of all, pardon me if some of the questions I ask seem trivial. I am jumping into Fortran programming after a period of 6-7 years and I am not in touch with many of the current practices. I have the following goals I want to achieve
- Develop a fortran program to solve 15-30 simultaneous Ordinary Differential Equations (ODEs) such that the user of the program is able to input (i) various constants for solving the DEs (ii) another time dependent input function [X(t)] with the result that the mathematical model of ODEs transforms X(t) into Y_predicted(t).
- I also need to optimize the model parameters such that the predicted Y_predicted(t) matches with a user defined Y_experimental(t)
- I also want to develop a 'good' GUI so that a user who is not familiar with programming languages should be able to use the software (inputting data through an 'excel-like' interface, filling in values for constants through the interface, analyzing the results, etc). I am hoping for a good 'look and feel' for the software.
I would like to get your inputs on the following specific questions:
1. I selected Fortran since (i) I am somewhat familiar with it (ii) I am given to understand that while some other options (JEE5 for instance) are good for developing a GUI, they may not be efficient for scientific operations. Am I right in my selection of Fortran? How does Fortran compare with C++ for my kind of applications?
2. What is the cheapest (better yet, free) software that will provide me a integrated environment for (i) writing the program and (ii) developing the GUI, as the next alternative, if I have to use two different options for writing the code and developing GUI, what are my options?
3. Can one write Fortran codes in Visual Basic? If yes, is this the best option considering VB will help me develop the GUI as well?
As you can see I do not have a lot of experience in the area, and really need inputs from you guys on this.
> First of all, pardon me if some of the questions I ask seem > trivial. I am jumping into Fortran programming after a period of 6-7 > years and I am not in touch with many of the current practices. I have > the following goals I want to achieve
> - Develop a fortran program to solve 15-30 simultaneous Ordinary > Differential Equations (ODEs) such that the user of the program is > able to input (i) various constants for solving the DEs (ii) another > time dependent input function [X(t)] with the result that the > mathematical model of ODEs transforms X(t) into Y_predicted(t).
> - I also need to optimize the model parameters such that the predicted > Y_predicted(t) matches with a user defined Y_experimental(t)
> - I also want to develop a 'good' GUI so that a user who is not > familiar with programming languages should be able to use the software > (inputting data through an 'excel-like' interface, filling in values > for constants through the interface, analyzing the results, etc). I am > hoping for a good 'look and feel' for the software.
> I would like to get your inputs on the following specific questions:
> 1. I selected Fortran since (i) I am somewhat familiar with it (ii) I > am given to understand that while some other options (JEE5 for > instance) are good for developing a GUI, they may not be efficient for > scientific operations. Am I right in my selection of Fortran? How does > Fortran compare with C++ for my kind of applications?
> 2. What is the cheapest (better yet, free) software that will provide > me a integrated environment for (i) writing the program and (ii) > developing the GUI, as the next alternative, if I have to use two > different options for writing the code and developing GUI, what are my > options?
> 3. Can one write Fortran codes in Visual Basic? If yes, is this the > best option considering VB will help me develop the GUI as well?
> As you can see I do not have a lot of experience in the area, and > really need inputs from you guys on this.
> Thanks in advance for your help!
It depends on what software you already have on hand. It is not too difficult (except perhaps for passing character variables) to call Fortran code from Visual Basic when the Fortran code is either subroutines or functions placed in a DLL. You can also use Excel and interface it with a Fortran DLL so that the functions in your DLL can be used on the spreadsheet.
Your main constraint apparently is low cost. You can get a (free) copy of VB Express from Microsoft that includes a stripped down version of Visual Studio. This version of the IDE only works with the "VB". Also you have to install much software including the dot net framework and other pre-requisites.
g95 and gfortran are also "free". For use with VB/VBA I recommend the MinGW distributions of this software.
I don't know about an IDE for Fortran. Some people here have recommended Photran. This is based on the Ecllipse - Java framework.
There are other GUI building frameworks that are free such as JAPI or GTK. But these require you to use Java or Tcl/Tk as well.
If you are doing professional software development, IMO, spend the money on professional tools such as Winteractor or GINO.
On Apr 30, 12:01 pm, e p chandler <e...@juno.com> wrote:
<snip>
> If you are doing professional software development, IMO, spend the > money on professional tools such as Winteractor or GINO.
Several of commercial Windows Fortran compilers (Absoft, Intel, Lahey/ Fujitsu, Salford/Silverfrost) let you create at least simple Windows GUI programs entirely in Fortran. I'd recommend trying Quickwin within Intel Visual Fortran. For IVF there is also Xeffort http://www.xeffort.com/ "a free, open-source library for building GUI applications in all flavors of Visual Fortran."
> First of all, pardon me if some of the questions I ask seem > trivial. I am jumping into Fortran programming after a period of 6-7 > years and I am not in touch with many of the current practices. I have > the following goals I want to achieve
> - Develop a fortran program to solve 15-30 simultaneous Ordinary > Differential Equations (ODEs) such that the user of the program is > able to input (i) various constants for solving the DEs (ii) another > time dependent input function [X(t)] with the result that the > mathematical model of ODEs transforms X(t) into Y_predicted(t).
> - I also need to optimize the model parameters such that the predicted > Y_predicted(t) matches with a user defined Y_experimental(t)
> - I also want to develop a 'good' GUI so that a user who is not > familiar with programming languages should be able to use the software > (inputting data through an 'excel-like' interface, filling in values > for constants through the interface, analyzing the results, etc). I am > hoping for a good 'look and feel' for the software.
The best option for easily developing this type of user interface is GINO (fewest lines of very straightforward code). However, it is also the most expensive option. Quickwin is probably the easiest "free" option (at least if you already have IVF or one of it's predecessors in the CVF line), but even it isn't as easy as GINO. GINO provides a spreadsheet-like array grid (text or value) with only around 3 subroutine calls (two for various attributes, headings, and cell sizes and one to create). Version 7 was just released with new rich text formatting capabilities, including hyperlinks, so you can do some pretty sophisticated documentation with it as well as dynamic video- game-like graphics.
> I would like to get your inputs on the following specific questions:
> 1. I selected Fortran since (i) I am somewhat familiar with it (ii) I > am given to understand that while some other options (JEE5 for > instance) are good for developing a GUI, they may not be efficient for > scientific operations. Am I right in my selection of Fortran? How does > Fortran compare with C++ for my kind of applications?
> 2. What is the cheapest (better yet, free) software that will provide > me a integrated environment for (i) writing the program and (ii) > developing the GUI, as the next alternative, if I have to use two > different options for writing the code and developing GUI, what are my > options?
> 3. Can one write Fortran codes in Visual Basic? If yes, is this the > best option considering VB will help me develop the GUI as well?
> As you can see I do not have a lot of experience in the area, and > really need inputs from you guys on this.
> 2. What is the cheapest (better yet, free) software that will provide > me a integrated environment for (i) writing the program and (ii) > developing the GUI, as the next alternative, if I have to use two > different options for writing the code and developing GUI, what are my > options?
<Snip>
Since you are probably developing a code that is a "labour of love" rather than a commercial proposition, and cost is a significant factor, the I can't recommend GINO or Winteracter, as these are expensive, although they do seem to offer a completely Fortran method of writing the GUI front end. Similarly, IVF has a restricted period free trial that is not long enough to get more than a taste for the Quickwin facilities - although I have to say that I never got on with Quickwin when it was an add-on to MS Fortran! If you want to produce a commercial code using free tools, then I suppose that the g95 or gfortran approaches are the most practical. My route to producing a GUI was to learn what I needed to learn using the Silverfrost (formerly Salford) free "personal edition" compiler. You have a choice of developing programs that use .NET as a route to Windows, or alternatively the ClearWin system. The Silverfrost system is complete with an IDE, and apart from an initial "nag" screen, exactly the same as the academic or professional versions. If you think that what you have developed has commercial applicability, then you can always buy the appropriate version and it will compile your code just the same as the free personal edition. For that matter, you can get a version of Winteracter or GINO to interface with it, and it interfaces with C or VB. There is a very great deal more to a GUI than perhaps you realise, however, and writing one is not a task to be undertaken lightly. FInd the download link at www.silverfrost.com Best of luck. Eddie
<edward.bromh...@deletethisbitbinternet.com> wrote: > <snip>> 2. What is the cheapest (better yet, free) software that will provide > > me a integrated environment for (i) writing the program and (ii) > > developing the GUI, as the next alternative, if I have to use two > > different options for writing the code and developing GUI, what are my > > options?
> <Snip>
> Since you are probably developing a code that is a "labour of love" rather > than a commercial proposition, and cost is a significant factor, the I can't > recommend GINO or Winteracter, as these are expensive, although they > do seem to offer a completely Fortran method of writing the GUI front end. > Similarly, IVF has a restricted period free trial that is not long enough to > get more than a taste for the Quickwin facilities - although I have to say > that > I never got on with Quickwin when it was an add-on to MS Fortran! > If you want to produce a commercial code using free tools, then I suppose > that the g95 or gfortran approaches are the most practical. > My route to producing a GUI was to learn what I needed to learn using the > Silverfrost (formerly Salford) free "personal edition" compiler. > You have a choice of developing programs that use .NET as a route to > Windows, or alternatively the ClearWin system. The Silverfrost system > is complete with an IDE, and apart > from an initial "nag" screen, exactly the same as the academic or > professional > versions. If you think that what you have developed has commercial > applicability, > then you can always buy the appropriate version and it will compile your > code > just the same as the free personal edition. For that matter, you can get a > version > of Winteracter or GINO to interface with it, and it interfaces with C or VB. > There is a very great deal more to a GUI than perhaps you realise, however, > and > writing one is not a task to be undertaken lightly. > FInd the download link atwww.silverfrost.com > Best of luck. > Eddie
Yes you can do a GUI with ClearWin, but IMO it's not so easy. I look at it as sending a series of obscure character commands to a very smart graphics terminal. You have to learn its own graphics language. Then send commands and deal with replies. Perhaps those who have spent a lot of time with it have found it easy.
> On Apr 30, 4:49 pm, "Edward N Bromhead" > <edward.bromh...@deletethisbitbinternet.com> wrote: >> <snip>> 2. What is the cheapest (better yet, free) software that will >> provide >> > me a integrated environment for (i) writing the program and (ii) >> > developing the GUI, as the next alternative, if I have to use two >> > different options for writing the code and developing GUI, what are my >> > options?
Certainly you need to decide what relationship fortran is going to have with windows. I wouldn't know if the Fortran Programming Language admits of the existence of the OS called Windows.
>> Since you are probably developing a code that is a "labour of love" >> rather >> than a commercial proposition, and cost is a significant factor, the I >> can't >> recommend GINO or Winteracter, as these are expensive, although they >> do seem to offer a completely Fortran method of writing the GUI front >> end. >> Similarly, IVF has a restricted period free trial that is not long enough >> to >> get more than a taste for the Quickwin facilities - although I have to >> say >> that >> I never got on with Quickwin when it was an add-on to MS Fortran! >> If you want to produce a commercial code using free tools, then I suppose >> that the g95 or gfortran approaches are the most practical. >> My route to producing a GUI was to learn what I needed to learn using the >> Silverfrost (formerly Salford) free "personal edition" compiler. >> You have a choice of developing programs that use .NET as a route to >> Windows, or alternatively the ClearWin system. The Silverfrost system >> is complete with an IDE, and apart >> from an initial "nag" screen, exactly the same as the academic or >> professional >> versions. If you think that what you have developed has commercial >> applicability, >> then you can always buy the appropriate version and it will compile your >> code >> just the same as the free personal edition. For that matter, you can get >> a >> version >> of Winteracter or GINO to interface with it, and it interfaces with C or >> VB. >> There is a very great deal more to a GUI than perhaps you realise, >> however, >> and >> writing one is not a task to be undertaken lightly. >> FInd the download link atwww.silverfrost.com >> Best of luck. >> Eddie
> Yes you can do a GUI with ClearWin, but IMO it's not so easy. I look > at it as sending a series of obscure character commands to a very > smart graphics terminal. You have to learn its own graphics language. > Then send commands and deal with replies. Perhaps those who have spent > a lot of time with it have found it easy.
Clearwin seems to be a good tool for a hobbyist, but there comes a point in time at which you need to address Salford from the inside, and nobody's home at the gate. -- WW
A GUI is a Graphics User Interface. A TUI is a Text User Interface. If the OP really needs a GUI I would recommend getting a commercial tool (Gino, Winteracter etc). There are several free TUI interfaces "out there". We've been giving away two TUI libraries; one that works with MS Fortran for DOS and one that works with CVF Fortran 6.6c for Windows, so far untested on IVF.
>>On Apr 30, 4:49 pm, "Edward N Bromhead" >><edward.bromh...@deletethisbitbinternet.com> wrote:
>>><snip>> 2. What is the cheapest (better yet, free) software that will >>>provide
>>>>me a integrated environment for (i) writing the program and (ii) >>>>developing the GUI, as the next alternative, if I have to use two >>>>different options for writing the code and developing GUI, what are my >>>>options?
> Certainly you need to decide what relationship fortran is going to have with > windows. I wouldn't know if the Fortran Programming Language admits of the > existence of the OS called Windows.
>>>Since you are probably developing a code that is a "labour of love" >>>rather >>>than a commercial proposition, and cost is a significant factor, the I >>>can't >>>recommend GINO or Winteracter, as these are expensive, although they >>>do seem to offer a completely Fortran method of writing the GUI front >>>end. >>>Similarly, IVF has a restricted period free trial that is not long enough >>>to >>>get more than a taste for the Quickwin facilities - although I have to >>>say >>>that >>>I never got on with Quickwin when it was an add-on to MS Fortran! >>>If you want to produce a commercial code using free tools, then I suppose >>>that the g95 or gfortran approaches are the most practical. >>>My route to producing a GUI was to learn what I needed to learn using the >>>Silverfrost (formerly Salford) free "personal edition" compiler. >>>You have a choice of developing programs that use .NET as a route to >>>Windows, or alternatively the ClearWin system. The Silverfrost system >>>is complete with an IDE, and apart >>>from an initial "nag" screen, exactly the same as the academic or >>>professional >>>versions. If you think that what you have developed has commercial >>>applicability, >>>then you can always buy the appropriate version and it will compile your >>>code >>>just the same as the free personal edition. For that matter, you can get >>>a >>>version >>>of Winteracter or GINO to interface with it, and it interfaces with C or >>>VB. >>>There is a very great deal more to a GUI than perhaps you realise, >>>however, >>>and >>>writing one is not a task to be undertaken lightly. >>>FInd the download link atwww.silverfrost.com >>>Best of luck. >>>Eddie
>>Yes you can do a GUI with ClearWin, but IMO it's not so easy. I look >>at it as sending a series of obscure character commands to a very >>smart graphics terminal. You have to learn its own graphics language. >>Then send commands and deal with replies. Perhaps those who have spent >>a lot of time with it have found it easy.
> Clearwin seems to be a good tool for a hobbyist, but there comes a point in > time at which you need to address Salford from the inside, and nobody's home > at the gate.
Silverfrost seems to have substantially made it their own as far as I can tell.
3. The Excel-like MatrixExplorer dialog lets you choose from more than 50 demos.
4. Click "OrdinaryDiffEqu". This example plots a damped driven harmonic oscillator (2 1st order ODEs). The user can play around with the variables and with output settings.
5. Clone the 30 code lines to your own file. They contain the complete dialog as well as numerics and graphics and can easily be extended to your 15-30 ODEs. Short scripts like this are free.
6. Click "Data_Fit" to see a nonlinear least-squares fitting example (here with mouse input of data). Combine it with the ODE solver. Solving this "inverse problem" will require some more fiddling with the ODEs integration parameters, dependent on stability and stiffness of your system.
> First of all, pardon me if some of the questions I ask seem > trivial. I am jumping into Fortran programming after a period of 6-7 > years and I am not in touch with many of the current practices. I have > the following goals I want to achieve
> - Develop a fortran program to solve 15-30 simultaneous Ordinary > Differential Equations (ODEs) such that the user of the program is > able to input (i) various constants for solving the DEs (ii) another > time dependent input function [X(t)] with the result that the > mathematical model of ODEs transforms X(t) into Y_predicted(t).
> - I also need to optimize the model parameters such that the predicted > Y_predicted(t) matches with a user defined Y_experimental(t)
> - I also want to develop a 'good' GUI so that a user who is not > familiar with programming languages should be able to use the software > (inputting data through an 'excel-like' interface, filling in values > for constants through the interface, analyzing the results, etc). I am > hoping for a good 'look and feel' for the software.
> I would like to get your inputs on the following specific questions:
> 1. I selected Fortran since (i) I am somewhat familiar with it (ii) I > am given to understand that while some other options (JEE5 for > instance) are good for developing a GUI, they may not be efficient for > scientific operations. Am I right in my selection of Fortran? How does > Fortran compare with C++ for my kind of applications?
> 2. What is the cheapest (better yet, free) software that will provide > me a integrated environment for (i) writing the program and (ii) > developing the GUI, as the next alternative, if I have to use two > different options for writing the code and developing GUI, what are my > options?
> 3. Can one write Fortran codes in Visual Basic? If yes, is this the > best option considering VB will help me develop the GUI as well?
> As you can see I do not have a lot of experience in the area, and > really need inputs from you guys on this.
> Thanks in advance for your help!
It does depend on how slick an professional you want the program to be. Personally I would use Tcl/Tk. It's free and very easy to write decent GUIs. Some guidance on how to use it can be found at http://wiki.tcl.tk/3359
It contains a library for working with Tcl from within a Fortran program or the other way around. With Tcl/Tk 8.5 (which is the latest version, currently in the final stages of development and release) you can make very nice looking interfaces:
> It contains a library for working with Tcl from within a Fortran > program > or the other way around. With Tcl/Tk 8.5 (which is the latest version, > currently in the final stages of development and release) you can make > very nice looking interfaces:
Running a GUI created by Ftcl would require that Tcl be installed on the user's machine, correct? That what I guess from reading http://ftcl.sourceforge.net/deployment.html . Sometimes one wants a stand-alone program.
> Running a GUI created by Ftcl would require that Tcl be installed on > the user's machine, correct? That what I guess from readinghttp://ftcl.sourceforge.net/deployment.html. Sometimes one wants a > stand-alone program.
Hm, that information may be a trifle old: - If you have a Fortran program using Ftcl, then it suffices to have the initialisation scripts and the shared/dynamic libraries. - If you create a loadable Tcl extension (basically a library that can be loaded into the Tcl/Tk runtime executable), then you will need such runtime executable. But that may be a wrapped runtime.
In short: there is no need to have Tcl/Tk installed on the target machine, just a few initialisation files and a few libraries or not even that.
I should make this more clear in the documentation.
>> Yes you can do a GUI with ClearWin, but IMO it's not so easy. I look >> at it as sending a series of obscure character commands to a very >> smart graphics terminal. You have to learn its own graphics language. >> Then send commands and deal with replies. Perhaps those who have spent >> a lot of time with it have found it easy. > Clearwin seems to be a good tool for a hobbyist, but there comes a point > in time at which you need to address Salford from the inside, and nobody's > home at the gate. > -- > WW
No, it's not easy. And, there do seem to be some horrid pitfalls to fall into. The whole business of programming a GUI is very different from what most people (including me) grew up expecting a Fortran program to look like! My first attempts (at using ClearWin) were abject failures, and I gave up - several times. My later attempts succeeded. It depends on how much effort you are prepared to devote to it - and how much money you are prepared to spend to make life easier. The OP did ask for extreme cheapness, and FTN95pe meets that criterion.
> Certainly you need to decide what relationship fortran is going to have with > windows. I wouldn't know if the Fortran Programming Language admits of the > existence of the OS called Windows.
Nor does any other programming language standard, for that matter, for any OS at all.
> First of all, pardon me if some of the questions I ask seem > trivial. I am jumping into Fortran programming after a period of 6-7 > years and I am not in touch with many of the current practices. I have > the following goals I want to achieve
> - Develop a fortran program to solve 15-30 simultaneous Ordinary > Differential Equations (ODEs) such that the user of the program is > able to input (i) various constants for solving the DEs (ii) another > time dependent input function [X(t)] with the result that the > mathematical model of ODEs transforms X(t) into Y_predicted(t).
> - I also need to optimize the model parameters such that the predicted > Y_predicted(t) matches with a user defined Y_experimental(t)
Write this in Fortran as a standalone program which reads the user-specified bits from a text file. Make the text file format "obvious" (e.g. have a comment before each piece of information saying what it is. And have the Fortran program write the results out in a similar way.
Note: I'm assuming the computational part is effectively a black box - no need for interaction half way through.
> - I also want to develop a 'good' GUI so that a user who is not > familiar with programming languages should be able to use the software > (inputting data through an 'excel-like' interface, filling in values > for constants through the interface, analyzing the results, etc). I am > hoping for a good 'look and feel' for the software.
As a first pass, you/your users can fill in a dummy text file using a standard text editor. This probably won't be enough in the long run, but it will allow you to concentrate on the mathematical part of the program without worrying about GUI programming.
Then, decide what tool you want to use for the GUI - could be just about anything. All it needs to be able to do, compatibility-wise, is write the text file in the format that your Fortran program expects (and read the results back in).
This has the advantages that saving old sets of input and results happens near-automatically (all you need to do is to allow the user to change the names of the files), and that, for instance, you can easily have the Fortran program run in batch mode on several different input files.
> I would like to get your inputs on the following specific questions:
> 1. I selected Fortran since (i) I am somewhat familiar with it (ii) I > am given to understand that while some other options (JEE5 for > instance) are good for developing a GUI, they may not be efficient for > scientific operations. Am I right in my selection of Fortran? How does > Fortran compare with C++ for my kind of applications?
I think Fortran's a good choice here for the computation code.
> 2. What is the cheapest (better yet, free) software that will provide > me a integrated environment for (i) writing the program and (ii) > developing the GUI, as the next alternative, if I have to use two > different options for writing the code and developing GUI, what are my > options?
There is no single integrated environment which will give you all three of the Fortran language, a compiler, and a VB-like GUI development. Not even for $$$. As others have said, if you want a real good look-and-feel without a LOT of work, you'll either have to pay for something like Winteracter or GINO on top of your Fortran compiler, or you'll have to write the GUI in a different language.
> 3. Can one write Fortran codes in Visual Basic? If yes, is this the > best option considering VB will help me develop the GUI as well?
I've heard it said that you can write Fortran in any language :) But no, a VB compiler can't understand Fortran, and I wouldn't recommend writing numerical codes in VB. VB would be a good, simple to learn, and not too expensive choice for the GUI, though. (Though personally I'd go with Delphi over VB - similar environment, Pascal rather than Basic).
Hope this helps,
Catherine. -- Catherine Rees Lay
Polyhedron Software Ltd. Registered Office: Linden House, 93 High St, Standlake, Witney, OX29 7RH, United Kingdom. Registered in England No.2541693. Vat Reg No. GB 537 3214 57
> 2. What is the cheapest (better yet, free) software that will provide > me a integrated environment for (i) writing the program and (ii) > developing the GUI, as the next alternative, if I have to use two > different options for writing the code and developing GUI, what are my > options?
Unless you want to do both (i) and (ii) in a sub-standard fashion, I wouldn't look for an integrated environment; pick the most suitable language for your computational portion, and use a web browser your GUI.
With the recent (re-appearance) of AJAX[1], the browser is fast becoming the GUI of choice.
For example, I'm currently exploring the use of the Camping web framework[2] for wrapping some of our Fortran computational engines.
> There are other GUI building frameworks that are free such as JAPI or > GTK. But these require you to use Java or Tcl/Tk as well.
Could you tell me why I need anything but Fortran with ISO C bindings (or a C wrapper) to access Gtk? With a properly defined module GTK the following program works with pure Fortran (plus the GTK libraries).
program guiF use iso_c_binding, only: c_ptr use gtk implicit none
type(c_ptr) :: window call gtk_init () window = gtk_window_new (GTK_WINDOW_TOPLEVEL) call gtk_widget_show (window) call gtk_main () end program guiF
Tobias
PS: A suboptimal and incomplete GTK+ module could look as follows, tested with NAG f95 and gfortran (fortran-experimental branch).
module GTK use iso_c_binding, only: c_int implicit none interface subroutine gtk_widget_show (window) bind(c) use iso_c_binding, only: c_ptr type(c_ptr), VALUE :: window end subroutine
function gtk_window_new(type) bind(c) use iso_c_binding, only: c_ptr, c_int integer(c_int), value :: type type(c_ptr) :: gtk_window_new end function gtk_window_new
subroutine gtk_main() bind(c) end subroutine gtk_main end interface
do i = 0, argc call get_command_argument(i,arg,strlen) allocate(carg(0:strlen)) do j = 0, strlen-1 carg(j) = arg(j+1:j+1) end do carg(strlen) = c_null_char argv(i) = c_loc(carg(0)) end do argc = argc + 1 call gtk_init_real(argc, c_loc(argv)) end subroutine gtk_init
Catherine Rees Lay wrote: > From your description of the problem, and the fact that cost seems to > be paramount, I'd recommend splitting this into two parts:
>> First of all, pardon me if some of the questions I ask seem >> trivial. I am jumping into Fortran programming after a period of 6-7 >> years and I am not in touch with many of the current practices. I have >> the following goals I want to achieve
>> - Develop a fortran program to solve 15-30 simultaneous Ordinary >> Differential Equations (ODEs) such that the user of the program is >> able to input (i) various constants for solving the DEs (ii) another >> time dependent input function [X(t)] with the result that the >> mathematical model of ODEs transforms X(t) into Y_predicted(t).
>> - I also need to optimize the model parameters such that the predicted >> Y_predicted(t) matches with a user defined Y_experimental(t)
> Write this in Fortran as a standalone program which reads the > user-specified bits from a text file. Make the text file format > "obvious" (e.g. have a comment before each piece of information saying > what it is. And have the Fortran program write the results out in a > similar way.
> Note: I'm assuming the computational part is effectively a black box - > no need for interaction half way through.
>> - I also want to develop a 'good' GUI so that a user who is not >> familiar with programming languages should be able to use the software >> (inputting data through an 'excel-like' interface, filling in values >> for constants through the interface, analyzing the results, etc). I am >> hoping for a good 'look and feel' for the software.
> As a first pass, you/your users can fill in a dummy text file using a > standard text editor. This probably won't be enough in the long run, but > it will allow you to concentrate on the mathematical part of the program > without worrying about GUI programming.
> Then, decide what tool you want to use for the GUI - could be just about > anything. All it needs to be able to do, compatibility-wise, is write > the text file in the format that your Fortran program expects (and read > the results back in).
> This has the advantages that saving old sets of input and results > happens near-automatically (all you need to do is to allow the user to > change the names of the files), and that, for instance, you can easily > have the Fortran program run in batch mode on several different input > files.
>> I would like to get your inputs on the following specific questions:
>> 1. I selected Fortran since (i) I am somewhat familiar with it (ii) I >> am given to understand that while some other options (JEE5 for >> instance) are good for developing a GUI, they may not be efficient for >> scientific operations. Am I right in my selection of Fortran? How does >> Fortran compare with C++ for my kind of applications?
> I think Fortran's a good choice here for the computation code.
>> 2. What is the cheapest (better yet, free) software that will provide >> me a integrated environment for (i) writing the program and (ii) >> developing the GUI, as the next alternative, if I have to use two >> different options for writing the code and developing GUI, what are my >> options?
> There is no single integrated environment which will give you all three > of the Fortran language, a compiler, and a VB-like GUI development. Not > even for $$$. As others have said, if you want a real good look-and-feel > without a LOT of work, you'll either have to pay for something like > Winteracter or GINO on top of your Fortran compiler, or you'll have to > write the GUI in a different language.
GINOMENU Studio is coming along nicely for creating drag and drop GUIs with Fortran.
>> 3. Can one write Fortran codes in Visual Basic? If yes, is this the >> best option considering VB will help me develop the GUI as well?
> I've heard it said that you can write Fortran in any language :) But no, > a VB compiler can't understand Fortran, and I wouldn't recommend writing > numerical codes in VB. VB would be a good, simple to learn, and not too > expensive choice for the GUI, though. (Though personally I'd go with > Delphi over VB - similar environment, Pascal rather than Basic).
> > First of all, pardon me if some of the questions I ask seem > > trivial. I am jumping into Fortran programming after a period of 6-7 > > years and I am not in touch with many of the current practices. I have > > the following goals I want to achieve
> > - Develop a fortran program to solve 15-30 simultaneous Ordinary > > Differential Equations (ODEs) such that the user of the program is > > able to input (i) various constants for solving the DEs (ii) another > > time dependent input function [X(t)] with the result that the > > mathematical model of ODEs transforms X(t) into Y_predicted(t).
> > - I also need to optimize the model parameters such that the predicted > > Y_predicted(t) matches with a user defined Y_experimental(t)
> Write this in Fortran as a standalone program which reads the > user-specified bits from a text file. Make the text file format > "obvious" (e.g. have a comment before each piece of information saying > what it is. And have the Fortran program write the results out in a > similar way.
In the business world, Excel is King, so I use CSV input and output files, which non-programmers easily view and modify in Excel. Since commas are treated as delimiters for list-directed READs, using CSV rather than space-delimited files as input requires no extra programming. An advantage of CSV output is that one does not need to align the columns, which can be tedious and time-consuming. If the output is space-delimited and will be read in Notepad, files with columns not aligned will be ugly and almost illegible. Most Statistics and graphics packages have built-in functions to read CSV files.
I have read that Improved ability to write CSV files will be added to Fortran 2008. I don't remember the details, and in any case one can certainly write CSV files in any version of Fortran.
Gary Scott wrote: > Catherine Rees Lay wrote: >> There is no single integrated environment which will give you all >> three of the Fortran language, a compiler, and a VB-like GUI >> development. Not even for $$$. As others have said, if you want a real >> good look-and-feel without a LOT of work, you'll either have to pay >> for something like Winteracter or GINO on top of your Fortran >> compiler, or you'll have to write the GUI in a different language.
> GINOMENU Studio is coming along nicely for creating drag and drop GUIs > with Fortran.
Yes, but you can't buy just GINOMENU Studio and use it to create GUIs written in Fortran, because it isn't a compiler. You need to get the compiler separately. That's what I meant. With VB, you get all you need with one single product, and I got the impression that was what the OP was hoping for. (Aren't we all? :) )
GINOMENU Studio = good solution, but not a free one. (Perhaps I should add a disclaimer here that we sell it :) )
Catherine. -- Catherine Rees Lay
Polyhedron Software Ltd. Registered Office: Linden House, 93 High St, Standlake, Witney, OX29 7RH, United Kingdom. Registered in England No.2541693. Vat Reg No. GB 537 3214 57
>>> There is no single integrated environment which will give you all >>> three of the Fortran language, a compiler, and a VB-like GUI >>> development. Not even for $$$. As others have said, if you want a >>> real good look-and-feel without a LOT of work, you'll either have to >>> pay for something like Winteracter or GINO on top of your Fortran >>> compiler, or you'll have to write the GUI in a different language.
>> GINOMENU Studio is coming along nicely for creating drag and drop GUIs >> with Fortran.
> Yes, but you can't buy just GINOMENU Studio and use it to create GUIs > written in Fortran, because it isn't a compiler. You need to get the > compiler separately. That's what I meant. With VB, you get all you need > with one single product, and I got the impression that was what the OP > was hoping for. (Aren't we all? :) )
> GINOMENU Studio = good solution, but not a free one. (Perhaps I should > add a disclaimer here that we sell it :) )
Yes, I was just stating my happiness with Studio's recent advancements. Certainly, it doesn't do everything, but it does an awful lot.