-
Notifications
You must be signed in to change notification settings - Fork 283
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
using SystemCompiler
easyblock for wrapper around system GCC fails if an Intel license is not defined
#2815
Comments
Since the license check in Changing the order in the class definition is "cheating" in some sense, and may cause trouble further down the installation process (especially when wrapping a system installation of the Intel compilers). |
SystemCompiler
easyblock for wrapper around system GCC fails if an Intel license is not defined
Just to demystify this, as I encountered the same issue with another diamond inheritance graph for my CargoPythonBundle. The Python will determine the mro as follows
So while def prepare_step(self, *args, **kwargs):
"""
Prepare build environment, track currently active build stage
"""
super(EB_GCC, self).prepare_step(*args, **kwargs)
# Set the current build stage to the specified stage based on the iteration index
self.current_stage = self.build_stages[self.iter_idx] so while one might think it should look up it's own statically determine class hierarchy (regardless of subclasses like SystemCompiler), that isn't what it does. It basically looks for the next method down the |
@Micket would a better solution then be for ConfigureMake to overload the prepare step? |
@bartoldeman If the first "chain" of classes continue to call super() up to the shared base class (which would eventually be the EasyBlock class) it wouldn't make any difference. Here is a small example to play around with: class A:
def __init__(self):
super(A, self).__init__()
print("A")
class B(A):
def __init__(self):
super(B, self).__init__()
print("B")
class C(B):
def __init__(self):
super(C, self).__init__()
print("C")
class D(A):
def __init__(self):
super(D, self).__init__()
print("D")
class Diamond(C, D):
def __init__(self):
C.__init__(self) # You might expect this to go C,B,A, but it won't.
print("Just C")
C()
print("Diamond!")
Diamond() My
That's just what |
I'm also getting hit by this type of "bug" with my attempt at CargoPythonBundle #2964, where I'm not able to change order since my new init is automatically called from Bundle's super-init. |
Building
GCCcore-system.eb
fails if a suitable Intel license definition is not setFollowing this through:
prepare_step
insystemcompiler.py
, atEB_GCC.prepare_step(self, *args, **kwargs)
super(EB_GCC, self).prepare_step(*args, **kwargs)
ingcc.py
intelbase.py
Any of the following avoid the issue:
requires_runtime_license = False
inGCCcore-system.eb
class SystemCompiler(Bundle, EB_GCC, EB_ifort)
to beclass SystemCompiler(Bundle, EB_ifort, EB_GCC)
insystemcompiler.py
The second of these makes me believe that the correct fix is making sure the inheritance order triggers the right
super
ingcc.py
.The text was updated successfully, but these errors were encountered: