Skip to content

Commit d6b4ee1

Browse files
committed
Update on ifarm tutorials
1 parent 776e1c1 commit d6b4ee1

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

docs/tutorials/ifarm.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ But there is a separate `#SBATCH --error=` can be added to split output and erro
4646

4747

4848
There are several approaches how to run eic_shell under the slurm on ifarm.
49-
For Meson-Structure campaigns we create 2 scripts: one for batch submission and another one for what to do in the container.
5049

51-
`eic_shell` is a slim wrapper around singularity (or now apptainer) containers.
50+
For Meson-Structure campaigns we create 2 scripts: one for batch submission and another one for what to do in the container (listed below). It is also possible to run just one script with slurm command.
51+
52+
53+
`eic_shell` is a slim wrapper around singularity (or now apptainer) containers. Instead of eic_shell direct singularity command could be used.
5254

5355
```bash
5456
singularity exec -B /host/dir:/container/dir {image} script_to_run.sh
@@ -71,6 +73,22 @@ Where:
7173
```
7274
- `script_to_run.sh` your script to run in the eic shell
7375

76+
Here is an example (it is wordy but it illustrates real ifarm paths and images)
77+
78+
```bash
79+
singularity exec \
80+
-B /volatile/eic/romanov/meson-structure-2025-07:/volatile/eic/romanov/meson-structure-2025-07 \
81+
/cvmfs/singularity.opensciencegrid.org/eicweb/eic_xl:25.07-stable \
82+
/volatile/eic/romanov/meson-structure-2025-07/reco/k_lambda_18x275_5000evt_073.container.sh
83+
```
84+
85+
Instead of `script_to_run.sh` one can put commands directly, but it might be tricky in terms of quotes, special symbols, etc. Here is an example from [csv_convert/convert_campaign.slurm.sh](https://github.com/JeffersonLab/meson-structure/blob/main/csv_convert/convert_campaign.slurm.sh):
86+
87+
```bash
88+
singularity exec -B "$CAMPAIGN":/work -B "$CSV_CONVERT_DIR":/code "$IMG" \
89+
bash -c 'cd /code && python3 convert_campaign.py /work && cd /work && for f in *.csv; do zip "${f}.zip" "$f"; done'
90+
```
91+
7492
For simulation campaign [full-sim-pipeline/create_jobs.py](https://github.com/JeffersonLab/meson-structure/blob/main/full-sim-pipeline/create_jobs.py) create such jobs for each hepmc file.
7593

7694

0 commit comments

Comments
 (0)