PSCF v1.1
Running a Program

Input Files (Prev)         Parameter Files (Next)

All of the PSCF programs are designed to be run from a unix command line, and all have a similar command line interface. The names of the parameter and command files required to perform a computation are passed to the the program as arguments of the "-p" and "-c" command line options, respectively. Names of other input and output files are provided as arguments to commands in the command file.

Example

As an example, consider use of the program pscf_pc3, which is used to model three-dimensional periodic microstructures. To run this program using a parameter file named "param" and command file named "commands" that are both in the current working directory, one would enter:

pscf_pc3 -p param -c commands

The analagous command to invoke a different PSCF program would use a different executable name (e.g., pscf_fd to run the program for one-dimensional finite-difference calculations) but identical command line options.

During execution, some log information is written to standard output, which outputs to a terminal by default. This log output can be re-directed to a file by using the unix ">" output redirect operator. For example, the command

pscf_pc3 -p param -c commands > log

would direct standard output to a file named "log" in the current working directory. Standard output should normally be redirected to a file when a job is run in background or in a queue.

Echoing the Parameter File

All PSCF programs accept a command line option "-e" that causes the contents of each line of the parameter file to be echoed to standard output while the parameter file is being read. For example, to invoke the program pscf_pc3 with echoing of the parameter file to a log file, one could enter

pscf_pc3 -e -p param -c commands > log

The "echo" option is very useful for locating errors in the parameter file. When an error is detected while reading a parameter file, the echoed output ends immediately before the line at which the error is detected, and is followed by an error message with any avaiable information about the nature of the error.

PSCF parameter files are fixed-format files in which every element is preceded by a label string that gives the name of a parameter or a block of parameters. During processing of the parameter file, the program reads each such label and compares it to a label that it expects to appear next in the file. Error messages that are generated in response to parameter file syntax errors output both the expected label string and the label string that was actually read from file. This error message is usually enough to allow a user to identify and fix such an error.

Command Line Options

All PSCF programs can be invoked with any of the following command line options listed in the table shown below.

Option Argument Description
-e Activates echoing of the parameter file to standard output
-p filename Gives the filename of the parameter file (required)
-c filename Gives the filename of the command file (required)
-i prefix Specifies a prefix string that is prepended to the names (paths) of all input data files
-o prefix Specifies a prefix string that is prepended to the the names (paths) for all output data files

Only the -p and -c options are required, while others may be omitted.
The blank entry in the argument column for the -e option indicates that this option does not take an argument.

The "prefix" arguments of the -i and -o options can be used to specify directory for input and output files. To do so, set either of these arguments to the path to a directory, terminated by the directory separator charactor "/", giving a string such as "in/" or "out/". These prefix strings are prepended verbatim to names of input and output files that are specified in the command file, but are not added to the names of the parameter and command files.

Example : The command

pscf_pc3 -e -p param -c commands -i in/ -o out/ > log

would run the program pscf_pc3 using a parameter file named "param" and a command file named "commands", while echoing the parameter file during initialization, writing all output files to subdirectory "out/" of the current working directory, and reading all input files other than the parameter and command files from subdirectory "in/".


Input Files (Prev)         User Guide (Up)         Parameter Files (Next)