从New Git Branch上在集群上启动Slurm Jobs

发布于 2025-02-14 02:02:53 字数 810 浏览 1 评论 0原文

我有一些代码,上面有两个git分支,分支1分支2。我一直在使用shell脚本在计算群集上启动slurm作业(通过sbatch shell_script.sh在终端中运行朱莉娅脚本my_code.jl >分支1 。

我现在想修改my_code.jl而不会影响先前提交的作业,以便这些作业以my_code.jl的旧版本运行。因此,我为我的新代码修复创建了分支2

我的问题是:如果我切换到分支2并通过sbatch shell_script.sh启动新作业my_code.jl分支1)上,将git运行my_code.jl on branch 2,并且先前提交的作业继续运行版本my_code.jl on 分支1?如果是这样,Slurm知道如何执行此操作,鉴于在shell_script.sh中,运行我的代码Julia my_code.jl的行不参考任何给定的Git分支。

编辑:

我做了一个快速测试以查看这是否是真的,并且似乎是错误的。 IE我在旧分支机构时提交了一份工作,然后切换到新分支并再次提交了同一工作。在两种情况下,发生的是新分支上的代码。

这意味着我不能安全地在新分支上工作,并期望我先前提交的slurm工作不会受到影响。

I have some code with two git branches, branch 1 and branch 2. I have been launching SLURM jobs using a shell script on a computing cluster (via sbatch shell_script.sh in the terminal) to run a Julia script my_code.jl contained in branch 1.

I would now like to modify my_code.jl without affecting previously submitted jobs, such that those jobs run with the old version of my_code.jl. I thus created branch 2 for my new code fixes.

My question is: if I switch to branch 2 and launch new jobs running my_code.jl via sbatch shell_script.sh (which is the same as on branch 1 ), will git run the version of my_code.jl on branch 2, and will previously submitted jobs continue to run the version of my_code.jl on branch 1? If so, how does SLURM know to do this, given that in the shell_script.sh the line running my code julia my_code.jl does not refer to any given git branch.

Edit:

I did a quick test to see if this is true, and it appears to be false. I.e I submitted a job while on the old branch, and switched to the new branch and submitted the same job again. What happened was the code on the new branch ran in both cases.

This would mean I can't safely work on the new branch and expect SLURM jobs I previously submitted to not be affected..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文