-
Notifications
You must be signed in to change notification settings - Fork 485
Work on ZS encoding / decoding + unrelated commits from my dev branch that give conflicts if not merged together #3244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
wiechula
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was quick!
Looks good.
Thanks a lot.
|
@ktf : No reply from all builders since 11 hours. Any idea what is going on? |
|
WIP prs are not tested anymore. Remove the WIP and it will start testing. Rationale here: https://aliceo2group.github.io/quickstart/devel.html#draft-wip-pull-requests |
|
Ok, makes totally sense! Thx for letting me know!
Kind Regards
David Rohr
Sent from my mobile. (Excuse the typos!)
…On March 28, 2020 10:48:55 AM GMT+01:00, Giulio Eulisse ***@***.***> wrote:
WIP prs are not tested anymore. Remove the WIP and it will start
testing. Rationale here:
https://aliceo2group.github.io/quickstart/devel.html#draft-wip-pull-requests
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#3244 (comment)
|
|
For reference, this needs alisw/alidist#2157 to pass the GPU CI. |
c0e6739 to
7de4afa
Compare
|
@wiechula : I have rebased onto @shahor02 's patch (using his new feature), and cherry picked your commit with the encoder binary into my PR, and then adjusted your binary to use the new version of the RunZSEncoder function passing in the RawEncoder. I think probably the best way to do this, would be to link the o2-raw-file-reader-workflow to the o2-tpc-reco-workflow with the '|' mechanics, and modify the o2-tpc-reco-workflow to take the input, create the Finally, I am using Could you test it and let me know what you think. Are your working to implement the reading, or shall I have a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle, the only identifier to be used for mapping during decoding is the RDH.feeId, the cruID and linkID may change. As far as I know, the TPC at the moment does not write its feeID, but eventually the CRU should do this (apparently using the mapping provided by the TPC).
@wiechula If such a mapping exists, perhaps it is better to use it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no definition nor mapping for the feeId at the moment. We started to discuss it. The easiest for the moment would be to use the obsolete definitions (CruId << 16) | ((LinkId + 1) << (CruEndPoint == 1 ? 8 : 0))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or, simply i*20+j, to be independent of the data-taking-time params.
Looks good to me. I'll need to work on the binary then for some beautification. I would also like to add the possibility to only write defined sectors.
Yes, I agree. It might need an intermediate aggregator device, which also creates the index.
I can have a look. But don't know how fast I'll be. Will you merge, or shall I use this branch? |
|
@wiechula : I think an intermedia device to create the meta structure doesn't make much sense, since the structure is not easily shippable with DPL. I would just scan over the inputs in the tpc-reco-workflow. I am not sure if we have to do it in the CATrackerSpec, but probably. At least otherwise I have no idea how we could pass it easily. Btw: I removed the MC flags. The ZS encoding will not support MC labels. The way it will be handled is: One has to pass the ZS encoded data + digits + digits-mc-labels to the tpc-reco-workflow. It will run the reconstruction based on the the ZS data, but then fetch the mc labels from the digits, and match based on pad,row,time of the digits. I hope this will be sufficient for MC processing. I cannot merge it right now, because it depends on alisw/alidist#2157, which fails the CI for unclear reasons and also does not provide an error log. |
|
I am using the iterator constructor of span, passing in first and last
element, so I think it is correct.
What you suggest as second parameter should work as well, would just be
a different constructor.
…On 28.03.20 22:15, Ruben Shahoyan wrote:
> @@ -273,25 +304,44 @@ void GPUReconstructionConvert::RunZSEncoder(const GPUTrackingInOutDigits* in, st
tbHdr->rowAddr1()[l - 1] += 2 * nRowsInTB;
}
}
+ if (page && (k >= tmpBuffer.size() || endpoint != lastEndpoint)) {
+#ifdef GPUCA_O2_LIB
+ if (raw) {
+ raw->addData(rawfeeid, rawcru, rawlnk, rawendpoint, *ir + hbf * o2::constants::lhc::LHCMaxBunches, gsl::span<char>((char*)page + sizeof(o2::header::RAWDataHeader), (char*)page + TPCZSHDR::TPC_ZS_PAGE_SIZE), true);
The passed size looks strange, should it be
|TPCZSHDR::TPC_ZS_PAGE_SIZE - sizeof(o2::header::RAWDataHeader)| ?
|
|
@davidrohr for the span: yes, I've realized that you are using different c-tor, that's why deleted my comment. |
|
ah, ok, I just replied to the mail. For the MC: It comes basically at 0 overhead in the way it is implemented. Raw reconstruction just runs independent from the MC. The MC label propagation in the clusterizer is kind of a postprocessing step. It uses only the digits, and it basically maps the digit pad/row/time position to the clusters, using the cluster charge map. In this step, it doesn't play any role whether the cluster was created from digits or zero suppressed raw data. If we have digits and MC and process the derived ZS raw data, we can still run the MC propagator, since the digit positions by definition match the adc samples from the ZS raw. Thus, if we have it for free, why not. It can actually be useful. In AliRoot, there were situations where I was annoyed this was not possible. |
|
ok, thanks, if it does not require extra work, surely it does not hurt. |
|
@shahor02 @wiechula : There seems to be some kind of memory corruption in the current o2-tpc-digits-to-rawzs. It is not fully clear to me yet when it happens.
I went through the code of o2-tpc-digits-to-rawzs and RunZSEncoder, but couldn't spot any place that should lead to memory corruption. Stacktrace: |
7de4afa to
6ab2a48
Compare
|
@davidrohr what do you use an input? I can try to check. |
|
@shahor02 : To try to reproduce:
|
|
@davidrohr the writer was not meant to be thread safe:) Trying to fix this |
|
@shahor02 : ok, makes sense, sorry, I didn't even think about that. Worst case, we can enforce OpenMP num threads = 1 here. |
6ab2a48 to
6764e19
Compare
|
Made some progress, thx to @shahor02 the encoding works correctly now, and we can pipe the data from the raw reader workflow to the tpc reco workflow. with the attached tpcraw.cfg: Where I am stuck now: Does anyone know how I can get this data easily? |
7afa6d9 to
23958cd
Compare
|
New version just pushed, it includes caching of the zs pages in the workflow, and runs the tracking when the full tf is received. Caching seems to work, and tracking runs without crashing, but output is not correct. |
23958cd to
695bda6
Compare
695bda6 to
ea591d4
Compare
|
@wiechula @shahor02 The TPC Raw processing is now fully working with this PR.
The following things should be cleaned up in a follow-up PR. Perhaps someone else can take care here:
|
…reverted and replaced by proper completion policy
ea591d4 to
0e18871
Compare
|
GPU CI passed after alisw/alidist#2157 was merged, merging this. |
@wiechula : Most of the stuff should be there, it is already working standalone.
Tomorrow, I'll pull in Rubens PR #3242 as soon as it passes the CI, and your new binary, to see how for it runs.