sherpa is hosted by Hepforge, IPPP Durham
close Warning:
  • Error with navigation contributor "BrowserModule"
  • Failed to sync with repository "(default)": instance.__dict__ not accessible in restricted mode; repository information may be out of date. Look in the Trac log for more information including mitigation strategies.

Running Sherpa docker containers

As of version 2.2.2 we provide docker images on dockerhub (https://hub.docker.com/u/sherpamc/)

A basic version comes with rivet and ufo support while a more advanced build comes with Openloops and LHAPDF.

Both images come with mpirun support.


Obtaining docker images

The images can be pulled from dockerhub as such

docker pull sherpamc/sherpa-basic:2.2.2

for the basic version and

docker pull sherpamc/sherpa:2.2.2

for the version that comes with Openloops and a fairly complete selection of loop processes.

Running docker images

After pulling an image Sherpa can be used immediately through an interactive shell. A simple example would be

docker run -it sherpamc/sherpa-basic:2.2.2 bash

This command 'boots' the docker image and uses bash as entrypoint.

As Sherpa is installed in /usr/local Sherpa could for instance be invoked from within the docker container as such:

mpirun -n 6 Sherpa /usr/local/share/SHERPA-MC/Examples/Jets_at_LeptonColliders/LEP_Jets/Run.dat

Running with local folders mounted

To make e.g. the current directory on the host system available in the Docker container, the following command can be used:

docker run -it -v $PWD:$PWD -w $PWD sherpamc/sherpa-basic:2.2.2 bash

If the current directory contains a run card, the following command will invoke Sherpa directly and all output files will be readily available on the host system:

docker run -it --rm -v $PWD:$PWD -w $PWD sherpamc/sherpa-basic:2.2.2 Sherpa -f Run.dat EVENTS=1000

In cases where you get error messages such as

Sherpa: Process_Group::ConstructProcesses throws fatal error: 
   Cannot open '/mt/home/hschulz/Docker/MCnetDocker/Sherpa/release/SHERPA-MC-2.2.2/bl2/workdir/Process/Sherpa/2_2__j__j__l__l.map'

the docker user won't have write permissions in the current directory. This can be overcome by specifying the user id as such:

docker run -it -u `id -u $USER` --rm -v $PWD:$PWD -w $PWD sherpamc/sherpa-basic:2.2.2 Sherpa -f Run.dat EVENTS=1000

Generate UFO model and run custom rivet analysis

This example shows how to firstly run Sherpa-generate-model through docker and how to build and use a custom rivet analysis (i.e. one that is not included in Rivet2.5.3)

docker run -it  --rm -u `id -u $USER`  -v $PWD:$PWD -w $PWD sherpamc/sherpa-basic:2.2.2 Sherpa-generate-model --installdir $PWD MY_UFO_MODEL

The model library will be installed in the hosts $PWD.

docker run -it  --rm -u `id -u $USER`  -v $PWD:$PWD -w $PWD sherpamc/sherpa-basic:2.2.2 rivet-buildplugin RivetNewAnalysis.so NewAnalysis.cc

Both commands assume that the model folder as well as the rivet analysis code are present in the hosts $PWD.

To set the RIVET_ANALYSIS_PATH and run Sherpa with the new model --- assuming that the corresponding (analysis) block was added to the Example runcard, i.e. that this is present in the runcard

(analysis) {
BEGIN_RIVET {
-a NewAnalysis
} END_RIVET
}(analysis)

--- Sherpa can be invoked as such:

docker run -it -e "RIVET_ANALYSIS_PATH=$PWD" --rm -u `id -u $USER`  -v $PWD:$PWD -w $PWD sherpamc/sherpa-basic:2.2.2 Sherpa -f MY_UFO_MODEL_Example_Run.dat ANALYSIS=Rivet 

Simplification of command

For convenience, an alias can be created as such

alias Sherpa='docker run -it -e "RIVET_ANALYSIS_PATH=$PWD" --rm -u `id -u $USER`  -v $PWD:$PWD -w $PWD sherpamc/sherpa-basic:2.2.2 Sherpa'

Doing so allows to run the above example in this way:

Sherpa -f MY_UFO_MODEL_Example_Run.dat ANALYSIS=Rivet
Last modified 20 months ago Last modified on Apr 25, 2017 11:33:34 AM