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)
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
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)