Skip to content

Commit 72fa9a9

Browse files
committed
update explanation
1 parent 1c810eb commit 72fa9a9

1 file changed

Lines changed: 70 additions & 15 deletions

File tree

_extras/short_submission.md

Lines changed: 70 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,91 @@
22
title: Short submission with your own code
33
---
44

5-
## this collects the sequence of steps for a batch submission with local code which produces both an artroot and root file
5+
## this collects the sequence of steps for a batch submission with local code which produces both an artroot and root file.
6+
7+
It splits out different functions so you need to examine/adapt all of the support scripts which can be found [here](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/files/usefulcode.tar).
8+
9+
This sequence assumes you are in your top level mrb directory.
610

711
### in your top level mrb directory
812

13+
914
For example `/exp/dune/app/users/$USER/myworkarea`
1015

1116
need to have a name for it as you will be making a tarball
1217

1318
~~~
1419
export DIRECTORY=myworkarea
1520
~~~
21+
{: ..language-bash}
1622

1723
### copy these scripts into that top level directory
1824

1925
You can access a tarball with them all [here](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/files/usefulcode.tar).
2026

21-
Download that tarball into the top level directory for your build and `tar xBf usefulcode.tar` to get the code.
27+
Download that tarball into the top level directory for your build and
28+
29+
~~~
30+
tar xBf usefulcode.tar
31+
~~~
32+
{: ..language-bash}
33+
34+
to get the code.
2235

23-
Here are links to each of the scripts.
36+
### here are the scripts..
2437

25-
[setup-grid](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/setup-grid) (should not need to modify)
38+
#### utilities you need
2639

27-
[maketar.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/maketar.sh)
40+
- [setup-grid](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/setup-grid) (should not need to modify)
41+
This replaces `setup` in your local_build directory.
42+
43+
- [maketar.sh $DIRECTORY](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/maketar.sh)
2844
(should not need to modify)
45+
This takes the contents of `$DIRECTORY` and makes a tarball in `/exp/data/users/$USER/`
46+
47+
- [makerdcs.sh $DIRECTORY](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/makerdcs.sh) (should not need to modify)
48+
This takes the tarball and copies it to /cvmfs/ where grid jobs can find it. It places the location in the file `$DIRECTORY/cvmfs.location` so you can find it.
49+
50+
#### setup scripts
51+
52+
- [setup_before_submit.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/setup_before_submit.sh) (customize versions for your code)
53+
You need to modify this to reflect the code version you are setting up. Normally only need to run/modify this once/session.
54+
55+
56+
- [job_config.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/job_config.sh) (you modify this to reflect your workflow. Sets things like $FCL_FILE). This sets up essential job parameters. You need to understand and modify these appropriately for your purpose.
2957

30-
[makerdcs.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/makerdcs.sh) (should not need to modify)
58+
#### Script to test and submit jobs
3159

32-
[job_config.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/job_config.sh) (you modify this to choose things like MQL query, number of events..)
60+
- [test_workflow.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/test_workflow.sh) (script to do interactive tests of your jobscript)
3361

34-
[setup_before_submit.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/setup_before_submit.sh) (customize versions for your code)
62+
- [submit_workflow.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/submit_workflow.sh) (writes output to scratch. Modify running time and memory)
3563

36-
[submit_workflow.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/submit_workflow.sh) (modify running time and memory)
64+
- [submit_workflow_rucio.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/submit_workflow_rucio.sh) (writes output to rucio. Modify running time and memory)
3765

38-
[test_workflow.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/test_workflow.sh) (script to do interactive tests of your jobscript)
3966

67+
#### scripts that run on the remote machine
4068

4169
[extractor_new.py](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/extractor_new.py) (this makes metadata for your files)
4270

4371
[submit_local_code.jobscript.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/submit_local_code.jobscript.sh) (may need to modify if expert)
4472

4573

4674

47-
### modify two scripts (should not need to change the others)
75+
## How to run these scripts
4876

49-
edit `setup_before_submit.sh` if you change code versions and `job_config.sh` if you change more temporary things like fcl files .
77+
### modify two-three scripts (should not need to change the others)
78+
79+
edit
80+
81+
- `setup_before_submit.sh` if you change code versions and
82+
- `job_config.sh` if you change more temporary things like fcl files.
5083

5184
- choose your code version (code version has to match your build)
5285
- *make certain the fcl file is either in the fcl path or in `$DIRECTORY`*
5386
- add a string `APP_TAG` that will go in your filename
5487
- add a description in `DESCRIPTION`
5588

56-
Then run it to set things up
89+
Then run those scripts to set things up
5790

5891
~~~
5992
source setup_before_submit.sh # sets up larsoft
@@ -67,20 +100,42 @@ If you have changed any scripts or code, you must redo this.
67100
./maketar.sh $DIRECTORY
68101
./makercds.sh $DIRECTORY
69102
~~~
103+
{: ..language-bash}
70104

71-
will take a while, produce a tarball on `/exp/dune/data/users` and put the cvmfs location in cvmfs.location in `$DIRECTORY`
105+
will take a while, produce a tarball on `/exp/dune/data/users/$USER/` and put the cvmfs location in cvmfs.location in `$DIRECTORY`
72106

73107
Then edit `job_config.sh` to reflect the # of events you want and other run-time parameters.
74108

109+
### Test your jobscript interactively
110+
111+
[test_workflow.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/test_workflow.sh)
112+
113+
results will show up in the 'tmp' area on your local machine.
114+
115+
75116
### Submit the job
76117

77118
[submit_workflow.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/submit_workflow.sh)
78119

120+
This one writes to `/pnfs/dune/scratch`
121+
79122
~~~
80123
./submit_workflow.sh
81124
~~~
125+
{: ..language-bash}
126+
127+
[submit_workflow_rucio.sh](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/submit_workflow_rucio.sh)
128+
129+
This one writes to a rucio location specified by `$NAMESPACE`
130+
131+
~~~
132+
./submit_workflow_rucio.sh
133+
~~~
134+
{: ..language-bash}
135+
136+
### after submission
82137

83-
should get a workflow number back
138+
You should get a workflow number back
84139

85140
go to [justin](https://dunejustin.fnal.gov/dashboard/?method=list-workflows)
86141

0 commit comments

Comments
 (0)