fix GCC-system without Intel license #3402
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(created using
eb --new-pr)Python MRO causes trouble here due to multi-inheritance:
SystemCompilerinherits fromEB_GCCandEB_ifortEB_ifortinherits fromEB_iccand both fromIntelBaseprepare_stepcalls e.g.EB_GCC.prepare_stepsuper(EB_GCC, self).prepare_step(*args, **kwargs)prepare_stepinIntelBaseprepare_stepinConfigureMakeIntelBase) continues, then fails:This is due to the MRO which here is
(<class 'easybuild.easyblocks.generic.systemcompiler.SystemCompiler'>, <class 'easybuild.easyblocks.generic.bundle.Bundle'>, <class 'easybuild.easyblocks.gcc.EB_GCC'>, <class 'easybuild.easyblocks.generic.configuremake.ConfigureMake'>, <class 'easybuild.easyblocks.ifort.EB_ifort'>, <class 'easybuild.easyblocks.icc.EB_icc'>, <class 'easybuild.easyblocks.generic.intelbase.IntelBase'>, <class 'easybuild.framework.easyblock.EasyBlock'>, <class 'object'>)Only GCC, IntelBase and EasyBlock define a
prepare_stepso going up from GCC the one in IntelBase is called next.If there was one in ConfigureMake that one would be called between GCC and IntelBase.
My solution here is to directly call
ConfigureMake.prepare_stepfrom GCC which ends inEasyBlock.prepare_step.This works for now but will cause the same issue if
ConfigureMake.prepare_stepwith asuper()call is added at some point.It also will be a problem if someone inherits (e.g. transitively) from
GCCand some other class providingprepare_stepand expects both to be called.I can't think of any other easy solution.
Fixes #2815