Added new add_os method

This commit is contained in:
Mario Melara 2016-02-10 16:16:35 -08:00
parent fb234205c2
commit cb8d5ab183

View file

@ -1,6 +1,6 @@
import os
from spack.architecture import Platform, Target
from spack.architecture import Platform, Target, OperatingSystem
class CrayXc(Platform):
priority = 20
@ -8,6 +8,10 @@ class CrayXc(Platform):
back_end = 'ivybridge'
default = 'ivybridge'
front_os = "SuSE11"
back_os = "GNU/Linux"
default_os = "GNU/Linux"
def __init__(self):
''' Since cori doesn't have ivybridge as a front end it's better
if we use CRAY_CPU_TARGET as the default. This will ensure
@ -31,6 +35,9 @@ def __init__(self):
self.add_target('ivybridge', Target('ivybridge', 'MODULES', 'craype-ivybridge'))
self.add_target('haswell', Target('haswell', 'MODULES', 'craype-haswell'))
self.add_operating_system('SuSE11', OperatingSystem('SuSE11', '11'))
self.add_operating_system('GNU/Linux', OperatingSystem('GNU/Linux', '10'))
# self.add_target(self.front_end, Target(self.front_end, 'PATH'))
# Back End compiler needs the proper target module loaded.
# self.add_target(self.back_end, Target(self.front_end, 'MODULES', 'craype-'+ self.back_end))