|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
The template example demonstrates how to set up a simple Pipeline with a single Slice executing a single Stage. This example is found under pex_harness/examples/template/ .
The template example has a single application stage, SampleStage (which may be found in pex_harness/examples/stages/lsst/pexhexamples/pipeline.py).
The first component of the SampleStage is a class SampleStageSerial that inherits from lsst.pex.harness.stage.SerialProcessing. This class performs a few simple tasks:
If SampleStageSerial is designated as "serialClass" within the configuration of the stage within Pipeline policy (see below), then its preprocess() method will be executed in the Pipeline prior to the work of the parallel Slices, and the postprocess() method will be executed in the Pipeline after the Slices finish their processing.
The next component of the SampleStage is a class SampleStageParallel that inherits from lsst.pex.harness.stage.ParallelProcessing. This class does the following:
If SampleStageParallel is designated as "parallelClass" within the configuration of the stage within Pipeline policy (see below), then its process() method will be executed by all parallel Slice workers.
A simple Pipeline that runs one Slice and the single application stage SampleStage might be configured by the following policy.
In pex_harness at level >=3.5 explicit dependence on MPI has been removed; in the default mode a Pipeline will run on a single node with Python threads used to run parallel Slices. In this context the number of Slices is specified with the attribute "nSlices" in the Pipeline policy file (in contrast to the specification of an MPI machine file in previous versions of pex_harness).
A designation of one of serialClass or parallelClass is required to have a nontrivial stage execution, though specification of both serialClass and parallelClass is not required.
In order to execute this sample Pipeline, the path to the directory pex_harness/examples/stages should be added to the PYTHONPATH:
The pipeline is then executed via
such as
Although this example does not use events, the events system does make use of an ActiveMQ broker during initialization. If an ActiveMQ broker ("eventHostBroker") other than the LSST default (lsst8.ncsa.uiuc.edu) is used, this needs to be specified in the pipeline policy file under "eventBrokerHost".
1.8.5