手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Mpich hpc(高性能计算) and torque作业调度

[日期:2012-05-20] 来源:Linux社区  作者:yungho [字体:大 中 小]

vim job2.pbs(并行作业)
#!/bin/sh
#PBS -N job_name
#PBS -o job.log
#PBS -e job.err
#PBD -q batch
#PBD -l nodes=2
cd /home/wxh
echo Time is `date`
echo Directory is $PWD
echo This job runs on the following nodes:
cat $PBS_NODEFILE
NPROCS=`wc -l < $PBS_NODEFILE`
echo This job has allocated $NPROCS nodes
mpiexec -machine $PBS_NODEFILE -np $NPROCS /home/xili/prog


vim prog
#!/bin/sh
echo 100000000 | ./icpi      #icpi程序是mpi自带的,拷贝过来即可

chmod +x prog

qsub jobz.pbs             #提交作业
qstat                     #查看作业
pbsnodes                  #查看节点

####测试结果如下
[wxh@server2 ~]$ qsub job1.pbs
7.server2.example.com
[wxh@server2 ~]$ qstat
Job id
Name
User
Time Use S Queue
--------------------------------------------------
7.server2
job_name
wxh
0 R batch

[wxh@server2 ~]$ pbsnodes
station11
state = job-exclusive             只有一个节点计算
np = 1
ntype = cluster
jobs = 0/7.server2.example.com
status =
rectime=1299203609,varattr=,jobs=,state=free,netload=305533,gres=,loadave=0.0
1908,uname=Linux station11.example.com 2.6.18-164.el5xen #1 SMP
Tue Aug 18 16:06:30 EDT 2009 i686,opsys=linux
mom_service_port = 15002
mom_manager_port = 15003
gpus = 0
station12
state = free
np = 1
ntype = cluster
status =
rectime=1299203603,varattr=,jobs=,state=free,netload=248091,gres=,loadave=0.00 station12.example.com 2.6.18-164.el5xen #1 SMP Tue Aug 18 16:06:30
EDT 2009 i686,opsys=linux
mom_service_port = 15002
mom_manager_port = 15003
gpus = 0

[wxh@server2 ~]$ qsub job2.pbs
8.server2.example.com
[wxh@server2 ~]$ qstat
Job id
Name
User
Time User S Queue
----------------------------------------------------
7.server2
job_name
wxh
00:00:31 C batch
8.server2
job_name
wxh
0 R batch

[wxh@server2 ~]$ pbsnodes
station11
state = job-exclusive (两个节点都在计算)
np = 1
ntype = cluster
jobs = 0/8.server1.example.com
status =
rectime=1299203918,varattr=,jobs=,state=free,netload=422738,gres=,loadave=0.1
1908,uname=Linux station11.example.com 2.6.18-164.el5xen #1 SMP
Tue Aug 18 16:06:30 EDT 2009 i686,opsys=linux
mom_service_port = 15002
mom_manager_port = 15003
gpus = 0
station12
state = job-exclusive
np = 1
ntype = cluster
jobs = 0/8.server2.example.com
statux =
rectime=1299203924,varattr=,jobs=5.server2.example.com,state=free,netload=3609
station12.example.com 2.6.18-164.el5xen #1 SMP Tue Aug 18 16:06:30
EDT 2009 i686,opsys=linux
mom_service_port = 15002
mom_manager_port = 15003
gpus = 0

linux
相关资讯       RHEL6 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款