How to run a Geant4 application on the GRID - PowerPoint PPT Presentation

About This Presentation
Title:

How to run a Geant4 application on the GRID

Description:

Transparent execution in sequential/parallel mode ... eval `diane.app.setup e csh` Execute the job: diane.startjob j macroFileName w workers_at_LCG ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 17
Provided by: guat
Category:
Tags: grid | application | csh | geant4 | run

less

Transcript and Presenter's Notes

Title: How to run a Geant4 application on the GRID


1
How to run a Geant4 application on the GRID
  • http//cern.ch/geant4

2
Contents
  • Requirements
  • Software tools
  • Geant4 application design
  • Geant4 application implementation
  • How to run on the GRID

3
Requirements
  • Same application code for sequential and parallel
    execution
  • Transparent execution in sequential/parallel mode
  • Transparent execution on a PC farm and on the
    Grid
  • Monitor the progress of the simulation execution
  • Traceability of failed tasks for debugging
    purposes

4
Software tools
Execution in distributed computing
Monte Carlo simulation
Analysis
DIANE
Abstract Interfaces for Data Analysis
www.cern.ch/geant4
www.cern.ch/diane
Physicist Interface (PI)
aida.freehep.org
lcg-pi.web.cern.ch/lcg-pi/
Component-based architecture software tools
5
DIANE
http//cern.ch/DIANE
Developed by J. Moscicki, CERN/IT
  • RD project
  • started in 2001 in CERN/IT with very limited
    resources
  • collaboration with Geant4 groups at CERN, INFN,
    ESA
  • succesful prototypes running on LSF and EDG

Master-Worker architectural pattern
  • Parallel cluster processing
  • make fine tuning and customisation easy
  • transparently using GRID technology
  • application independent

By J. Moscicki (CERN)
6
Application design
Generic Geant4 application design
  • Transparent execution of the simulation
  • In sequential mode
  • In parallel mode

Steering the simulation execution in the DIANE
framework
Initialize () ExecuteMacro () Finish () SetSeed()
Encapsulate the essential actions to execute a
simulation
Initialize,
Concrete class derived from IG4Simulation
7
Implementation
Example geant4/examples/extended/parallel/ExDiane
Derived from the Brachytherapy advanced example
www.ge.infn.it/geant4/examples/index.html
8
Main
  • include BrachySimulation.hh
  • Int main(int argc, char argv)
  • BrachySimulation simulation new
    BrachySimulation(0)
  • simulation -gt initialize(argc, argv)
  • If (argc gt 1) mn argv1
  • simulation -gt executeMacro(mn)
  • simulation -gt finish()
  • delete simulation
  • return 0

9
BrachySimulation.cc
BrachySimulation inherits from DIANEIG4Simulatio
n
  • BrachySimulationBrachySimulation(G4int seed)
  • BrachySimulationBrachySimulation()
  • void BrachySimulationsetSeed(G4int sd) // Set
    the seed interactively
  • seed sd
  • HepRandomsetTheSeed(seed)
  • G4bool BrachySimulationinitialize(int, char)
  • .
  • runManager new G4RunManager
  • runManager -gt SetUserInitialization(detectorConstr
    uction)
  • runManager -gt SetUserInitialization(physicsList)
  • runManager -gt SetUserAction(primaryParticles)
  • runManager -gt Initialize()
  • void BrachySimulationexecuteMacro(G4String
    fileName) // Execution of the macro file

No other code changes
10
Execution of a G4 application in a distributed
environment
11
Practical Example
  • Example simulation with analysis
  • The job is divided into tasks
  • The tasks are executed on worker components
  • Each task produces a file with histograms
  • Job result sum of histograms produced by tasks
  • Master-worker model
  • Client starts a job
  • Workers perform tasks
  • and produce histograms
  • Master integrates the
  • results

Start the execution
Result
Result 1
Result n
12
Example of a macro
  • Application G4Analysis
  • WorkerInitData
  • G4ApplicationcomponentName G4Brachy
  • InitMacroFile
  • /control/verbose 1
  • /run/verbose 1
  • /event/verbose 1
  • /run/initialize
  • JobInitData
  • runParams
  • seed 0, // Initial seed
  • eventNumber 100000 // Total
    number of events of the job
  • macroFileTemplate /run/beamOn
    ,
  • eventsPerWorker 10000 // The
    job is subdivided in 10 tasks
  • workerInit WorkerInitData

13
Distributed computing resources
14
Running on the GRID
Master
  • DIANE is installed
  • Source the environment of DIANE
  • cd G4Myapplication
  • eval diane.app.setup e csh
  • Execute the job
  • diane.startjob j macroFileName w workers_at_LCG
  • wms LCG_SITES_LIST --ganga

Name of the macro file
Result n
Result 1
Number of workers
List of the sites
  • Workers on the GRID
  • Geant4, AIDA and PI are preinstalled
  • DIANE and G4Brachy are downloaded from the web
  • DIANE and G4Brachy are installed
  • The tasks are executed

The results of the tasks (analysis objects) are
sent back to the Master
15
Example of results
On the Master
  • diane.workspace/jobs/ID_job
  • Contains the results of the simulation analysis
    objects
  • profile.job contains the monitoring of the
    execution of the tasks

16
Documentation
  • Documentation on DIANE
  • http//www.cern.ch/diane
  • Installing and compiling DIANE
  • Compiling and running a Geant4 application
    through DIANE
Write a Comment
User Comments (0)
About PowerShow.com