예제 #1
0
파일: util.py 프로젝트: zmhou/sailfish
 def test_lsf_config_processing(self):
     vars = {'LSB_MCPU_HOSTS': 'hostA 2 hostB 1', 'FDUST_GPU_PER_CORE': 1}
     random.seed(1234)
     cluster = util.lsf_vars_to_clusterspec(vars)
     self.assertEqual([
         config.MachineSpec('socket=hostA:15732', 'hostA', [0, 1], None),
         config.MachineSpec('socket=hostB:15732', 'hostB', [0], None)
     ], cluster.nodes)
예제 #2
0
    def _prepare_lsf_handlers(self, id_string):
        cluster = util.lsf_vars_to_clusterspec(os.environ,
                                               self.config.cluster_interface)
        def _start_socketserver(addr, port):
            return subprocess.Popen(['mpirun', '-H',
                addr, 'sh', '-c', "python %s/socketserver.py :%s %s" % (
                    os.path.realpath(os.path.dirname(util.__file__)),
                    port, id_string)])

        return cluster, _start_socketserver
예제 #3
0
    def _prepare_lsf_handlers(self, id_string):
        cluster = util.lsf_vars_to_clusterspec(os.environ,
                                               self.config.cluster_interface)
        def _start_socketserver(addr, port):
            return subprocess.Popen(['mpirun', '-H',
                addr, 'sh', '-c', "python %s/socketserver.py :%s %s" % (
                    os.path.realpath(os.path.dirname(util.__file__)),
                    port, id_string)])

        return cluster, _start_socketserver
예제 #4
0
파일: util.py 프로젝트: mjanusz/sailfish
 def test_lsf_config_processing(self):
     vars = {
         'LSB_MCPU_HOSTS': 'hostA 2 hostB 1',
         'FDUST_GPU_PER_CORE': 1
     }
     random.seed(1234)
     cluster = util.lsf_vars_to_clusterspec(vars)
     self.assertEqual(
         [config.MachineSpec('socket=hostA:%d' % PORT, 'hostA', [0, 1], None),
          config.MachineSpec('socket=hostB:%d' % PORT, 'hostB', [0], None)],
         cluster.nodes)