Skip to content
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

Interplay of LCG_DICT_HEADER and LCG_DICT_XML with ALPAKA_BACKENDS #40846

Closed
makortel opened this issue Feb 22, 2023 · 11 comments · Fixed by cms-sw/cmsdist#8705
Closed

Interplay of LCG_DICT_HEADER and LCG_DICT_XML with ALPAKA_BACKENDS #40846

makortel opened this issue Feb 22, 2023 · 11 comments · Fixed by cms-sw/cmsdist#8705

Comments

@makortel
Copy link
Contributor

It seems that if a data format package BuildFile.xml specifies explicitly the classes.h headers and the classes_def.xml selection XML files like here

<flags LCG_DICT_HEADER="classes_1.h classes_2.h"/>
<flags LCG_DICT_XML="classes_def_1.xml classes_def_2.xml"/>

and one enables the Alpaka backend compilation with <flags ALPAKA_BACKENDS="1"/>, the src/alpaka/classes_<backend>.h and src/alpaka/classes_<backend>.def.xml files are not being considered.

@makortel
Copy link
Contributor Author

assign core,heterogeneous

@cmsbuild
Copy link
Contributor

New categories assigned: heterogeneous,core

@fwyzard,@Dr15Jones,@smuzaffar,@makortel,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@cmsbuild
Copy link
Contributor

A new Issue was created by @makortel Matti Kortelainen.

@Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

@smuzaffar Just as a guess we tried

 <flags LCG_DICT_HEADER="classes_1.h classes_2.h alpaka/classes_serial.h alpaka/classes_cuda.h"/> 
 <flags LCG_DICT_XML="classes_def_1.xml classes_def_2.xml alpaka/classes_serial_def.xml alpaka/classes_cuda_def.xml"/> 

but that didn't work either. I'm not sure if that would even be a good way to declare the classes* files inside the alpaka subdirectory.

@smuzaffar
Copy link
Contributor

smuzaffar commented Feb 22, 2023

@makortel , yes this is known issue with the build rules. I already have it on my to do list to fix it but did not realized that we will hit it this soon :-)
Currently, alpaka backend rules do not support multiple HEADER/XML files. I will update the rules to not consider LCG_DICT_HEADER/XML for alpaka backend and use default classes_(serial|cuda).h files for backend. If we need to support multiple header/def files for each alpaka backend too then I guess we can support something like

 <flags LCG_DICT_HEADER="classes_1.h classes_2.h"/> 
 <flags LCG_DICT_XML="classes_def_1.xml classes_def_2.xml"/> 
 <flags ALPAKA_SERIAL_LCG_DICT_HEADER="classes_serial_1.h classes_serial_2.h"/> 
 <flags ALPAKA_SERIAL_LCG_DICT_XML="classes_serial_def_1.xml classes_def_serial_2.xml"/> 
 <flags ALPAKA_CUDA_LCG_DICT_HEADER="classes_cuda_1.h classes_cuda_2.h"/> 
 <flags ALPAKA_CUDA_LCG_DICT_XML="classes_cuda_def_1.xml classes_def_cuda_2.xml"/> 

@makortel
Copy link
Contributor Author

In this specific case the Alpaka backend's did not need to be split in multiple files. I'd also expect that in the near-to-medium term we would not really need the ability (but for long term it could be useful). The problem was that already the presence of LCG_DICT_HEADER and LCG_DICT_XML (or because they had two elements?) seemed to prevent the generation of dictionaries for each Alpaka backend.

As a quick workaround we merged the classes_{1,2}.h and classes_def_{1,2}.xml in the developers area so that he was able to continue his work.

@smuzaffar
Copy link
Contributor

yes presence of LCG_DICT_HEADER/XML was feeding the wrong information to alpaka backend rules. One reason we had split these files was to avoid long rootcling/compilation times. Multiple files allowed the build system to run rootcling and compilation in parallel.

@makortel
Copy link
Contributor Author

@smuzaffar Could you remind me if this issue was fixed?

@smuzaffar
Copy link
Contributor

No, not yet @makortel

@makortel
Copy link
Contributor Author

Ok. There is now a PR merging two classes_def_<N>.xml files together to work around the problem #42807 .

@smuzaffar
Copy link
Contributor

@makortel , cms-sw/cmsdist#8705 addresses this issue. It should allow multiple header/xml files for alpaka backend too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants