Analysis How-To » History » Version 3
Richard Trotta, 04/30/2019 01:28 PM
| 1 | 1 | Richard Trotta | h1. Analysis How-To |
|---|---|---|---|
| 2 | |||
| 3 | {{>toc}} |
||
| 4 | 2 | Richard Trotta | |
| 5 | h2. How should I analyze data? |
||
| 6 | |||
| 7 | * Doing things locally will always be your best option for actual analysis. |
||
| 8 | ** Fork a repo of hallc_replay_kaonlt %{color:red}and% UTIL_KAONLT for your own custom version that you can play with |
||
| 9 | ** !! |
||
| 10 | |||
| 11 | * Once you have forked the repo, clone hallc_replay_kaonlt to a local directory |
||
| 12 | ** !! |
||
| 13 | |||
| 14 | * Now the tricky part, UTIL_KAONLT is a submodule of hallc_replay_kaonlt so some intermediate steps will need to be made |
||
| 15 | ** !! |
||
| 16 | ** Check .gitmodules to make sure submod is listed |
||
| 17 | ** !! |
||
| 18 | ** !! |
||
| 19 | |||
| 20 | * If HEAD is detached (check with git branch -a) |
||
| 21 | ** !! |
||
| 22 | ** !! |
||
| 23 | |||
| 24 | * Check if head is really detached |
||
| 25 | ** !! |
||
| 26 | ** !! |
||
| 27 | |||
| 28 | * Change to master branch |
||
| 29 | ** !! |
||
| 30 | |||
| 31 | * Pull and check branch again, everything should be set! |
||
| 32 | ** !! |
||
| 33 | |||
| 34 | * Now that we have our repo locally we should set it up to pull from the “main” JeffersonLab version |
||
| 35 | |||
| 36 | * First check your remote “origin” repo (this is where you will push to) |
||
| 37 | ** !! |
||
| 38 | |||
| 39 | * Now that we have our repo locally we should set it up to pull from the “main” JeffersonLab version |
||
| 40 | |||
| 41 | * First check your remote “origin” repo (this is where you will push to) |
||
| 42 | ** !! |
||
| 43 | |||
| 44 | * Next lets set up the “upstream” which is the JeffersonLab repo (DO NOT push HERE) |
||
| 45 | ** !! |
||
| 46 | |||
| 47 | * You will not be able to push to upstream unless you’re Stephen or me so don’t worry too much. Just be cautious. |
||
| 48 | |||
| 49 | * A similar procedure can be performed with UTIL_KAONLT |
||
| 50 | |||
| 51 | * Finally, let's talk about branches. Let’s add the develop branch to our local system… |
||
| 52 | ** First create a branch locally called develop and change to it |
||
| 53 | ** !! |
||
| 54 | |||
| 55 | * Now simply pull develop |
||
| 56 | ** !! |
||
| 57 | |||
| 58 | * To create a new branch you must first create it in github |
||
| 59 | ** !! |
||
| 60 | |||
| 61 | * Then simply repeat the steps for setting up a branch from the previous slide |
||
| 62 | |||
| 63 | h2. Replaying |
||
| 64 | |||
| 65 | * Before we can analyze we must replay. This should be done in the farm to save yourself time and local cpu effort. The easiest way is to do a batch job submission, but this comes with some prep work. |
||
| 66 | |||
| 67 | * Before a batch submission, I highly encourage two preliminary steps |
||
| 68 | ## Do all debugging of replays locally, once this works move to the farm |
||
| 69 | ## Once on the farm you have two options; your ifarm version or our group (discussed soon). This is for final debugging purposes to assure everything works in the farm, then you can submit a batch job. Save the root files in /volatile/hallc/c-kaonlt/<USER> (note: volatile is NOT backed up) |
||
| 70 | |||
| 71 | * There is a batch script I have created and Stephen as changed with the help of Brad to assure it will not mess things up. Again, I highly recommend the two above steps before moving onto this script or you will be wasting time and resources. |
||
| 72 | |||
| 73 | * Your final batch job submissions can be saved directly to tape. |
||
| 74 | 3 | Richard Trotta | |
| 75 | h2. Group environment |
||
| 76 | |||
| 77 | * You can do replays under your farm directory or you can use our group environment. |
||
| 78 | |||
| 79 | * We have set up a group environment with a version of our repo that currently mimics the cdaq as close as possible (although an updated hcana is used). |
||
| 80 | ** This group environment is under /u/group/c-kaonlt |
||
| 81 | ** I have made a directory USERS which you can use for person replay scripts and environments. DO NOT change any replays that are not under USERS without contacting Stephen or me first. |
||
| 82 | ** There is an hcana already set up here, use this for any group replays. If you would like to use a different version of hcana please use your farm directory. If I find a hcana in USERS I will destroy it. |
||
| 83 | |||
| 84 | * You may have issues with hcana, make sure you are in the JLab software environment version 2.1 |
||
| 85 | ** source /site/12gev_phys/softenv.csh 2.1 (or .sh if using bash) |
||
| 86 | |||
| 87 | * The group environment has a 100 gb quota and is backed up. This means two important things… |
||
| 88 | ## DO NOT save root files here! Ever! |
||
| 89 | ## It’s backed up so its good for important calibration work (*wink *wink) |
||
| 90 | |||
| 91 | * Upon the request of Stephen, any improper use of this environment will incur a penalty of one beer/bottle of single malt or an owl shift (depending upon severity). |
||
| 92 | |||
| 93 | h2. Writing to tape |
||
| 94 | |||
| 95 | * Writing to tape info, read - https://scicomp.jlab.org/docs/write-through-cache. |
||
| 96 | |||
| 97 | * In your batch script, specify OUTPUT_FILE:/cache/hallc/kaonlt/USER/ROOTfiles/FILE. |
||
| 98 | ** Material in /cache is automatically copied to tape after some time if it is static |
||
| 99 | ** Small files (~1 MB) will not be backed up on tape |
||
| 100 | ** Once copied to tape, you can view the tape stub (NOT the file itself) under /mss/hallc/kaonlt/… |
||
| 101 | ** The tape does not handle overwriting well so if submit a job you must create a new "pass" directory… |
||
| 102 | *** -->jput ... file.root /mss/hallc/kaonlt/USER/ROOTfiles/pass1/ |
||
| 103 | ** The tape has FAR more space than we could get through so do not worry about "filling" it |
||
| 104 | ** Write to tape once you're happy with your code... just do it correctly |