Repository navigation
submit simulation worker reference
This page is generated from docs/submit-simulation/worker-reference.md. Edit the repository source; automated publishing replaces direct wiki edits.
src/workflows/slurm-submission/external/submit_GEMC_sample.sh was obtained from the RG-M job-submission code represented by submit_GEMC_GENIE_sample.sh and submit_GEMC_uniform_sample.sh under legacy/GEMC-samples/scripts/job_submission_scripts/. It has been modified for this project, but keeps the RG-M scripts' overall structure and usage pattern: Slurm supplies one array index, environment variables identify the input and detector settings, GEMC runs first, and reconstruction follows. The archived originals remain untouched.
This external payload is one of the project's deliberately modular RG-M boundaries. Maintained Python code validates and resolves inputs but does not duplicate the detector commands. When RG-M provides an updated job script, compare it with this payload and carry forward the small generator-independent adaptation described below. The external payload remains excluded from routine edits so its RG-M lineage and update path stay clear.
Only the sample monitoring and filename-prefix sections differ:
-
SAMPLE_GENERATORidentifies uniform, GENIE or any other generator. -
GENERATOR_TUNEreplaces the GENIE-specific tune variable. -
SAMPLE_FILE_PREFIXsupplies the complete prefix instead of hardcoding either the uniform or GENIE naming formula. - Target, Q², beam, GEMC data directory and uniform channel monitoring are retained together. Unset optional labels print empty values, as in the originals.
For uniform samples, a prefix can be Uniform__enFD__2070MeV. For physical samples, it can be C12__genie-gst__GEM21_11a_00_000__Q2_0_02__2070MeV. Double underscores separate metadata values; hyphens inside one value, such as genie-gst, remain unchanged. Other generators supply their own prefix without adding branches to the script.
The Slurm header, field settings, directory assignments, GEMC command and reconstruction command retain the legacy GENIE payload structure. The event-count assignment is generalized to require JOB_NEVENTS from the coordinator. There are no command arrays, parser, preview mode, directory creation, input validation or output checks added to this script.
The payload processes JOB_NEVENTS events with solenoid -1.0 and TORUS_FIELD supplied by the caller. The same count is passed to GEMC and reconstruction. Paths follow:
OUTPATH/lundfiles/SAMPLE_FILE_PREFIX_SLURM_ARRAY_TASK_ID.txt
OUTPATH/mchipo/mc_SAMPLE_FILE_PREFIX_SLURM_ARRAY_TASK_ID_torusTORUS_FIELD.hipo
OUTPATH/reconhipo/recon_SAMPLE_FILE_PREFIX_SLURM_ARRAY_TASK_ID_torusTORUS_FIELD.hipo
Create the directories before direct execution. gemc and recon-util must be available in PATH. Execute with Bash or submit with sbatch; the script does not itself submit a job. Direct execution retains legacy failure behavior: without a caller-supplied Bash -e, a failed GEMC command does not automatically prevent reconstruction. After Slurm accepts an array, neither this worker nor the coordinator reports task failures back into a maintained job ledger, retries them, or validates their reconstructed HIPO content. Operators must inspect Slurm states and logs and verify at least one reconhipo/ file with hipo-utils -dump; see the submission guide.
| Variable | Purpose |
|---|---|
SAMPLE_FILE_PREFIX |
Complete filename prefix, without the _INDEX.txt suffix |
JOB_NEVENTS |
Configured per-task event limit shared by the array; required |
SAMPLE_GENERATOR, GENERATOR_TUNE
|
Generator/tune monitoring labels |
SAMPLE_TARGET_NUCLEUS, Q2_CUT
|
Target and Q² monitoring labels |
BEAM_ENERGY_LABEL, DETECTOR_ENERGY_GROUP, UNIFORM_SAMPLE_CHANNEL, GEMC_DATA_DIR
|
Beam/resource-group/channel/environment monitoring |
OUTPATH, SLURM_ARRAY_TASK_ID
|
Run directory and file index |
TORUS_FIELD |
+0.5 at 2 GeV; −1 at 4/6 GeV |
GCARD_FILE, YAML_FILE
|
Detector and reconstruction configurations |
The sourced src/workflows/slurm-submission/setup_and_submit.csh invokes submit.py, which checks the preloaded environment and inputs and ensures both simulation output directories exist. Preview creates only missing directories; --execute recreates both and passes these settings to sbatch for one array per sample. Slurm exports the configured environment and supplies the task index. The configured event limit is shared by the array, including a shorter final LUND file; it is not an exact per-file count.
source run.csh --workflow submit refreshes the disposable server checkout and sources the setup script directly in the login shell. The Python coordinator imports resolve_inputs.py to resolve the LUND manifest, optional key=value config and CLI. There is no site JSON, local detector runner, lock database or generated wrapper. The payload retains its scheduler directives and detector commands unchanged.
CMake installs only this external payload under bin/. The setup workflow runs from the checkout through run.csh. Review the submission guide for settings and output replacement.
Generated from the alons126/CLAS12-sample-tools documentation.
Source links use branch dev. Source checkout: d5987f01550d; commit date: 2026-10-13T14:52:09+03:00. Source checkout was clean when generated.
- Getting started
- Dependencies and execution environments
- Quickstart
- Run directories and outputs
- Troubleshooting
- Create LUND files
- Uniform LUND creation
- Physical LUND conversion
- LUND-creation configuration reference
- Uniform monitoring
- LUND-creation examples
- Sample profiles
- Submit GEMC and reconstruction jobs
- Ifarm environment and checkout model
- Simulation submission guide
- Submission configuration reference
- Follow jobs and verify output
- Submission examples
- GEMC and reconstruction worker
- Concepts and contracts
- Architecture
- LUND data contract and provenance
- Sampling models and random numbers
- External geometry and detector inputs