TABLE OF CONTENTS


::pwtk::rerunCP

SYNOPSIS

proc ::pwtk::rerunCP {args} {

USAGE

   rerunCP ?OPTIONS?  INPUT  ?OUTPUT?  ?&?    

DESCRIPTION

Re-run (restart) the cp.x calculation. Prior to running, this routine will set the restart_mode='restart' but only if restart_mode is undefined or 'from_scratch'. The output-file will be treated in append mode, whereas the rest is the same as for the ::pwtk::runCP routine.

OPTIONS

ARGUMENTS

SOURCE

    # handle treatrun
    treat_run_ {*}$args

    input_pushpop {
        set restart_mode [::pwtk::input::namelistGetVarValue CONTROL restart_mode trim]
        if { $restart_mode == "" || $restart_mode == "from_scratch" } {         
            CONTROL { 
                restart_mode = 'restart' 
            }
        }
        
        # take care of plugins restart
        plugins_restart_ cp.x

        #ENVIRON {
        #    environ_restart = .true.
        #}
        
        # remove the outdir_clean option from $args as it prevents true restart
        remove_the_outdir_clean_option_
        
        set result [eval {runCP -append} $args]
    }
    return $result
}