LSF usage

本文介绍了在LSF(LoadSharingFacility)环境下,如何使用bsub命令进行作业调度,包括执行预执行和后执行命令、利用LSB_JOBID环境变量、以及管理组作业、查看队列状态和终止作业的相关操作。
摘要由CSDN通过智能技术生成

bsubs

optiondescriptionexample
-ERuns the specified job-based pre-execution command on the execution host before actually running the job.
-EpRuns the specified job-based post-execution command on the execution host after the job finishes.

-eAppends the standard error output of the job to the specified file path.
-ggroup jobbsus -g /group_job_name

demo

前处理和后处理(pre/post execution)

bsub  -E 'echo pre > pre.${LSB_JOBID}.log' -Ep 'echo post > post.${LSB_JOBID}.log' sleep 10

环境变量LSB_JOBID是LSF为每一个作业设置的专有环境变量,内容为作业ID
bsub -o lsf/`date +%Y%m`/%J.out -e lsf/`date +%Y%m`/%J.err

bjobs

-w: 

bqueues

bkill

group

bsub -g /group_job_name

bkill -g /group_job_name 0

获得PID

bsub -q gui -I calibre -drc -batch & pid=$!

获得JOBID

function nk_jobid {
    output=$($*)
    echo $output | head -n1 | cut -d'<' -f2 | cut -d'>' -f1
}

jobid=$(nk_jobid bsub pwd)

  • 11
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值