pi上提交后台任务

pi上提交后台任务,第1张

编辑a.cmd文件内容示例如下

# !/bin/bash
# SBATCH -J t2m
# SBATCH -n 1
# SBATCH --ntasks-per-node=1
# SBATCH --comment=GRAPES
# SBATCH -p serial
# SBATCH -o t2m1h_update3h_station2k.out
# SBATCH -e t2m1h_update3h_station2k.err

# set runtime environment variables
export OMP_NUM_THREADS = 1

# some shell commands
ulimit - s unlimited
python t2m1h_update3h_station2k.py > t2m1h_update3h_station2k.log

其中

#SBATCH -J t2m 代表任务名取为t2m

# SBATCH -n 1 代表任务使用节点数

# SBATCH --ntasks-per-node=1 代表每个节点任务数

# SBATCH --comment=GRAPES 代表任务类型

# SBATCH -p serial   代表串行执行

# SBATCH -o t2m1h_update3h_station2k.out 正常输出信息

# SBATCH -e t2m1h_update3h_station2k.err 错误输出信息

export OMP_NUM_THREADS = 1 用于设置环境变量

python t2m1h_update3h_station2k.py > t2m1h_update3h_station2k.log 需要执行的任务命令

编辑后 使用 $sbatch a.cmd 提交作业

提交作业后 使用 $squeue | grep vfy_xp 查看作业

通过  cat  t2m1h_update3h_station2k.log 查看输出

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/723990.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-26
下一篇 2022-04-26

发表评论

登录后才能评论

评论列表(0条)

保存