fixed haswell targeting bug
This commit is contained in:
parent
1edbaa4e62
commit
751503c434
2 changed files with 13 additions and 5 deletions
|
@ -17,15 +17,22 @@ def __init__(self):
|
|||
|
||||
# Handle the default here so we can check for a key error
|
||||
if 'CRAY_CPU_TARGET' in os.environ:
|
||||
default = os.environ['CRAY_CPU_TARGET']
|
||||
self.default = os.environ['CRAY_CPU_TARGET']
|
||||
|
||||
# Change the defaults to haswell if we're on an XC40
|
||||
if self.default == 'haswell':
|
||||
self.front_end = self.default
|
||||
self.back_end = self.default
|
||||
|
||||
# Back End compiler needs the proper target module loaded.
|
||||
self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end))
|
||||
self.add_target(self.default, Target(self.default,'craype-' + self.default))
|
||||
# Could switch to use modules and fe targets for front end
|
||||
# Currently using compilers by path for front end.
|
||||
self.add_target(self.front_end, Target(self.front_end))
|
||||
|
||||
# Back End compiler needs the proper target module loaded.
|
||||
self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end))
|
||||
self.add_target(self.default, Target(self.default,'craype-' + self.default))
|
||||
# This is kludgy and the order matters when the targets are all haswell
|
||||
# This is because the last one overwrites the others when they have the
|
||||
# same name.
|
||||
|
||||
@classmethod
|
||||
def detect(self):
|
||||
|
|
|
@ -206,6 +206,7 @@ def get_compiler(cspec):
|
|||
return cls(cspec, compiler_paths, mods)
|
||||
|
||||
matches = find(compiler_spec)
|
||||
print matches, 'matches'
|
||||
return [get_compiler(cspec) for cspec in matches]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue