示例#1
0
 def test_check_files_should_raise_an_exception_if_the_mpiexec_is_not_found(
         self):
     lm = DistributedLaunchMode(2, "mpifoo", ["node1", "node2"])
     lm.mpirun = "mpifoo"
     self.assertRaises(
         IOError, lm.check_files, MockExecutable(sys.executable),
         "main_file"
     )  # main_file does not exist either, but mpirun is checked first
示例#2
0
    def __init__(self, np=1, reason=None, label=None):
        self.np = np
        self.reason = reason
        self.label = label + '_' + time.strftime("%d%m%y-%H%M%S")

        if self.np > 1:
            self.launchmode = DistributedLaunchMode(self.np)
            self.executable = sumatra.programs.Executable(path="mpirun")
        else:
            self.launchmode = SerialLaunchMode()
            self.executable = sumatra.programs.PythonExecutable(
                path=sys.executable)
示例#3
0
 def setUp(self):
     self.lm = DistributedLaunchMode(2, "mpiexec", ["node1", "node2"])
     if self.lm.mpirun is None:
         raise unittest.SkipTest("mpiexec not found")
示例#4
0
 def test__init__should_not_raise_an_exception_if_the_mpiexec_is_not_found(self):
     lm = DistributedLaunchMode(2, "mpifoo", ["node1", "node2"])