Re: synchronisation between two executable
- From: Dave Allured <nospom@xxxxxxxxxx>
- Date: Tue, 17 Mar 2009 00:54:38 -0600
David Thompson wrote:
On Thu, 05 Mar 2009 10:35:16 -0700, Dave Allured <nospom@xxxxxxxxxx>
wrote:
rudra wrote:
On Mar 5, 7:30 pm, Luka Djigas <ldigas@@gmail.com> wrote:
Why not use a batch file for just putting them in a loop ? What is the
stopping condition ?
Luka's suggestion is good, except I would call it a shell script ratherConcur so far.
than a batch file. (Are we talking about the same thing? What kind of
system?)
The shell script guarantees the the output file(a) from a.out are
completely written and closed properly, before b.out tries to start
reading them, and vice versa. This seems like a trivial thing, except
that if programs A and B are running simultaneously, the file completion
and signalling issues might get messy in Fortran. The shell script
treats you "nice". Mainly because it was designed for things like this!
The stopping condition would be detected by one of the Fortran programs,Concur except for #4. At least on mainstream systems, environment
right? So you need a method for that program to signal the shell script
to terminate the loop. I can think of several: special keyword to
standard out; completion file made only upon convergence; grep for
completion keyword in normal output file; set an environment variable;
set the exit code, if available.
variables flow only down (from a parent process to child, i.e. from a
shell/exec/cmdproc to the programs it runs) not up.
Ah yes, my bad, you are right on that. Scratch #4.
--Dave
.
- References:
- synchronisation between two executable
- From: rudra
- Re: synchronisation between two executable
- From: Luka Djigas
- Re: synchronisation between two executable
- From: rudra
- Re: synchronisation between two executable
- From: Dave Allured
- Re: synchronisation between two executable
- From: David Thompson
- synchronisation between two executable
- Prev by Date: Re: Declaring parameter later in the code?
- Next by Date: Re: ax**3+bx**2+cx+d
- Previous by thread: Re: synchronisation between two executable
- Next by thread: Re: synchronisation between two executable
- Index(es):
Relevant Pages
|