コード例 #1
0
    def runModuleCmd(self):
        """ implement ABC...add the lmod commands for yellowstone
        """

        self.lmod = lmod.ModuleInterface()
        self.lmod.python_init(
            "/glade/apps/opt/lmod/lmod/init/env_modules_python.py")
        self.lmod.purge()

        for cmd in self.moduleList:
            print("Loading module " + cmd)
            self.lmod.load(cmd)
        self.lmod.list()
コード例 #2
0
    def runModuleCmd(self):
        """ implement ABC...run module cmds
        """
        # ~# not implemented for a system without lmod (or
        # ~# somthing similar)
        self.lmod = lmod.ModuleInterface()
        self.lmod.python_init("/usr/share/Modules/init/python.py")

        self.lmod.purge()

        for cmd in self.moduleList:
            self.lmod.load(cmd)
        self.lmod.list()
コード例 #3
0
def load_machine_env(compiler):
    """Add machine environment variables not in config_compilers.xml

    Besides simply setting variables, this may also load some modules.
    """

    mach = get_machine_name()

    if mach == "yellowstone":
        mod = ENV.ModuleInterface()
        mod.python_init("/glade/apps/opt/lmod/lmod/init/env_modules_python.py")
        mod.purge()
        mod.load("ncarenv/1.0")
        mod.load("ncarbinlibs/1.0")
        if compiler == "intel":
            mod.load("intel/14.0.2")
        elif compiler == "pgi":
            mod.load("pgi/13.9")
        mod.load("ncarcompilers/1.0")
        mod.load("cmake/2.8.10.2")