Monday, June 14, 2010

parallel processing on the Windows command line

The purpose of this post is to explain the use of a new utility named background.exe - what it is and how it might be useful. It is available with the smokeview 5.5.5 windows installation just posted on the download site at

As you all know, MPI is a software library used to enable parallel processing at the program ie FORTRAN source code level. This enable ONE FDS job to make use of multiple CPUs thereby speeding up the calculation. It is often the case however that you are doing a parameter study or running a verification suit - ie you have a long list of FDS jobs to run. Typically you would create a windows batch file (.bat) containing a list of commands like

fds5 casename_1.fds
fds5 casername_n.fds

On a Windows system, each entry in the above list will not start until the previous entry has completed - even if your computer has multiple cores or CPUs.

Unix/Linux based systems have the capability to put a computer job in the background, meaning that when you run the job, control returns to you immediately allowing you to run another job. With computers with multiple cores or CPUS you can then run more than one job simultaneously.

I didn't see a way of doing this on a Windows system so, I wrote a little utility called background that does just that.

Here is how you might use it with FDS

background -d 1.0 -u 90 fds5 casename.fds

This command runs "fds5 casename.fds" after waiting 1 s and ensuring that the CPU usage is less than 90 %. If the CPU usage happens to be more than 90 %, "background" waits to submit the fds5 command until the usage drops below 90 % then runs fds5 casename.fds.

The purpose of the delay before submitting the job to give windows a chance to update usage from previous invocations. (not really sure if this is needed. This feature is a fail safe to enusure that a large number of jobs are not submitted at once).

The background utility is designed to use in a windows batch file. Say you have a list of 5 FDS jobs you want to run in a .bat file. On a windows computer you would have a batch file with the contents something like

fds5 case1.fds
fds5 case2.fds
fds5 case3.fds
fds5 case4.fds
fds5 case5.fds

Using background and if you accept the default you would change your script to something like

background fds5 case1.fds
background fds5 case2.fds
background fds5 case3.fds
background fds5 case4.fds
background fds5 case5.fds

(or you could add -d and -u options ) On my system, I can make use of all 4 cores cutting the run times by a factor of 4.

Type background -h to see help info. Let me know if you have any questions.

Thursday, June 10, 2010

Smokeview Maintenance Release 5.5.5

A new maintenance release of Smokeview , version 5.5.5, has been posted at . Besides bug fixes and a few other enhancements, I added a new way to manipulate the scene, inspired by a question on the users forum. Basically you can now make use of all 3 mouse buttons (on a 3 button mouse) to manipulate the scene.

LEFT – same as before – rotate the scene

MIDDLE – move in, out, left, right

RIGHT – move up and down.

The right mouse button was used for menuing. So to use the RIGHT mouse button for scene manipulation you first have to turn menuing off. Do this by press the M key . To turn menus back on press the M key again.

This feature is a work around for a problem that occurs with the Linux version of Smokeview. It did not support vertical scene movement because Smokeview could not detect the use of the ALT key.