Batch Runs

429 views
Skip to first unread message

D Perron

unread,
Feb 26, 2008, 8:22:21 PM2/26/08
to FDS and Smokeview Discussions
Hi,
Is there a way to run a batch of FDS5 files? An example is having
multiple models that could run one after another over a weekend. I
couldn't find anything about this on the group discussion or the
user's guide. Currently I have a macro that does the job, but it is
not a very efficient/reliable method.

Any help would be appreciated!

John Leidel

unread,
Feb 26, 2008, 8:29:15 PM2/26/08
to fds...@googlegroups.com
Are you running a batch scheduler?  If so... submit them all to batch and go home early :-)

Glenn Forney

unread,
Feb 26, 2008, 9:01:25 PM2/26/08
to fds...@googlegroups.com
if you are running on windows then create a file named runcases.bat
(using the .bat extension is the key) . Put in this file:

fds5 case1.fds
fds5 case2.fds
....
fds5 casen.fds

To run this "batch" file type runcases at a command line (or Dos shell)

if you are running on a Linux system and are using the csh (or tcsh)
shell then create a file named runcases.csh . Put the same entries

fds5 case1.fds >& case1.err
fds5 case2.fds >& case2.err
....
fds5 casen.fds >& casen.err

To run this "batch file" type csh runcases.csh at a command line.

There may be a way to redirect the error file under windows but I don't
know how.

glenn

--
Glenn Forney
National Institute of Standards and Technology
100 Bureau Drive, Stop 8663
Gaithersburg MD 20899-8663

Telephone: (301) 975 2313
FAX: (301) 975 4052

Pre-decisional and sensitive information. Not for attribution, distribution, or reproduction.


D Perron

unread,
Feb 26, 2008, 9:47:43 PM2/26/08
to FDS and Smokeview Discussions
Thanks, this is most helpful!

shostikk

unread,
Feb 27, 2008, 5:55:46 AM2/27/08
to FDS and Smokeview Discussions
fds5 case1.fds 2> case1.err

Kevin

unread,
Feb 27, 2008, 8:32:34 AM2/27/08
to FDS and Smokeview Discussions
On a Linux/Unix platform, you can create a script like this:

#!/bin/csh -f
~/bin/runfds5.csh NIST_NRC_01_v5 fire21 &
~/bin/runfds5.csh NIST_NRC_02_v5 fire21 &
~/bin/runfds5.csh NIST_NRC_03_v5 fire22 &
.
.
.

where runfds5.csh is something like:

#!/bin/csh -f
set bindir=~/bin
set FDS=~/FDS_5/LINUX_INTEL/fds5_linux
set infile=$1
set host=$2

set pid=$$
set in=$infile.fds
set out=$infile.err
set fulldir=`pwd`

set scriptfile=$bindir/script.$$
cat << EOF > $scriptfile
#!/bin/csh -f
cd $fulldir
$FDS $in >& $out
EOF
chmod +x $scriptfile
echo Running $in on $host
ssh -n $host $scriptfile
rm $scriptfile
~

Glenn Forney

unread,
Feb 27, 2008, 9:01:57 AM2/27/08
to fds...@googlegroups.com
Great script! Keep in mind that the '&' character puts the jobs into the
background so that all 3 jobs will start immediately rather than run one
after the other.

--

Emiel van Rossum

unread,
Feb 27, 2008, 10:08:33 AM2/27/08
to FDS and Smokeview Discussions
In Bash linux you can allsow use the following command:
fds5 case1.fds && fds5 case2.fds && fds5 case3.fds

I think this is the most simple way to do it.
Reply all
Reply to author
Forward
0 new messages