Skip to content

Make diagnostic system aware of un-compiled modules #276

Merged
tegonzalo merged 28 commits intomasterfrom
Issue61_harvester
Dec 5, 2023
Merged

Make diagnostic system aware of un-compiled modules #276
tegonzalo merged 28 commits intomasterfrom
Issue61_harvester

Conversation

@MarkusPrim
Copy link
Collaborator

Addresses #61 , improves over the previous implementation and now directly uses the harvester routines.

Markus Prim added 7 commits February 19, 2021 19:39
… of excluded headers. Use this to generate a yaml file with enabled/disabled backends + versions for the diagnostic system.
… of excluded headers. Use this to generate a yaml file with enabled/disabled modules for the diagnostic system. Also remove remnants of previous implementation.
@MarkusPrim MarkusPrim added enhancement Core Core group task labels Feb 22, 2021
@MarkusPrim MarkusPrim requested a review from tegonzalo February 22, 2021 15:08
@MarkusPrim MarkusPrim self-assigned this Feb 22, 2021
Copy link
Collaborator

@tegonzalo tegonzalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A few cosmetic changes. Works as expected. In the future please do not bundle a file format change with actual changes, as it's hard to disentangle where the actual changes are.

@tegonzalo
Copy link
Collaborator

tegonzalo commented Mar 4, 2021

Ah belay that. I found 3 cases where your set up breaks. Not your fault though, but we should fix them now. For susyhit, libmathematicatest and classy_exo your system fails.

The first two is because the header names are different from the backend names (macro BACKENDNAME in the header), so the names as read from the config file won't match those registered. It should be as simple as changing the backend or header names I think.

The last one is a bit more tricky, as "exo" is part of the version for some reason. I'm not sure why is that. Perhaps it could just be swallowed into the backend name to avoid these issues. @pstoecker Would that break anything?

While we are at it, there is one more diagnostic-type change that this needs. When Mathematica is absent, the status message reads "Mathematica absent" for Mathematica backends, but when pybind11 is absent the status of python backends just reads "absent/broken". It'd be great if these could also say "pybind11 absent".

@pstoecker
Copy link
Member

The last one is a bit more tricky, as "exo" is part of the version for some reason. I'm not sure why is that. Perhaps it could just be swallowed into the backend name to avoid these issues. @pstoecker Would that break anything?

The reason is that we wanted to treat exoclass as a special version of class (or classy in our language) rather than an own backend. It actually used to be the way that classy_exo was technically a backend on it's own but we have decided that it might be easier to be a subversion of classy in cases that we have to list only special versions of classy to be suitable for a given capability.

As far as I know, there is no such restriction in the codebase such that it would not make a difference if classy_exo_2.7.2 refers to version exo_2.7.2 of classy or if it refers to version 2.7.2 of classy_exo. As long as the names of the backend functions are the same, everything should work as expected.

@MarkusPrim
Copy link
Collaborator Author

MarkusPrim commented Apr 13, 2021

In the future please do not bundle a file format change with actual changes, as it's hard to disentangle where the actual changes are.

Sorry about that, you are 100% correct that this should have been disentangled.

@MarkusPrim
Copy link
Collaborator Author

MarkusPrim commented Apr 13, 2021

As far as I know, there is no such restriction in the codebase such that it would not make a difference if classy_exo_2.7.2 refers to version exo_2.7.2 of classy or if it refers to version 2.7.2 of classy_exo. As long as the names of the backend functions are the same, everything should work as expected.

I think that change would automatically fix the issue at hand. @tegonzalo are you happy fixing it that way, and that we enforce version numbers in the future? The system checks for name + version number in the current implementation, so anything we add in the future without that structure will not work.

Edit: Actually my statement above is not really correct. I think the issue is that the backend defined in classy_exo_2_7_2.hpp is also named classy, and that breaks the diagnostic system here. Is it feasible to rename in this instance the backendname from classy to classy_exo?

…defined in the headerfilename so the diagnostic system recogizes it.
@tegonzalo
Copy link
Collaborator

Is it feasible to rename in this instance the backendname from classy to classy_exo?

Yes, I think that's the way forward, just treat it as a new backend with name classy_exo

Markus Prim added 3 commits April 13, 2021 14:54
@MarkusPrim
Copy link
Collaborator Author

@pstoecker I changed the classy_exo backendname, so _exo is now part of the name not the version. Can you check if this breaks anything? Or alternatively can you tell me how I can check by myself if everything still works as expected (beyond compiling).

@pstoecker
Copy link
Member

@MarkusPrim , thanks for the change. Looks good as far as I can tell. I will test it. But probably not before tomorrow.

@MarkusPrim
Copy link
Collaborator Author

While we are at it, there is one more diagnostic-type change that this needs. When Mathematica is absent, the status message reads "Mathematica absent" for Mathematica backends, but when pybind11 is absent the status of python backends just reads "absent/broken". It'd be great if these could also say "pybind11 absent".

@tegonzalo I think I have a working solution, please see if this is what you had in mind.

Copy link
Collaborator

@tegonzalo tegonzalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you went a bit too far changing the backend names. For LibMathematicaTest and classy_exo it was perfect. But for SUSY-HIT it's too much. The backend name is with -, so it should always be referred to as such in comments and others. In fact I don't know why it was used with _ in the backend name, wouldn't it work the same with -? Or maybe it will mess up some macros. It will do some tests to see if it works fine as SUSY-HIT, but if not only the backend name and frontend file names need to be with _.

@tegonzalo
Copy link
Collaborator

No, C++ does not allow - in variable names. That is the conundrum I tried to resolve by the global replacement of - to _.

Ok, yes, I suspected that. So then as I said, only make the changes where it's necessary, all other referrals to SUSY-HIT should be with -

@tegonzalo
Copy link
Collaborator

Also, I've just noticed this from the previous PR that I missed. Is this a typo or what exactly is it meant here?

<< "All your backend are belong to us."

I have no idea.

Ok yes sorry, git blame told me it was you, but I just noticed you just formatted it. This dates back the creation of this file so I haven't yet figured out who wrote it to ask them what they intended it to mean. I'll keep digging.

@MarkusPrim
Copy link
Collaborator Author

Also, I've just noticed this from the previous PR that I missed. Is this a typo or what exactly is it meant here?

<< "All your backend are belong to us."

I have no idea.

Ok yes sorry, git blame told me it was you, but I just noticed you just formatted it. This dates back the creation of this file so I haven't yet figured out who wrote it to ask them what they intended it to mean. I'll keep digging.

I believe it to be an easert egg ;)

@pathron
Copy link
Collaborator

pathron commented Apr 15, 2021

Haha, I think that is very very old one :).

@ahye
Copy link
Member

ahye commented Apr 15, 2021

https://en.wikipedia.org/wiki/All_your_base_are_belong_to_us

	modified:       Backends/src/frontends/classy_exo_2_7_2.cpp
@pstoecker
Copy link
Member

I have tested the changes to classy_exo_2.7.2. Everything is fine from what I have tested. The only thing that needed to be changed is to adjust the logger and error messages as these assumed that exo is part of VERSION. I have fixed it in my latest commit.

While testing I have seen that 16324a3 has broken the gambit build. In particular adding "Core" to exclude_dirs in line 568 of Utils/scripts/harvesting_tools.py caused that make_module_rollcall is never called and Core/include/gambit/Core/module_rollcall.hpp will not be created. This is only noticeable when you start from scratch so this issue might have been overlooked when this file was already in place. This could be fixed by just deleting "Core" from exclude_dirs.

@MarkusPrim
Copy link
Collaborator Author

I have tested the changes to classy_exo_2.7.2. Everything is fine from what I have tested. The only thing that needed to be changed is to adjust the logger and error messages as these assumed that exo is part of VERSION. I have fixed it in my latest commit.

Merci!

While testing I have seen that 16324a3 has broken the gambit build. In particular adding "Core" to exclude_dirs in line 568 of Utils/scripts/harvesting_tools.py caused that make_module_rollcall is never called and Core/include/gambit/Core/module_rollcall.hpp will not be created. This is only noticeable when you start from scratch so this issue might have been overlooked when this file was already in place. This could be fixed by just deleting "Core" from exclude_dirs.

Another good catch. I never do full rebuilds locally. I was hoping our CI catches issues like this, but it seems a bit shaky at the moment.

@tegonzalo
Copy link
Collaborator

I finally had time to look into this and fix it. Besides a bug from the harvesting script, there was nothing else to do, as @MarkusPrim already left this in a good state. It is then ready to merge from my point of view.

There are some problems with the OSX CI tests, but I don't really understand them, they seem to be unrelated and something to do with internal problems of the system? @ChrisJChang do you know anything about it?

@ChrisJChang
Copy link
Collaborator

There are some problems with the OSX CI tests, but I don't really understand them, they seem to be unrelated and something to do with internal problems of the system? @ChrisJChang do you know anything about it?

I only restarted the arm64 Mac CI today, which had required me to go back and install all the dependencies again. I suspect I forgot something, I will investigate this. I don't think this is specific to this PR, since the same error occurs on master. The x64 Mac pro fails the CI jobs when it gets to building rivet for the ColliderBit_CMSSM.yaml test. This is an issue that was noticed on another PR, and is being worked on.

@tegonzalo
Copy link
Collaborator

Ok, then I'll merge this PR to master

@tegonzalo tegonzalo merged commit 3d3b09f into master Dec 5, 2023
@tegonzalo tegonzalo deleted the Issue61_harvester branch December 5, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core Core group task enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants