You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

同一节点内不同资源集运行不同任务的实现问题求助

求助:HPC节点资源集任务分配问题

此前我曾就相关问题提问,但目前尝试的另外两种方法均未成功——所有尝试都会导致6个资源集运行相同任务。

背景

我需要在节点的多个资源集间分配预测任务:每个资源集包含1个GPU和7个CPU,单节点共6个资源集。资源集完成当前任务后,应执行列表中的下一个预测任务(对应part00.lst至part05.lst,理论上每个资源集对应一个独立任务)。

第一种尝试方法

通过提交脚本使用jsrun -r6 -g1 -a1 -c7 -b packed:7 -d packed -l gpu-cpu调用如下脚本:

#!/bin/bash
output=/path/  ## 预测结果的存储路径

for i in {0..5}; do
  target=part0${i}.lst
  ........     ## 使用$target和$output变量执行singularity任务的脚本内容
done

第二种尝试方法

尝试用UNIX后台运行实现多任务并行(他人曾用类似方法完成同类任务):我创建了6个分别对应part00.lst至part05.lst的bash脚本,执行脚本如下:

#!/bin/bash

## 各类提交参数

for i in {0..5}; do
  jsrun -r 6 -g 1 -a 1 -c 7 -brs -d packed -l gpu-cpu bash batch_run_0${i}.sh &
done
wait

此外还尝试了硬编码6个bash脚本的调用命令:

#!/bin/bash

jsrun -r 6 -g 1 -a 1 -c 7 -brs -d packed -l gpu-cpu bash batch_run_00.sh &
jsrun -r 6 -g 1 -a 1 -c 7 -brs -d packed -l gpu-cpu bash batch_run_01.sh &
jsrun -r 6 -g 1 -a 1 -c 7 -brs -d packed -l gpu-cpu bash batch_run_02.sh &
jsrun -r 6 -g 1 -a 1 -c 7 -brs -d packed -l gpu-cpu bash batch_run_03.sh &
jsrun -r 6 -g 1 -a 1 -c 7 -brs -d packed -l gpu-cpu bash batch_run_04.sh &
jsrun -r 6 -g 1 -a 1 -c 7 -brs -d packed -l gpu-cpu bash batch_run_05.sh &
wait

我是新手,恳请各位提供帮助!


内容的提问来源于stack exchange,提问作者meh47336

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 03:25:48