-
Notifications
You must be signed in to change notification settings - Fork 6
Configuration
Programs and other required resources that are used in HPSMC jobs need to be specified using a config file in the INI format which is read by the Python configparser library.
This config file is automatically read from the following locations, in order:
-
.hpsmc
in the user home directory -
.hpsmc
in the current directory (where the job is executing) - file specified by the
-c
argument to a job script.
Multiple config files can be read, and the later settings will override earlier ones.
If all required configuration settings are not present, then the job script will typically crash with an error message indicating which setting is missing.
Configuration information is provided using the INI format with sections that contain keys and values.
The easiest way to understand the configuration that should be provided is by looking at an example.
This is the complete config for my local HPSMC installation:
[SLIC]
slic_dir=/work/slac/sim/slic/install/
hps_fieldmaps_dir=/work/slac/hps-fieldmaps
detector_dir=/work/slac/hps-java/hps-java/detector-data/detectors
[JobManager]
hps_java_bin_jar=/home/jermc/.m2/repository/org/hps/hps-distribution/4.5-SNAPSHOT/hps-distribution-4.5-SNAPSHOT-bin.jar
java_args=-Xmx1g -XX:+UseSerialGC -DdisableSvtAlignmentConstants
conditions_url=jdbc:mysql://mysql-node03.slac.stanford.edu:3306/rd_hps_cond
conditions_user=rd_hps_cond_ro
conditions_password=2jumpinphotons.
[LCIOCount]
lcio_bin_jar=/work/slac/sim/lcio/LCIO-02-07-05/target/lcio-2.7.4-SNAPSHOT-bin.jar
[EGS5]
egs5_dir=/work/slac/hps-mc/generators/egs5
[MG4]
mg4_dir=/work/slac/hps-mc/generators/madgraph4/src
[MG5]
mg5_dir=/work/slac/hps-mc/generators/madgraph5/src
Configuration is provided to each component with a header that matches the class name from the Python script. (This may result in a slight amount of redundant information, as each component has its own separate section.)
For example, if you are using the SLIC
component in your job script, then your configuration should include a [SLIC]
section with the required configuration settings.
Key | Description | Required | Notes |
---|---|---|---|
slic_dir | SLIC installation directory | yes | Should contain the file bin/slic
|
hps_fieldmaps_dir | HPS fieldmap files | yes | These need to be manually decompressed before running a job |
detector_dir | Detector directory | yes | This should be the directory detector-data/detectors in your copy of hps-java |
Example config:
[SLIC]
slic_dir=/scratch/slic/install/
hps_fieldmaps_dir=/scratch/hps-fieldmaps
detector_dir=/scratch/hps-java/detector-data/detectors
To run SLIC you will need local copies of the hps-java
and hps-fieldmaps
repositories.
This is the hps-java JobManager
class that is used to run lcsim XML steering files on LCIUO files.
Key | Description | Required | Notes |
---|---|---|---|
hps_java_bin_jar | Full path to executable jar | yes | Name of jar should have -bin in it |
java_args | Extra arguments to Java | no | Typically used to set memory limits, specify GC parameters, etc. |
conditions_url | URL of conditions database | no | |
conditions_user | Name of conditions database user | no | |
conditions_password | Password of conditions database user | no |
Example config:
[JobManager]
hps_java_bin_jar=/home/myusername/.m2/repository/org/hps/hps-distribution/4.5-SNAPSHOT/hps-distribution-4.5-SNAPSHOT-bin.jar
java_args=-Xmx1g -XX:+UseSerialGC -DdisableSvtAlignmentConstants
conditions_url=jdbc:mysql://mysql-node03.slac.stanford.edu:3306/rd_hps_cond
conditions_user=your_user_name
conditions_password=your_password
The conditions information typically does not need to be provided unless you would like to use an alternative database location or your job needs to write to the database.
Key | Description | Required | Notes |
---|---|---|---|
lcio_bin_jar | Full path to LCIO executable jar | yes | This should be present in the target dir of LCIO after building and installing it |
Example config:
[LCIOCount]
lcio_bin_jar=/scratch/lcio/target/lcio-2.7.4-SNAPSHOT-bin.jar
Each LCIO tool needs to be configured separately, which may result in some redundant configuration information.
Key | Description | Required | Notes |
---|---|---|---|
lcio_dir | Path to LCIO installation dir | yes | This should contain the file bin/dumpevent
|
[LCIODumpEvent]
lcio_dir=/scratch/lcio/install
The EGS5, Madgraph4 and Madgraph5 event generators are included but their locations still need to be specified in your config file. Each of these generators would have its own section in the config file ([EGS5]
, [MG5]
, etc.).
Key | Description | Required | Notes |
---|---|---|---|
egs5_dir | EGS5 directory | yes | Contains the sub-dirs config , data and src
|
mg4_dir | Madgraph4 directory | yes | This should actually be the directory generators/madgraph4/src in the hps-mc repo |
mg5_dir | Madgraph5 directory | yes | This should actually be the directory generators/madgraph5/src in the hps-mc repo |
Example config:
[EGS5]
egs5_dir=/scratch/hps-mc/generators/egs5
[MG4]
mg4_dir=/scratch/hps-mc/generators/madgraph4/src
[MG5]
mg5_dir=/scratch/hps-mc/generators/madgraph5/src
It is important to note that the locations of the generator source codes is NOT contained in the HPSMC installation directory but within the directory which contains the locally cloned git repository.
HPSMC includes a number of tools that are built automatically and do not require manual configuration. However, you will need to make sure that the bin
directory in the installation directory has been added to the path. This is done automatically by sourcing the environment script before running your jobs, e.g. source hps-mc/install/bin/hps-mc-env.sh
in bash.