我正尝试保留从我的帐户提交的所有作业。但是,scontrol hold
仅接受数组,而我有很多数组。是否有像scancel -u user
这样的替代命令?
编辑1: 如果唯一的方法是迭代所有作业ID,则这是我的方法:
squeue -u user | awk '{print $1;}' | while read jobid; do scontrol hold $jobid; done
答案 0 :(得分:2)
尽管将格式化文本格式化为 <DockLayout class="screen" stretchLastChild="true">
<ScrollView dock="top">
<StackLayout orientation="vertical">
<GridLayout class="header" rows="auto" columns="*,auto,auto">
<Label text="Test" row="0" col="0" verticalAlignment="center"></Label>
<Image src="~/assets/images/search.png"
verticalAlignment="center" marginRight="25" row="0"
col="1" height="22" />
<Button class="logoutButton" text="Logout" fontSize="14" verticalAligment="middle" marginRight="10" row="0" col="2" @tap="logout"></Button>
</GridLayout>
<GridLayout class="tabs" columns="*,*,*,*,*" height="30" :selectedIndex="selectedIndex">
<Label class="active" text="Category1" row="0" col="0"></Label>
<Label text="Category2" row="0" col="1"></Label>
<Label text="Category3" row="0" col="2"></Label>
<Label text="Category4" row="0" col="3"></Label>
<Label text="Category5" row="0" col="4"></Label>
</GridLayout>
</StackLayout>
</ScrollView>
<TabView :selectedIndex="selectedIndex">
<TabViewItem title="Tab1" iconSource="~/images/icons/coins.png" @tap="goTo1()">
<Frame id="frame1">
<YourTab1Comp></YourTab1Comp>
</Frame>
</TabViewItem>
<TabViewItem title="Tab2" iconSource="~/images/icons/settings.png" @tap="goTo2()">
<Frame id="frame2">
<YourTab2Comp></YourTab2Comp>
</Frame>
</TabViewItem>
<TabViewItem title="Tab3" iconSource="~/images/icons/add_user_male.png" @tap="goTo3()">
<Frame id="frame3">
<YourTab3Comp></YourTab3Comp>
</Frame>
</TabViewItem>
</TabView>
</DockLayout>
很聪明,但我可能会这样做:
this.$navigateTo(SomeComp, {
frame: 'frame1' // <frame id, or ref, or instance>
});
或
sh
如果您想按州进行过滤,也可以这样做:
squeue -u <user> --format "%i" --noheader | xargs scontrol hold
或
sacct --allocation --user=<user> --noheader --format=jobid | xargs scontrol hold
来源:Slurm手册页
答案 1 :(得分:0)
一种常用的方法是(ab)利用squeue
的格式设置来建立scontrol
行:
squeue -u user --format "scontrol hold job %i"
然后将其通过管道传递到外壳中:
squeue -u user --format "scontrol hold job %i" | sh