TABLE OF CONTENTS


::pwtk::dryrunCP

SYNOPSIS

proc pwtk::dryrunCP {} {

USAGE

   dryrunCP

DESCRIPTION

Make a fast cp.x dry-run (as to query the info). Beware that this is not really a dry-run and will take a while.

WARNINGS

This is not really a dry-run and the calculation will take a while.

RETURN VALUE

Name of the output file of the cp.x dry-run.

SOURCE

    set prog    [findExecutable cp.x]
    set head    [fileutil::tempfile cp.dry-run.]; # make a unique filenames because several jobs may be running

    ::pwtk::infoMsg "cp.x dryrun is not really a dry-run and will take a while"
    
    input_pushpop {
        CONTROL   { nstep = 0, prefix = 'cp' }
        ELECTRONS { electron_maxstep = 0 }
        input_clear AUTOPILOT
        ::pwtk::cpi::fprint $head.in

        download_needed_PPs_ ::pwtk::cpi        

        # cp.x does nto support a tru dryrun and it takes a while: inform the user
        ::pwtk::print "Running: [prefix] $prog -in $head.in > $head.out"
        
        catch {
            # do a simple run
            #exec touch cp.EXIT
            close [open cp.EXIT w]
            eval exec [prefix] $prog -in $head.in > $head.out
        }
        file delete cp.EXIT; # just in case
    }
    return $head.out
}