bash 如何将作业提交到 PBS 中的特定节点
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18392786/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to submit a job to a specific node in PBS
提问by Ashwin
How do I send a job to a specific node in PBS/TORQUE? I think you must specify the node name after nodes.
如何将作业发送到 PBS/TORQUE 中的特定节点?我认为您必须在节点之后指定节点名称。
#PBS -l nodes=abc
However, this doesn't seem to work and I'm not sure why. This question was asked here on PBS and specify nodes to use
但是,这似乎不起作用,我不确定为什么。这个问题是在PBS上提出的, 并指定要使用的节点
Here is my sample code
这是我的示例代码
#!/bin/bash
#PBS nodes=node9,ppn=1,
hostname
date
echo "This is a script"
sleep 20 # run for a while so I can look at the details
date
Also, how do I check which node the job is running on? I saw somewhere that $PBS_NODEFILE
shows the details, but it doesn't seem to work for me.
另外,如何检查作业在哪个节点上运行?我看到某处$PBS_NODEFILE
显示了细节,但它似乎对我不起作用。
回答by dbeer
You can do it like this:
你可以这样做:
#PBS -l nodes=<node_name>
You can also specify the number of processors:
您还可以指定处理器的数量:
#PBS -l nodes=<node_name>:ppn=X
Or you can request additional nodes, specified or unspecified:
或者您可以请求指定或未指定的其他节点:
#PBS -l nodes=<node_name1>[:ppn=X][+<node_name2...]
That gives you multiple specific nodes.
这为您提供了多个特定节点。
#PBS -l nodes=<node_name>[:ppn=X][+Y[:ppn=Z]]
This requests the specific node with X execution slots from that node, plus an additional Y nodes with Z execution slots each.
这从该节点请求具有 X 个执行槽的特定节点,以及每个具有 Z 个执行槽的额外 Y 节点。
Edit: To simply request a number of nodes and execution slots per node:
编辑:简单地请求多个节点和每个节点的执行槽:
PBS -l nodes=X:ppn=Y
PBS -l 节点=X:ppn=Y
NOTE: this is all for TORQUE/Moab. It may or may not work for other PBS resource managers/schedulers.
注意:这都是为 TORQUE/Moab 准备的。它可能适用于也可能不适用于其他 PBS 资源管理器/调度器。
回答by rashid
The above answer doesn't work for PBS Pro. The following works for including a list of nodes (node1
and node2
).
上述答案不适用于 PBS Pro。以下适用于包含节点列表(node1
和node2
)。
#PBS -l select=1:host=node1+1:host=node2
For also including the number of processors,
对于还包括处理器的数量,
#PBS -l select=1:ncpus=24:host=node1+1:ncpus=24:host=node2