mesos杀死了mpiexec,没有机会运行任何有用的作业

qq24tv8q  于 2021-06-21  发布在  Mesos
关注(0)|答案(1)|浏览(320)

同事!我当时正在用纯python(使用他们的api)为apachemesos0.22.1编写自己的框架,因为我们有非常具体的需求,这些需求不是由其他框架(例如marathon)处理的。
我们将从mesos开始一些mpi作业(它们都是用python编写的(使用mpi4py))
但我在一开始就被阻止了,因为看起来,mesos master在mpiexec启动之后就杀死了它。mpiexec只写“杀死所有作业…”,然后就死了。
在这里,我们将从mesos开始一些mpi作业(它们都是用python编写的(使用mpi4py))
请看一下我的框架的代码(它非常基本,与此有更多的共同点:https://github.com/apache/mesos/tree/master/mpi ):

if cpus < CPUS or mem < MEM:
    print "Declining offer due to too few resources"
    driver.declineOffer(offer.id)
  else:
    tid = self.mpdsLaunched
    self.mpdsLaunched += 1

    print "Accepting offer on %s to start mpd %d" % (offer.hostname, tid)

    task = mesos_pb2.TaskInfo()
    task.task_id.value = str(tid)
    task.slave_id.value = offer.slave_id.value
    task.name = "task %d " % tid

    cpus = task.resources.add()
    cpus.name = "cpus"
    cpus.type = mesos_pb2.Value.SCALAR
    cpus.scalar.value = CPUS

    mem = task.resources.add()
    mem.name = "mem"
    mem.type = mesos_pb2.Value.SCALAR
    mem.scalar.value = MEM

    uri = task.command.uris.add()
    uri.value= parser_config.get_option("PATH_TO_DEPLOY_SCRIPT")

    task.command.value = "mpiexec -n 3 test_mpi.py -u" 
    tasks.append(task)
    print "Replying to offer: launching mpd %d on host %s" % (tid, offer.hostname)
    driver.launchTasks(offer.id, tasks)

你看,我正试图直接从mesos启动mpiexec,但没有结果。顺便说一下,为了解决这个问题,我试过:

1. To launch some bash script from Mesos, which will then start mpiexec ( no result )
    2. To start 
       nohup mpiexec -n 3 test_mpi.py -u &
    3. To put some delays after mpiexec run:
       mpiexec -n 3 test_mpi.py -u && sleep 30 && echo "Yeah!"

但在所有这些情况下,结果都是一样的:mpiexec被mesos大师以疯狂的毅力杀死。
也许有人也有类似的问题?谢谢您!

hrysbysz

hrysbysz1#

哇!:-)伙计们,没人会相信,但当我把mpiexec改成mpirun时,一切都正常!i、 e.现在我的字符串是这样的:

mpiexec -n 3 test_mpi.py -u &

我很好奇——到底有什么区别?

相关问题