Conversation
|
@jose let me know what you think. As well as checking minuit2, I checked for phc and hom4ps. |
|
Unfortunately this will have two unintended side effects that make the ditching behaviour differ from the standard: a) Vevacious will not be listed amongst the ditched backends printed to cout at cmake time (instead there will be one of the new error messages from this commit) I think the way to achieve what you're after is to put the test a lot earlier. The key thing is that Vevacious needs to be added to the Line 632 in 4917802 |
|
How about making it a fatal error and forcing user to write -Dtich=minuit2,vevacious etc if that's what they really want? |
|
Yeah, that would do the job too. It's arguably not as neat as automating, but it has the advantage of being more explicit. |
|
Now with FATAL_ERROR rather than WARNING. |
|
There is a crucial problem here. It is currently not possible to ditch But even if it would be possible, I don't think the way you've implemented this is the right way. All backends that have dependencies make use of the macro and then modify the macro in I think this would be a good change regardless, but something else must be done to avoid the linking problems. All I can think of right now is to store whether vevacious has been ditched in a cmake variable that is then used to define a preprocessor macro, and add guards around the declaration of the function that uses the types. I can take a crack at that later this week if people agree that it's the right way forward. |
Will this approach have the problem Pat mentioned? That the itch arguments are are processed long before the check_ditch_status calls, so adding it to the itch arguments in the above would be too late. |
It will show as being ditched in the cmake output. And when running |
|
Sounds good, why doesn't it have the same problem though?
…On Tue, 7 Jun 2022 at 20:28, Tomas Gonzalo ***@***.***> wrote:
Will this approach have the problem Pat mentioned? That the itch arguments
are are processed long before the check_ditch_status calls, so adding it to
the itch arguments in the above would be too late.
It will show as being ditched in the cmake output. And when running gambit
backends it will show as absent/broken, which is the same for all
non-installed backends, and all ditched backends, so I don't think that is
a problem.
—
Reply to this email directly, view it on GitHub
<#359 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4VQ4IBOCKHJUOVT4X7Z4TVN455JANCNFSM5YBHIMZA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
The |
|
Right, right. Why will e.g. |
|
I think he just meant that the backend harvester will run before it is known that this backend is ditched. Which is definitely true. But that is always been true for many backends that are ditched at that time, such as python and mathematica backends if either python or mathematica are ditched. I don't really see a problem with that, but maybe Pat can elaborate. Worst case scenario, it may be just a case of swapping the order, provided there are no other consequences. |
|
Humm, I had thought that even when we auto-ditch things because Python or Mathematica is not present, they do not show up in Line 562 in 4917802 This clearly does not happen on the current master when things are ditched because Python/Mathematica is missing. On the backend type issue, I think it's fine -- ditching a backend does not remove its associated backend types, so this should not cause any problem, right? |
|
Tomas, I'm confused about another aspect of your proposal. How does this interact with version numbers of the dependencies? Should I in fact be doing since those are the version numbers that vevacious wants? I'm envisioning having multiple versions of minuit2 etc. |
Yes, I think so, seeing as those are the versions that this version of Vevacious is pinned to by the |
If Vevacious necessarily depends on those specific versions, then you're correct. But I don't think that's necessarily the case. In principle it should work with newer versions too, right @JoseEliel?
I don't think this is completely correct. Afaik, ditched backends still show up in right before the
This is strange. Since reading this I've been trying to reproduce the error I saw earlier when ditching vevacious, but it seems to have disappeared. I will try a few things to see if it pops up again, but it's pretty odd. |
Ok, I can confirm that this indeed happens. From a fresh build, if ditching vevacious directly from the cmake command, it will fail to link because of the backend type. It does not happen if vevacious is ditched afterwards (e.g. backends.cmake), so it definitely has to do with the harvester scripts. I don't think this is intentional, backend types should not be ditched when the backend is ditched, so I'll check what's going on with the harvesting. |
|
Thanks for chasing these up @tegonzalo, all your plans sound good. Going forward (maybe a topic for the Core session in Kelowna), I wonder if we really want/need to provide the possibility to ditch backends at all any longer. Having them not ditched doesn't mean you need to build them, and keeping the ditching facility for them has some pretty non-trivial maintenance overhead, as we're seeing in this PR for example. The only advantage of ditching is that you don't need to compile their frontends and types. |
|
Just a quick follow up, the problem with ditching vevacious is that if it's ditched before the harvesting scripts are set (which at the moment happens before the backends.cmake file is imported), the frontend header of vevacious is ditched and thus the typedefs that make vevacious' types usable in gambit are not built, the types are undefined and linking fails. I suspect this would also happen for any BOSSed backend whose types we use in the declaration of functions (e.g. Pythia event types for the Rivet interface). I believe for now the preprocessor guards option is the best one, as it can be done right away for vevacious only without affecting much else. Long term we could do what Pat suggests (not ditching), or find an alternative. I'll implement that on this branch asap. |
|
Shouldn't it work to just move the typedefs to the backend types file and include that from the frontend header? This is how the backend_types system was designed to be used as far as I can remember. |
I guess that should work, but it will require some BOSS modifications, since the current frontend header is auto-generated by BOSS. So perhaps BOSS should instead generate a backend types header that contains these typedefs.
I also think the option of not ditching backends sounds like a good strategy. |
Yes, definitely; this would be good practice even if we don't ditch ditching. |
|
Closing as obsolete in favour of #440. |
Don't try to build Vevacious if any of its 3 dependencies (minuit2, phc, hom4ps) were ditched. This fixes #358