我在 ubuntu 14.04 上使用 Sun Grid Engine 对要在多核 CPU 上运行的作业进行排队。
我已经在我的系统上安装并设置了 SGE。我创建了一个“hello_world”目录,其中包含两个 shell 脚本,即“hello_world.sh”和“hello_world_qsub.sh”,第一个包含一个简单命令,第二个包含 qsub 命令,用于将第一个脚本文件作为要运行的作业提交。
以下是“hello_world.sh”的内容:
#!/bin/bash
echo "Hello world" > /home/theodore/tmp/hello_world/hello_world_output.txt
这是“hello_world_qsub.sh”的内容:
#!/bin/bash
qsub \
-e /home/hello_world/hello_world_qsub.error \
-o /home/hello_world/hello_world_qsub.log \
./hello_world.sh
授予第二个 sh 文件权限并从指定目录使用“./hello_world_qsub.sh”命令运行它后,输出是合理的:
Your job 1 ("hello_world.sh") has been submitted
但“qstat”命令的输出令人沮丧:
job-ID prior name user state submit/start at queue slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
1 0.50000 hello_worl mhr qw 05/16/2016 20:26:23 1
并且“state”列始终保持在“qw”并且永远不会更改为“r”。
这是“qstat -j 1”命令的输出:
==============================================================
job_number: 1
exec_file: job_scripts/1
submission_time: Mon May 16 20:26:23 2016
owner: mhr
uid: 1000
group: mhr
gid: 1000
sge_o_home: /home/mhr
sge_o_log_name: mhr
sge_o_path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
sge_o_shell: /bin/bash
sge_o_workdir: /home/mhr/hello_world
sge_o_host: localhost
account: sge
stderr_path_list: NONE:NONE:/home/hello_world/hello_world_qsub.error
mail_list: mhr@localhost
notify: FALSE
job_name: hello_world.sh
stdout_path_list: NONE:NONE:/home/hello_world/hello_world_qsub.log
jobshare: 0
env_list:
script_file: ./hello_world.sh
scheduling info: queue instance "mainqueue@localhost" dropped because it is temporarily not available
All queues dropped because of overload or full
这是“qhost”命令的输出:
HOSTNAME ARCH NCPU LOAD MEMTOT MEMUSE SWAPTO SWAPUS
-------------------------------------------------------------------------------
global - - - - - - -
localhost - - - - - - -
我应该怎么做才能让我的工作运行并完成他们的任务?