MonteCarlo Production - PADME-Experiment/padme-fw GitHub Wiki

How to use the MonteCarlo production package

Log on the production machine (to be defined) with the production account (to be defined).

Go to the top production directory

> cd MCProd

Choose a name for your production. This name must be unique, cannot contain blanks, and should give some "human readable" information on its content (better recommendations to be added). E.g. mceplus550MeV_000

Create the macro file to be used for the production. The file should be named <name_of_the_production>.cfg and placed in the "cfg" subdirectory of MCProd. E.g. cfg/mceplus550MeV_000.cfg

Decide how many jobs you want to launch and what site to use. Currently two sites are available: LNF(default) and CNAF.

Start the production:

> PadmeMCProd -n <production_name> -j <number_of_jobs> -s <site>

e.g. to launch 100 jobs on the CNAF site:

> PadmeMCProd -n mceplus550MeV_000 -j 100 -s CNAF

The production script will then:

  • ask the user for the certificate password (to be defined) to create a long-lived passwordless proxy to be used by the jobs
  • create a directory named prod/<production_name>: this directory will contain a set of job directories, one per submitted job, where all the job-related information will be stored.
  • create a directory named mcprod/<production_name> in the PADME area of the CNAF tape library: all output from the jobs will be automatically copied here
  • create the production in the MCProdDB database at LNF
  • submit all the jobs to the CE of the selected site (and register them on the MCProdDB database)
  • start polling the jobs every 5 mins waiting for them to end
  • when a job ends, collect job stdout and stderr files and update job entry in DB with final information (job duration, events produced, errors, ...)
  • when all jobs have ended, save final production information in the database and exit

The current version of the production manager requires a terminal to be connected all the time. In the final version the production manager will "demonize" itself after initializing the jobs.

MC Production nodes configuration

In order to run the PADME MC production software, nodes should be configured according to the following guidelines.

Production manager node

The production manager software can be obtained from the PADME github repository and is located in the padme-fw/PadmeMCProd directory of the main repository on GitHub.

The production manager node can be created starting from a basic grid UI. The following additional software packages are required to run the production manager software:

  • voms - creation of long-lived proxy and VOMS proxy
  • glite - job submission and retrieval
  • gfal - data transfer between CNAF tape library and LNF disk server
  • python - version 2.3 or newer is required to use the subprocess package
  • MySQL-python - handles connection to the PadmeMCDB database
  • python-daemon - allows the production manager to demonize itself after starting the production

The node must have access to the MySQL server hosting the PadmeMCDB database and the following related environment variables must be defined:

  • PADME_MCDB_HOST - Name of the host where the MySQL server is running
  • PADME_MCDB_PORT - Port to access the MySQL server, usually 3306
  • PADME_MCDB_USER - MySQL username with privileges on PadmeMCDB, usually padmemc
  • PADME_MCDB_PASSWD - Password for user PADME_MCDB_USER
  • PADME_MCDB_NAME - Name of the database containing MC production information, usually PadmeMCDB

N.B. the official PadmeMCDB database will be hosted on the central MySQL server at LNF-IT. In order to access/update the database, a node must be included in the list of authorized nodes. (Need a procedure to add new nodes)

If the production manager node is to be used also for code development and DB maintenance (e.g. DB backup), the following packages are also needed:

  • git - tools to interact with the PADME git repository
  • mysql - tools to interact with the MySQl server

Worker Node

In order to run the production job, the following software packages must be installed on all WNs :

  • python - version 2.3 or newer is required to use the subprocess package
  • voms - tools to renew the VOMS proxy from the long-lived proxy
  • gfal - tools to copy the output files to the CNAF tape library

In order to run the PadmeMC software, all worker nodes must have read access to the following CVMFS areas:

  • /cvmfs/padme.roma1.infn.it (will become /cvmfs/padme.infn.it) - grid-enabled PadmeMC software package
  • /cvmfs/sft.cern.ch - LCG, gcc, and ROOT
  • /cvmfs/geant4.cern.ch - GEANT4

As the PadmeMC output files are initially created in the job working directory, WNs must be configured to run the PADME jobs from an area providing >10GB of local disk space (this limit might grow).

⚠️ **GitHub.com Fallback** ⚠️