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

ARGUMENTS

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]
}