You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _extras/short_submission.md
+70-15Lines changed: 70 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,58 +2,91 @@
2
2
title: Short submission with your own code
3
3
---
4
4
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.
6
10
7
11
### in your top level mrb directory
8
12
13
+
9
14
For example `/exp/dune/app/users/$USER/myworkarea`
10
15
11
16
need to have a name for it as you will be making a tarball
12
17
13
18
~~~
14
19
export DIRECTORY=myworkarea
15
20
~~~
21
+
{: ..language-bash}
16
22
17
23
### copy these scripts into that top level directory
18
24
19
25
You can access a tarball with them all [here](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/files/usefulcode.tar).
20
26
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.
22
35
23
-
Here are links to each of the scripts.
36
+
### here are the scripts..
24
37
25
-
[setup-grid](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/setup-grid) (should not need to modify)
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.
29
57
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
31
59
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)
33
61
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)
35
63
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)
37
65
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)
39
66
67
+
#### scripts that run on the remote machine
40
68
41
69
[extractor_new.py](https://github.com/hschellman/computing-basics-batch-devel/blob/gh-pages/_includes/extractor_new.py) (this makes metadata for your files)
42
70
43
71
[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)
44
72
45
73
46
74
47
-
### modify two scripts (should not need to change the others)
75
+
##How to run these scripts
48
76
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.
50
83
51
84
- choose your code version (code version has to match your build)
52
85
-*make certain the fcl file is either in the fcl path or in `$DIRECTORY`*
53
86
- add a string `APP_TAG` that will go in your filename
54
87
- add a description in `DESCRIPTION`
55
88
56
-
Then run it to set things up
89
+
Then run those scripts to set things up
57
90
58
91
~~~
59
92
source setup_before_submit.sh # sets up larsoft
@@ -67,20 +100,42 @@ If you have changed any scripts or code, you must redo this.
67
100
./maketar.sh $DIRECTORY
68
101
./makercds.sh $DIRECTORY
69
102
~~~
103
+
{: ..language-bash}
70
104
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`
72
106
73
107
Then edit `job_config.sh` to reflect the # of events you want and other run-time parameters.
0 commit comments