WIND is run using a Unix script which attaches appropriate files and either starts WIND interactively or submits the job to a queueing system. In addition, this script checks for special files and may be used to re-invoke WIND after performing intermediate operations.
The usual procedure for running the WIND code is via a command-line script called wind. With this approach, the specific executable to be run (e.g., production version, alpha version, etc.), the names of the required input and output files, etc., may be defaulted, specified on the command line, or entered as responses to prompts. The various options to the script are described below in the form of a Unix-style man page for wind.
If the Tcl/Tk interpreter is available, the WIND code may be launched via an interactive GUI by using -g as the first option to the wind script, i.e., by typing wind -g. In this case, the executable to be run, the file names, etc., are specified via the GUI. Any options to the wind script following the -g are ignored. If the -g option is specified, but the Tcl/Tk interpreter is not available, the usual command-line interface will be used.
| wind - a computational platform for solving various sets of equations governing fluid dynamics |
| wind [-batch] [-begtime time] [-binroot directory] [-cfdrootrem directory] [-dat datfile] [-debug] [-debugger debugger] [-endtime time] [-flow cflfile] [-g] [-grid cgdfile] [-grpcharge number] [-help] [-list lisfile] [-memory number] [-mp] [-mpmode mode] [-ncpu number] [-nice_val number] [-nobg] [-(no)parallel] [-not_nice] [-nzones number] [-program windname] [-queue_name name] [-remoterun] [-runinplace] [-runque queue] [-runroot directory] [-tmpdir directory] [-usessh] [-walltime time] |
| wind is a Bourne shell script used to run the WIND code,
a computational platform for numerically solving various sets of
equations governing physical phenomena.
Currently, the code supports the solution of the Euler and Navier-Stokes
equations of fluid mechanics, along with supporting equation sets
governing turbulent and chemically reacting flows.
See the WIND User's Guide for detailed information on the
operation and use of the WIND code.
Internally, the wind script invokes other scripts, and creates on the fly a job file (with the suffix .job), which is the actual script submitted to the queue specified by the user. |
| [-batch] | Run in "batch" mode, with all necessary input specified via command-line options. The user must specify the WIND executable to be run using the -program option; all the input/output file names using the -dat, -list, -grid, and -flow options; and the system run queue using the -runque option. The user must also specify either the -runinplace option, or the directory to run in using the -runroot option. In addition, if a multi-processing control (.mpc) file exists, either the -parallel or -noparallel option must be specified. And, if an .mpc file exists and MPI message passing is being used, the number of zones must be specified using the -nzones option. If any of these items are missing, an error message will be displayed and execution will stop. | ||
| [-begtime time] | The beginning time for a standard Unix at/batch job (i.e., when using -runque AT_QUE). | ||
| [-binroot directory] | Root location of the WIND executable on the system on which it will be running. | ||
| [-cfdrootrem directory] | The "CFDROOT" directory on the system on which the WIND executable will be running. The default is the same as the "CFDROOT" directory on the local machine. | ||
| [-dat datfile] | The WIND input data (.dat) file, entered without the extension (e.g., wing, not wing.dat). | ||
| [-debug] | Run WIND in debug mode, using the debug package specified by the -debugger option. The job will automatically be run interactively, and the -runinplace option will be set. | ||
| [-debugger debugger] | Set the debug package to be used when running in debug mode. The default depends on the computer system being used. | ||
| [-endtime time] | Ending time for a Unix at/batch job, or time to run in seconds for a job running under the basic QSUB, PBS, or LSF queueing system. For the PBS and LSF queueing systems this is the total time for the entire job, minus some length of time for termination processing (i.e., updating the flow (.cfl) file, terminating worker processes, etc.) Also see the -walltime option. | ||
| [-flow cflfile] | The WIND flow (.cfl) output file, entered without the extension (e.g., wing, not wing.cfl). If the file exists, the solution will restart using the conditions in the file as initial conditions. | ||
| [-g] | When specified as the first option, use the Tcl/Tk interactive GUI to specify input parameters, ignoring any other options. If -g is not the first option specified, it is ignored. | ||
| [-grid cgdfile] | The WIND grid (.cgd) input file, entered without the extension (e.g., wing, not wing.cgd). | ||
| [-grpcharge number] | Group charge number for the job, used for NAS systems. | ||
| [-help] | Display the list of command-line options, and quit, ignoring any other options. | ||
| [-list lisfile] | The WIND list output (.lis) file, entered without the extension (e.g., wing, not wing.lis). Set the parameter lisfile to "screen" to display the list output file at the terminal. | ||
| [-memory number] | Amount of run-time memory to request for a job running under the PBS (in megabytes) or LSF (in kilobytes) batch system. | ||
| [-mp] | Run using a multi-processor machine (i.e., a single machine with multiple processors, like the CRAY or SGI Origin-2000), using either PVM or MPI message passing. | ||
| [-mpmode mode] | Message passing mode: either PVM or MPI. MPI may only be used on multi-processor systems. Note that the pre-compiled executables available through IVMS were built without MPI message passing. To use -mpmode MPI, MPI must be pre-installed on your system (unlike PVM, MPI is not distributed with WIND), and you'll need an executable that includes links to the MPI library. See Installing the Build Distribution in the WIND Installation Guide for instructions on creating the executable. The default message passing mode is PVM. | ||
| [-ncpu number] | Number of CPUs to request for a job running under the PBS or LSF batch system. | ||
| [-nice_val number] | The "nice" value (a number from 1 to 20) to use with the Unix nice command. Larger values cause the job to run at a lower CPU scheduling priority to lessen the impact on other jobs on the system. For interactive jobs (-runque REAL), the value is automatically set to 2. For jobs run in parallel mode, the master task, and worker tasks being run on the same system as the master, automatically run at top priority (i.e., without using nice). | ||
| [-nobg] | Jobs in the interactive queue normally run in the foreground if the output is being displayed on the screen, and in the background if the output is being sent to the .lis file. This option specifies that the interactive job is to be run in the foreground, even if the output is being sent to the .lis file. | ||
| [-(no)parallel] | Run in parallel mode (or serial mode if -noparallel is specified). For interactive and at/batch jobs, parallel mode requires a multi-processing control (.mpc) file. If this option is not specified, and an .mpc file exists, the user will be asked if parallel mode should be used. | ||
| [-not_nice] | Run without using the Unix nice command. | ||
| [-nzones number] | Number of zones, used in MPI message passing mode on multi-processor systems. | ||
| [-program windname] | The name of the WIND executable to be used, without the .exe extension. | ||
| [-queue_name name] | The name of the specific queue in which the job is to run. The form of the name parameter depends on the queueing system being used, as specified using the -runque option. | ||
| [-remoterun] | Bypass some of the built-in error checking for valid path names preventing error messages when running on a remote system. The "CFDROOT" directory on the remote machine should be specified using the -cfdrootrem option, and the directory to run in should be specified using the -runroot option. | ||
| [-runinplace] | Run in place, i.e., in the directory in which the wind script was invoked. The default is to run in a remote directory. | ||
| [-runque queue] | Queueing system in which the WIND executable is to run. The parameter queue must be "REAL" for a real-time interactive job; "AT_QUE" to run using a standard Unix at or batch queue; "QSUB_QUE" to run in a basic QSUB queue; "QSUB_PBS_QUE" to run in a QSUB queue using the PBS batch system; or "BSUB_QUE" to run in a BSUB queue using the LSF batch system. | ||
| [-runroot directory] | Root directory under which the WIND executable is to be run. The full name will be directory/userid/basename.scr, where userid is your userid and basename is the base name of your .dat file. The default directory, if neither -runroot or -runinplace is specified, is /tmp. | ||
| [-tmpdir directory] | Directory for storing temporary files during a WIND run. The default is the directory specified using the -runroot option when running on a remote system, and the local directory when using the -runinplace option. | ||
| [-usessh] | Use ssh remote shell/copy commands Note that the pre-compiled executables available through IVMS were built assuming rsh (remsh for HP and Cray systems) will be used as the "remote shell" command for parallel operation. If your system requires the use of ssh, you'll need an executable that includes links to an "ssh version" of PVM. See Installing the Build Distribution in the WIND Installation Guide for instructions on creating the executable. | ||
| [-walltime time] | Total wall clock time in seconds for a job running under the PBS or LSF queueing system. This includes the length of time for termination processing (i.e., updating the flow (.cfl) file, terminating worker processes, etc.) Also see the -endtime option. |
| Please send documentation suggestions/corrections to towne@nasa.gov. Questions concerning the WIND code itself or the NPARC Alliance should be sent to nparc-support@info.arnold.af.mil |
At the end of a non-debug job that completes successfully, if a script named wind_post exists in the current directory, and if the job is not being run interactively, the wind_post script is invoked, as follows.
wind_post datname lisname cgdname cflname iter run_commandThe six arguments are defined as:
| Argument | Definition | ||
|---|---|---|---|
| datname | The base name (i.e., without the three-letter extension) of the input data (.dat) and job files | ||
| lisname | The base name of the list output (.lis) file | ||
| cgdname | The base name of the grid (.cgd) file. (If CGNS files are being used, note that this is the base name of the file itself, not the name of the CGNSBase_t node in the file.) | ||
| cflname | The base name of the flow (.cfl) file | ||
| iter | The "job iteration" number. This is a count of the number of jobs, not time step iterations. It is initialized to zero, and incremented by one before each invocation of wind_post. Note that the value of iter is not saved between runs. The next invocation of the top-level wind script will re-initialize the value to zero. | ||
| run_command | The command used to submit the job |
The wind_post script itself must be supplied by the user. Users with some experience in writing shell scripts may use this feature to automatically post-process results at the end of a job, or to save and/or process interim results from a lengthy calculation and submit a new job. [Note that a similar capability exists by using the SPAWN keyword in WIND's input data file.]
An example wind_post Bourne shell script called wind_post.sh is supplied with the WIND application distribution in the directory wind/bin. (There's also an example C shell version called wind_post.csh.) The example script resubmits the job with a different input file for each job iteration. It looks for an input data file named datname.dat.nextiter, where datname is the base name of the .dat file and nextiter is the next job iteration number (i.e., one more that the value of the input argument iter). The new input data file, if it exists, is copied over the original input data file and the job file is resubmitted.
A typical method for using this capability would be to create files named, for example, test.dat.1, test.dat.2, test.dat.3, etc. Then, copy test.dat.1 to test.dat and submit the job as usual. By keeping the initial input file in test.dat.1 and copying it to test.dat, the original initial input file is preserved.
After the initial job completes, wind_post will be called with iter = 1. The next job iteration number is thus 2. The file test.dat.2 will be copied into test.dat, and the job will be resubmitted, restarting WIND where it left off. If the file test.dat.nextiter doesn't exist, all the input data files have been used. The job file is then removed, and the run ends.
Note the distinction between a run and a job, and the value of the job iteration number. By run, we mean here a single invocation by the user of the wind script. Within that run, multiple jobs may be submitted using the wind_post feature, each with a different, automatically-incremented job iteration number. As noted above, the job iteration number is not saved between runs. The next time the wind script is invoked, starting a new run, the job iteration number will be re-initialized to zero. If it's necessary to save the value between runs, the user-supplied wind_post script should save it to a file, to be read during the next run.
The example wind_post script does not do any post-processing, but that can easily be added. For example, CFPOST could be run, with input redirected from a command file, to create plot files or reports. Or, an interim flow (.cfl) file could be saved by copying it into a file with the iter variable as part of the file name.
The alpha version of WIND, and to a lesser extent the beta version, change quite frequently. Even the released production version is sometimes modified, as a result of bug fixes. Changes are summarized in the "Source History" file, accessed through the Internet Version Management System (IVMS).
The windver script may be used to get the complete version number of a WIND executable, and (for WIND 3.0 and higher) its supporting libraries. For example,
% windver
Versions in ./SGIMP6.5/R12000/bin
Select the desired version
0: Exit wind
1: alpha version
2: Version 2.0
3: Version 3.0
4: Version 4.0
5: Version 5.0
Enter number or name of executable.......[5]: 5
WIND - Version 5.193 (Last changed 2002/11/05 17:53:28)
LIBCFD - Version 2.142 (Last changed 2002/10/14 17:27:00)
LIBADF - Version 2.0.14.1 (Last changed 2002/07/08 17:21:40)
PVM - Version 3.4.3
windver lists the various WIND executables available, and prompts
the user to select one of them.
It then prints the complete version number, plus the date it was
created, for the WIND code, the CFD_wind library (common file processing
routines, system-dependent routines, and utility routines), the ADF
library (ADF routines from the CGNS
project
), and the
PVM library (PVM
routines
used for
parallel processing).
In the above example, WIND Version 5.0 is actually Version 5.193,
created on Nov 5, 2002.
By default, windver looks for the WIND executables in the directory specified by the environment variable WIND_BINROOT. If there is no environment variable of that name, windver will look in CFDROOT. The user may also specify the root location of the WIND executable using the option -binroot. I.e., invoking windver as
windver -binroot /usr/local/wind/windwill tell windver that the executables are located in the appropriate directories (i.e., in subdirectories corresponding to the SYSTEM and SYSTEM_CPU environment variables) below /usr/local/wind/wind.
The windrun script may be used to quickly set up and start a WIND
run.
The run will be in interactive mode, with the output sent to a
.lis file.
The various options to the script are described below in the form of a
Unix-style man page.
NAME
| windrun - A quick way to start a WIND run |
| windrun casename [-dev | -cfd] [windname] [-serial | -parallel] [-new | -restart] [-help] |
| windrun is a Bourne shell script used to quickly set up and run WIND. Internally windrun invokes the wind script with the options -runinplace, -nobg, and -runque REAL, and other options determined by the windrun input options. |
| casename | The prefix for the WIND input/output files. All files must have the same prefix (e.g., case1.cgd, case1.cfl, etc.) | ||
| [-dev] | Look under the directory defined by the WIND_DEV environment variable for the WIND executable. This is the default. | ||
| [-cfd] | Look under the directory defined by the CFDROOT environment variable for the WIND executable. | ||
| [windname] | The name (without the .exe extension) of the WIND executable to be used (e.g., windalpha, not windalpha.exe). | ||
| [-serial] | Run in serial mode. This is the default. | ||
| [-parallel] | Run in parallel mode, if an .mpc file is present. | ||
| [-new] | Run a new case from scratch. This is the default. Any existing .cfl, .tda, .cth, .lis, and/or .job files with the current casename in the current directory will be erased before starting the WIND run. | ||
| [-restart] | Start from the the existing solution, if one exists. | ||
| [-help] | Display a summary on using windrun. |
The windmp script may be used as a shortcut when running WIND on a multi-processor machine (i.e., a single machine with multiple processors, like the CRAY or SGI Origin-2000). It simply invokes the wind script with the options -mp, -runinplace, and -not_nice.
runtest is a utility for running WIND test cases. runtestsuite is a wrapper for runtest that may be used to automate the running of a series of test cases. The various options to both scripts are described below in the form of Unix-style man pages.
| runtest - Run WIND test cases |
| runtest basedir casename [-dev | -cfd] [windname] [-serial | -parallel] [-baseline] [-help] |
| runtest is a Bourne shell script that may be used to
run WIND test cases.
The base name of the case to be run is given by the specified
casename.
runtest will look for casename.dat and
casename.cgd input files in the current directory.
In addition, runtest will recursively descend into any
sub-directories and look for input files named subdir.dat
and subdir.cgd, where subdir is the sub-directory
name.
For example, you could set up a test case named case1, with input files case1.dat and case1.cgd. In the directory containing these files, you could have sub-directories named (say) run1, run2, etc., containing variations (e.g., different input options) on the original case. runtest will cd into the sub-directory run1, and look for input files named run1.dat and run1.cgd. Similarly for the sub-directory run2, etc. All such cases that are found will be run, in the directory containing the input files. If a file named casename.ic.cfl (or subdir.ic.cfl if in a sub-directory, as described above) exists in the run directory, it will be copied as the file casename.cfl (or subdir.cfl) and used as initial conditions. Otherwise, a new case will be run from scratch. In either situation, any existing output files will be overwritten. If multiple .dat files are found named casename.1.dat, casename.2.dat, etc. (or subdir.1.dat, etc.), multiple runs will be made using the successive .dat files to restart the solution. If the specified case has been run previously, any convergence measures stored in the .lis file (i.e., residuals, integrated flow properties, etc.) will be compared with the values from the existing baseline results using diff, and the output will be written to the file basedir/test.log. The -baseline option may be used to replace an existing baseline solution with the current one, bypassing the comparison. |
| basedir | The directory where the log file of the tests is to reside. | ||
| casename | The prefix for the WIND input/output files. All files must have the same prefix (e.g., case1.cgd, case1.cfl, etc.) | ||
| [-dev] | Look under the directory defined by the WIND_DEV environment variable for the WIND executable. This is the default. | ||
| [-cfd] | Look under the directory defined by the CFDROOT environment variable for the WIND executable. | ||
| [windname] | The name (without the .exe extension) of the WIND executable to be used (e.g., windalpha, not windalpha.exe). If no name is specified, the default WIND version will be used. | ||
| [-serial] | Run in serial mode. This is the default. | ||
| [-parallel] | Run in parallel mode, if an .mpc file is present. | ||
| [-baseline] | Replace the saved baseline solution, used for comparison with results from future runs, with the current solution. | ||
| [-help] | Display a summary on using runtest. |
| runtestsuite - Run a series of WIND test cases |
| runtestsuite [-dev | -cfd] [windname] [-serial | -parallel] [-baseline] [-help] |
| runtestsuite is a wrapper for the script runtest that may be used to automate the running of a series of test cases. It assumes that the cases to be run are stored in subdirectories of the current directory, with the subdirectory names the same as the case names (i.e., the subdirectory names are used for the casename argument when invoking the runtest script). |
| [-dev] | Look under the directory defined by the WIND_DEV environment variable for the WIND executable. This is the default. | ||
| [-cfd] | Look under the directory defined by the CFDROOT environment variable for the WIND executable. | ||
| [windname] | The name (without the .exe extension) of the WIND executable to be used (e.g., windalpha, not windalpha.exe). If no name is specified, the default WIND version will be used. | ||
| [-serial] | Run in serial mode. This is the default. | ||
| [-parallel] | Run in parallel mode, if an .mpc file is present. | ||
| [-baseline] | Replace the saved baseline solutions for each case, used for comparison with results from future runs, with the current solutions. | ||
| [-help] | Display a summary on using runtestsuite. |