TABLE OF CONTENTS
::pwtk::rerunXX
SYNOPSIS
proc ::pwtk::rerunXX {prog args} {
USAGE
rerunXX PROG ?OPTIONS? INPUT ?OUTPUT? ?&?
DESCRIPTION
A general rerunCmd routine that associates the PROG executable with the corresponding specific rerunCmd command (beware that not all executables have the rerunCmd). For example:
rerunXX pw.x ?OPTIONS? INPUT ?OUTPUT? ?&?
is equivalent to:
rerunPW ?OPTIONS? INPUT ?OUTPUT? ?&?
Rerun restarts the calculation. The OUTPUT file is treated in append mode, whereas the rest is the same as for the ::pwtk::runXX routine.
OPTIONS
- -bg --- run calculation in background (synonymous with "&" as the last argument)
- -serial --- run calculation in serial mode (default = parallel)
- -prefix PREFIX --- explicitly specify the prefix for parallel execution
- -postfix POSTFIX --- explicitly specify the postfix for parallel execution
- -exec EXECUTABLE --- explicitly specify the pw.x executable
- -ihandle VALUE --- explicitly set the input handle (for the description of input handle, see ::pwtk::input_handle)
ARGUMENTS
- PROG --- name of the QE program (e.g. pw.x, ph.x, pp.x, ...)
- INPUT --- either name of the input file or the headname (i.e. rootname of the input name without the file extension_
- OUTPUT --- (optional) name of the output file
- & --- (optional) run calculation in background (synonymous with the -bg option)
SOURCE
variable prog2runCmd; # array that maps from prog to runCmd # runCmd == $prog2runCmd($prog) ifnotexist prog2runCmd($prog) { ::pwtk::error "cannot map '$prog' to runCmd because the '$prog' executable has no registered runCmd" 1 } set rerunCmd ::pwtk::re[namespace tail $prog2runCmd($prog)] if { [info procs $rerunCmd] eq {} } { ::pwtk::error "the '$prog' executables does not have the rerunCmd command" 1 } return [$rerunCmd {*}$args] }