AliceO2 icon indicating copy to clipboard operation
AliceO2 copied to clipboard

SIM: Adding experiment versions and dynamic library loading

Open f3sch opened this issue 1 year ago • 2 comments

Hi @sawenzel, this a draft based on our discussion to have the possibility to specify the detectors via list. The first commit introduces two new program options, namely detectorVersion version and detectorVersionJSON file and the relevant parsing. Two cases are covered:

  1. only detectorVersion specify: then the version is taken from a predefined map with 'official' versions
  2. both options are specified: then the custom file is parsed to build the same map as in 1. and the modules are taken from there.

AFAICT this 'works' but I did not test this really thoroughly but running 'o2-sim' with different options seems to do what I want.

The second commit introduces dynamic library loading with a custom dll manager modelled as a singleton. As an example I removed the dependency on 'O2{ITS,TPC,TRK}Simulation' which works as expected and I think can be extended to most other detector simulation libraries. I do not have much experience with this and was more fun experiment :).

f3sch avatar May 20 '24 11:05 f3sch

REQUEST FOR PRODUCTION RELEASES: To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available async-2023-pbpb-apass3 async-2023-pbpb-apass4 async-2022-pp-apass6-2023-PbPb-apass2 async-2022-pp-apass4 async-2022-pp-apass4-accepted async-2022-pp-apass6-2023-PbPb-apass2-accepted async-2023-pbpb-apass3-accepted async-2023-pbpb-apass4-accepted async-2023-pp-apass4 async-2023-pp-apass4-accepted async-2024-pp-apass1 async-2024-pp-apass1-accepted async-2022-pp-apass7 async-2022-pp-apass7-accepted async-2024-pp-cpass0 async-2024-pp-cpass0-accepted

github-actions[bot] avatar May 20 '24 11:05 github-actions[bot]

Thanks. Will take a look.

sawenzel avatar May 21 '24 11:05 sawenzel

Hi @sawenzel, I update the code and the help description AFAICT it does what we discussed. Maybe after testing, should I undraft to test CI?

f3sch avatar May 24 '24 13:05 f3sch

Thanks. Already took away the draft status. Will test it once more then merge it.

sawenzel avatar May 24 '24 14:05 sawenzel

PR is fine for me. Only problem is the build/AliceO2/O2/o2/macOS-arm CI. Some macros seem to fail... should probably take a look. @ktf : Is this a known problem ?

sawenzel avatar May 24 '24 14:05 sawenzel

The mac issue is not a known problem (or better, there was a known issue that got hopefully fixed which was masking this other one, I guess). I need to check what is going on.

ktf avatar May 27 '24 06:05 ktf

Actually, I think it's a problem with this PR. It looks like a clash between boost filesystem and std::filesystem.

ktf avatar May 27 '24 07:05 ktf

Error while checking build/O2/fullCI for 569748df02225cb765a2421dca052fb0dafab1de at 2024-05-27 23:01:

## sw/BUILD/O2-latest/log
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
c++: error: unrecognized command-line option '--rtlib=compiler-rt'
input_line_9:2944:6: error: expected value in expression
input_line_9:2963:43: error: use of undeclared identifier 'DLLOADER_MAC_LINUX'
Error: /sw/slc8_x86-64/ROOT/v6-30-01-alice4-10/bin/rootcling: compilation failure (/sw/BUILD/18ee7e69ad13d9e917e18c988b8336819f1a9f8c/O2/Common/Utils/G__O2CommonUtils73ecc1ccf6_dictUmbrella.h)
ninja: build stopped: subcommand failed.

Full log here.

alibuild avatar May 27 '24 21:05 alibuild

Hi @ktf, thanks for taking a look, indeed it was clashing with the boost filesystem. @sawenzel I removed thus this dependency altogether and now CI is green. If you haven’t already done it, can you please test that the parsing is doing what we discussed? Cheers

f3sch avatar May 28 '24 05:05 f3sch

Works fine for me. Thanks a lot for this development. Merging.

sawenzel avatar May 28 '24 09:05 sawenzel