View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Tue Jun 27, 2006 3:35 am Post subject: 'Calling' a program |
|
|
Hello,
I have a Fortran 95 program which performs some statistical analysis. I want to run the program multiple times, is there any way of 'calling' the program in the same way a subroutine is called? I have heard 'scripts' mentioned, does F95 support this kind of thing?
If it is possible to do this, how can i store results from each run in a single text file (i.e. without over-writing previous results)?
Many Thanks
D McMillan |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7930 Location: Salford, UK
|
Posted: Tue Jun 27, 2006 5:32 am Post subject: 'Calling' a program |
|
|
You can write a program to run another program.
Write a short program that calls START_PROCESS@ or CISSUE.
See the help file for further information about these routines.
To avoid over-writing an existing file you will need to change the STATUS to 'APPEND' when opening the output file. |
|
Back to top |
|
|
Andrew
Joined: 09 Sep 2004 Posts: 232 Location: Frankfurt, Germany
|
Posted: Thu Jun 29, 2006 2:10 pm Post subject: 'Calling' a program |
|
|
Another option would be to use a batch file to run the program and potentially pass in different names for the output files for subsequent runs. It would also be possible to truly script the running of programs by using a scripting language to control execution. You could also install cygwin and use bash shell scripting to do it. As you can see there are many ways to get this kind of thing done. Probably the quickest way to get going however would be to use batch files or follow Paul's advice. |
|
Back to top |
|
|
|