Swizzle » History » Version 24

Michael Kirby, 11/19/2015 09:37 AM

1 24 Michael Kirby
h1. HORRIBLE BAD Instructions for setting up to swizzle.
2 24 Michael Kirby
3 24 Michael Kirby
4 1 Eric Church
5 1 Eric Church
When you swizzle -- that is, convert from the DAQ binary to ART ROOT data format -- you want to read the binary data with the guaranteed-same code with which you wrote it. That is the reason for the existence in the first place of uboonedaq_datatypes. It's its own ups package against which we set up and build for both the DAQ running and the swizzling. 
6 1 Eric Church
7 18 Michael Kirby
---------------start of edits from Kirby-------------------------
8 18 Michael Kirby
9 17 Michael Kirby
If all you want is to run with a LArSoft -- particularly, the uboonecode build -- that was built against this version of uboonedaq_datatypes you can do that as described in this section. We have installed this version for v5_00_01. So, set up on as follows. Do not set up as if you were going to do DAQ readout or run control or develop uboonedaq_datatypes. These instructions will allow you to swizzle in larsoft v04_05_00 files that were generated with uboonedaq_datatypes v05_00_01 (which as of May 11, 2015 are the only binary *.ubdaq files that have been recorded).
10 17 Michael Kirby
11 17 Michael Kirby
12 17 Michael Kirby
scp ubdaq-prod-near1:/datalocal/kirby/swizzler_v04_05_00.tgz ./
13 17 Michael Kirby
tar xzf swizzler_v04_05_00.tgz
14 17 Michael Kirby
cd swizzler_v04_05_00
15 17 Michael Kirby
source /uboone_offline/setup
16 17 Michael Kirby
export PRODUCTS=`pwd`/localProducts_larsoft_v04_05_00_e7_prof:${PRODUCTS}
17 17 Michael Kirby
setup uboonedaq_datatypes v5_00_01 -q e7:prof
18 17 Michael Kirby
setup uboonecode v04_05_00 -q e7:prof
19 17 Michael Kirby
lar -c ./localProducts_larsoft_v04_05_00_e7_prof/rawtorootconvert.fcl
20 17 Michael Kirby
21 17 Michael Kirby
22 17 Michael Kirby
You will need to modify the rawtorootconvert.fcl to point at your binary ubdaq file, and possibly modify that output file name. Note that %ifb takes the input file basename and then tacks on additional information, in the case of the provided fcl file "_swizzled_v04_05_00.root".
23 17 Michael Kirby
24 17 Michael Kirby
-------------- end of edits from Kirby --------------------------
25 21 Eric Church
@source /uboone_offline/setup
26 21 Eric Church
export PRODUCTS=$PRODUCTS:/uboonenew
27 21 Eric Church
setup uboonedaq_datatypes v6_08_00 -qe7:debug
28 21 Eric Church
setup uboonecode v04_08_00 -qe7:debug                    
29 1 Eric Church
setup mrb; setup git; setup gitflow
30 2 Eric Church
export MRB_PROJECT=larsoft@
31 1 Eric Church
Go run your @lar -c job.fcl@ script. 
32 6 Eric Church
33 1 Eric Church
You may stop here if you care nothing about maintaining/installing or how the sausage is made. 
34 2 Eric Church
35 1 Eric Church
h1. There is one important technical issue here for running LArSoft on the DAQ.
36 1 Eric Church
37 1 Eric Church
That is, LArSoft runs gcc4.9.1 and boost 1.59, and the DAQ uses gcc4.7, boost1.55. We begin by making a vx_yy_zz version of uboonedaq_datatypes with these new qualifiers. Go to the quickstart page for uboonedaq_datatypes at the top of the DAQ wiki and jump to the bottom of those instructionns to see how we do that, if interested.
38 2 Eric Church
39 17 Michael Kirby
h1. LArSoft installed on the LArTF cluster.
40 1 Eric Church
41 17 Michael Kirby
--------------start of edits from Kirby -------------------
42 1 Eric Church
43 17 Michael Kirby
The uboonedaq_datatypes is now installed on both the online cluster and in the /grid/fermiapp/products/uboone/ area and so we are not limited to development on the online cluster. As well, the offline area has moved from /uboone/larsoft/ to /uboone_offline/ area. That area has had larsoft v04_05_00 and v04_06_00 installed as of May 11, 2015. You can see the manifest of the larsoft installs by looking at MANIFEST files in /uboone_offline/.  Starting with v04_08_00, we are hoping that uboonecode will have a dependency against uboonedaq_datatypes built into it so that it will be configured correctly without doing so by hand.
44 1 Eric Church
45 17 Michael Kirby
Installing LArSoft is conveniently handled by going to the FNAL scisoft server and downloading the file to some local area on your machine at LArTF. Then, as uid products, run the script to install the binaries to /uboone_offline/. (No need to build from source, since we're on SLF6.) pullProducts will know to update to a new vx_yy_zz directory, if indeed you're keen to do this.
46 17 Michael Kirby
47 17 Michael Kirby
-------------end of edits from kirby --------------------
48 17 Michael Kirby
49 21 Eric Church
The DAQ does not want to move up versions of LArSoft -- maybe ever -- but certainly not often. ups makes this doable, however, if it does become necessary. ubdaq-prod-evb:/uboone/larsoft currently holds v04_08_00 and a few older versions of installed LArSoft. e.g., LArSoft v04_06_03_01 is there -- the version that MicroBooNE's MCC6 used.
50 17 Michael Kirby
51 16 Michael Kirby
h1. Developing in LArSoft with the ubdaq-prod- installation.
52 1 Eric Church
53 16 Michael Kirby
--------------start of edits from Kirby -------------------
54 16 Michael Kirby
55 16 Michael Kirby
For now though, to develop against the uboonedaq_datatypes that are in installed online and offline, If we want to develop LArSoft, we must, in the usual way, form a release area on ubdaq-prod-evb at /home/user/larsoft. Setup as at the top of this page. Then do a @mrb newDev v04_05_00 -T prof.slf6.v04_05_00@, as usual. In srcs pull the code and importantly, *switch to the branch that knows how to build against uboonedaq_datatypes. Do:* @mrb g -b feature/ubdaq uboonecode; mrg g -b feature/davidc1_daqheader lardata@
56 16 Michael Kirby
57 16 Michael Kirby
There are modifications that need to be made within these packages:
58 16 Michael Kirby
59 19 Michael Kirby
change the lardata/ups/product_deps to have these versions
60 19 Michael Kirby
61 19 Michael Kirby
62 1 Eric Church
parent  lardata v04_04_00
63 1 Eric Church
defaultqual     e7
64 19 Michael Kirby
65 16 Michael Kirby
fcldir product_dir job
66 19 Michael Kirby
67 16 Michael Kirby
product         version
68 1 Eric Church
larcore         v04_04_00
69 16 Michael Kirby
nutools         v1_09_01
70 16 Michael Kirby
gcc             v4_9_2
71 16 Michael Kirby
72 19 Michael Kirby
cetbuildtools   v4_04_02
73 16 Michael Kirby
74 1 Eric Church
75 1 Eric Church
qualifier       larcore         nutools         gcc     notes
76 1 Eric Church
e7:debug        e7:debug        e7:debug        -nq-
77 1 Eric Church
e7:opt          e7:opt          e7:opt          -nq-
78 16 Michael Kirby
e7:prof         e7:prof         e7:prof         -nq-
79 16 Michael Kirby
80 19 Michael Kirby
81 16 Michael Kirby
82 19 Michael Kirby
change the uboonecode/ups/product_deps to have these versions
83 19 Michael Kirby
84 19 Michael Kirby
85 16 Michael Kirby
parent uboonecode v04_05_00
86 16 Michael Kirby
defaultqual e7
87 16 Michael Kirby
88 1 Eric Church
product          version
89 1 Eric Church
larsoft         v04_05_00
90 1 Eric Church
ubutil          v01_16_00
91 1 Eric Church
postgresql      v9_1_15
92 1 Eric Church
gcc        v4_9_2
93 16 Michael Kirby
uboonedaq_datatypes v5_00_01 #and the matching qualifiers below
94 16 Michael Kirby
95 16 Michael Kirby
cetbuildtools    v4_04_02    -    only_for_build
96 19 Michael Kirby
97 16 Michael Kirby
98 19 Michael Kirby
For some reason I can't figure out, the uboonecode/CMakeList.txt and lardata/CMakeList.txt need to be modify with -std=c++1y
99 19 Michael Kirby
This is done by:
100 19 Michael Kirby
101 19 Michael Kirby
102 1 Eric Church
cet_set_compiler_flags( DIAGS CAUTIOUS
103 1 Eric Church
104 1 Eric Church
105 1 Eric Church
  EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -std=c++1y
106 1 Eric Church
107 19 Michael Kirby
108 19 Michael Kirby
109 19 Michael Kirby
Then building with:
110 19 Michael Kirby
111 19 Michael Kirby
112 19 Michael Kirby
cd ../build_XXX
113 19 Michael Kirby
114 19 Michael Kirby
mrb i -j4
115 19 Michael Kirby
116 16 Michael Kirby
117 16 Michael Kirby
---------end kirby edits ---------------
118 11 Eric Church
119 15 Eric Church
The issue now is getting the uboonecode repository's @uboonecode/uboone/RawData/utils/LArRawInput*@ files to compile/link against our uboonedaq_datatypes and not the data structures that are hand-copied there. That unsavory manner is how uboonecode's develop branch works currently.
120 5 Eric Church
121 22 Eric Church
If we want to develop LArSoft, we must, in the usual way, form a release area on ubdaq-prod-evb at /home/user/larsoft. Setup as at the top of this page. Then do a @mrb newDev vxx_yy_zz -T debug.slf6.vxx_yy_zz@, as usual. In srcs pull the code and importantly, *switch to the branch that knows how to build against uboonedaq_datatypes. Do:* @mrb g uboonecode; git checkout feature/ubdaq@. At some point maybe we will merge this branch into uboonecode's develop. However, doing that commits us to having uboonedaq_datatypes installed for all of LArSoft. It requires a push to /grid/fermiapp/products and a push to cvmfs, and as yet, we aren't ready to commit to that. Also, it can be argued swizzling and thus the dependence on uboonedaq_datatypes should be confined to the ubdaq-prod machines. For now, we work in feature/ubdaq. 
122 22 Eric Church
123 22 Eric Church
124 22 Eric Church
@source /uboone_offline/setup
125 22 Eric Church
export PRODUCTS=$PRODUCTS:/uboonenew
126 22 Eric Church
setup uboonedaq_datatypes v6_08_00 -qe7:debug
127 22 Eric Church
setup larsoft v04_08_00 -qe7:debug                    
128 22 Eric Church
setup mrb; setup git; setup gitflow
129 22 Eric Church
export MRB_PROJECT=larsoft
130 23 Eric Church
cd /home/user/larsoft/debug.slf6.vxx_yy_zz
131 22 Eric Church
source localProductsxyz/setup
132 22 Eric Church
133 22 Eric Church
mrb i -j32@.