TABLE OF CONTENTS


5.3.7. Propagate

DESCRIPTION

The "propagate" is a simple mechanism that propagates script snippets to child PWTK instances. Child PWTK instances are remotes, backgrounds, threads, thread-pools, and queues...

Consider, for example, the following script:

       import common.pwtk
       SYSTEM { ecutwfc = 30.0 }

       remote machine1 {
           runPW calc1
       }

This script will fail. The problem is that the 'remote' command creates a script file from the script supplied to it (in this case "runPW calc1") and runs it on the remote "machine1" host. Hence, the script run on the "machine1" is not aware of the PWTK state that precedes the 'remote' command. In contrast, this script will succeed:

       propagate {
          import common.pwtk
          SYSTEM { ecutwfc = 30.0 }       
       }

       remote machine1 {
          runPW calc1
       }
    

The point is that the 'propagate' command informs PWTK, which script excerpts should be propagated to the child PWTK processes. In this case the script executed on the remote host looks something like:

       import common.pwtk
       SYSTEM { ecutwfc = 30.0 }       
       runPW calc1

and the 'runPW' command will be able to construct the pw.x input and run it.