4

是否可以使用多个节点在 oracle 网格引擎上运行一些 akka 代码?

因此,如果我使用作为“消息传递模型”的 actor-model,是否可以使用 Scala 和 akka 框架在集群或网格等分布式内存系统上运行我的代码?

如果是这样,是否有类似的东西mpirunmpi -c不同的节点上运行我的程序?你能举一个使用 oracle Grid Engine 的提交示例吗?

我如何知道我在哪个节点上的 scala 内部以及作业已提交到多少个节点?

是否可以通过actor-model与其他节点通信?

4

1 回答 1

7

mpirun或 (mpiexec在某些系统上) 可以运行任何类型的可执行文件(即使它们不使用 MPI)。我目前使用它在集群上启动 java 和 scala 代码。在调用时将参数传递给可执行文件可能很棘手,mpirun因此您可以使用中间脚本。

我们使用与 GridEngine 不兼容的 Torque/Maui 脚本,但这是我的同事目前正在使用的脚本:

#!/bin/bash
#PBS -l walltime=24:00:00
#PBS -l nodes=10:ppn=1
#PBS -l pmem=45gb
#PBS -q spc
# Find the list of nodes in the cluster
id=$PBS_JOBID
nodes_fn="${id}.nodes"
# Config file
config_fn="human_stability_article.conf"
# Java command to call
java_cmd="java -Xmx10g -cp akka/:EvoProteo-assembly-0.0.2.jar ch.unige.distrib.BuildTree ${nodes_fn} ${config_fn} ${id}"
# Create a small script to pass properly the parameters
aktor_fn="./${id}_aktor.sh"
echo -e "${java_cmd}" >> $aktor_fn
# Copy the machine file to the proper location
rm -f $nodes_fn
cp $PBS_NODEFILE $nodes_fn
# Launch the script on 10 notes
mpirun -np 10 sh $aktor_fn > "${id}_human_stability_out.txt"
于 2012-10-21T10:27:53.143 回答