SIM: Adding experiment versions and dynamic library loading
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:
- only
detectorVersionspecify: then the version is taken from a predefined map with 'official' versions - 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 :).
REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-
+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
Thanks. Will take a look.
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?
Thanks. Already took away the draft status. Will test it once more then merge it.
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 ?
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.
Actually, I think it's a problem with this PR. It looks like a clash between boost filesystem and std::filesystem.
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.
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
Works fine for me. Thanks a lot for this development. Merging.