PSCF v1.3
|
Input Files (Prev) Types of Calculation (Next)
All PSCF executable programs are designed to be run from a unix command line, and all have a similar command line interface. The names of the required parameter and command files are passed to 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.
pscf_1d : As a first example, consider use of the program pscf_1d, which is used to simulate problems in which the fields depend on a single coordinate. 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_pc and pscf_pg: The syntax to invoke either the pscf_pc or pscf_pg programs for periodic microstructures is similar, but requires that parameter also pass the spatial dimensionality as a parameter of the -d option. For example, to use pscf_pc to perform a calculation involving a three-dimensional periodic microstructures, one could enter
The command line interface for pscf_pg is identical to the interface for pscf_pc.
Redirecting log output : During execution, some 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
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 on a shared computing cluster.
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 pscf_pc with echoing of the parameter file to a log file, one could enter
The -e "echo" option is very useful for locating syntax 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 that contains information about the nature of the error.
PSCF parameter files have a relatively rigid format in which elements must appear in a particular order, and 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, or to a list of valid possibilities. Error messages that are generated in response to parameter file syntax errors output both the label string that was actually read from file and information about what was expected. When echoing is turned on, these error messages often provide enough information to allow a user to rapidly understand and fix any such errors.
The table shown below lists all command line options accepted by PSCF programs. The second column, which describes the option parameter, is left empty for options that do not take a parameter. All but one of the options listed below can be used with any of the three PSCF programs. The only exception to this is the -d option, which is a required input to the pscf_pc and pscf_pg programs, but is not a valid option for pscf_1d.
Option | Parameter | Description |
-d | dimension | spatial dimensionality 1, 2, or 3 (required for pscf_pc and pscf_pg) |
-p | filename | Name of the parameter file (required) |
-c | filename | Name of the command file (required) |
-e | Activates echoing of parameter file to standard output (optional) | |
-i | prefix | string that is prepended to the names (paths) for all input data files (optional) |
-o | prefix | string that is prepended to the names (paths) for all output data files (optional) |
The -p and -c options are required, while the -e, -i, -o options are not. The -d option only exists for the pscf_pc and pscf_pg programs, and is required by those two programs. The -e option does not take a parameter.
The -i and -o command line options allow the user to specify standard prefix strings that should be prepended to the names of input and output files, respectively, that appear in the parameter and command files. The "prefix" parameter of the -i or -o option is often used to specify a directory for input or output files. To do so, set the value of this parameter to the name of a directory, terminated by a directory separator charactor "/", giving a prefix 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 or parameter file. The input prefix (if any) is not, however, added to the names of the parameter and command files that are given in the command line.
Example : The command
would run the pscf_pc program using a parameter file named "param" and a command file named "commands" in the current working directory, while echoing the parameter file, reading all input files other than the parameter and command files from subdirectory of the current working directory named "in", and writing all output files to a subdirectory named "out".
Input Files (Prev) User Introduction (Up) Types of Calculation (Next)