Beispiel #1
0
    def sanitycheck(self):
        """Custom sanity check for CPLEX"""

        if not self.getcfg("sanityCheckPaths"):
            self.setcfg(
                "sanityCheckPaths",
                {"files": ["%s/%s" % (self.bindir, x) for x in ["convert", "cplex", "cplexamp"]], "dirs": []},
            )

            self.log.info("Customized sanity check paths: %s" % self.getcfg("sanityCheckPaths"))

        Binary.sanitycheck(self)
Beispiel #2
0
    def make_module_extra(self):
        """Add installdir to path and set CPLEX_HOME"""

        txt = Binary.make_module_extra(self)
        txt += self.moduleGenerator.prependPaths("PATH", [self.bindir])
        txt += self.moduleGenerator.setEnvironment("CPLEX_HOME", "$root/cplex")
        self.log.debug("make_module_extra added %s" % txt)
        return txt
Beispiel #3
0
    def __init__(self, *args, **kwargs):
        """Initialize CPLEX-specific variables."""

        Binary.__init__(self, *args, **kwargs)
        self.bindir = None