<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
could you try submitting the following script:<br>
<br>
Script job.sh:<br>
******************************<br>
#!/bin/bash<br>
#SBATCH -p test-low<br>
#SBATCH -n 3<br>
#SBATCH -t 12:00:00<br>
sig_term()<br>
{<br>
echo "function sig_term called. Exiting"<br>
echo 'sig_term' > slask_term<br>
echo $(date) >> slask_term<br>
}<br>
# associate the function "term_handler" with the TERM signal<br>
trap 'sig_term' SIGTERM<br>
<br>
sleep 1000 &<br>
wait $!<br>
******************************<br>
<br>
and see if you catch the first SIGTERM. When I tried this signal was
ONLY caught at the end of the grace time.<br>
<br>
(I'll try your settings as soon as my system is up again)<br>
<br>
Regards,<br>
<br>
/jon<br>
<br>
<div class="moz-cite-prefix">On 11/20/2017 04:21 PM, Ailing Zhang
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAC82FfbyzHMnGXaTSPT47qJDbVOT4AjLdCMsqsdwKxGKGob1fA@mail.gmail.com">
<div>
<div class="gmail_quote">
<div><br>
</div>
<div>
<div class="gmail_default"
style="font-family:"trebuchet ms",sans-serif">Hi
slurm community,</div>
<div class="gmail_default"
style="font-family:"trebuchet ms",sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:"trebuchet ms",sans-serif">I'm
testing preemption with partition based preemption.
Partitions test-high and test-low share the same nodes. I
set GraceTime=600 and PreemptMode=CANCEL in test-low. But
once I submitted a job to test-high, job in test-low is
immediately killed without any grace time. </div>
<div class="gmail_default"
style="font-family:"trebuchet ms",sans-serif">Here
is my configs.</div>
<div class="gmail_default"
style="font-family:"trebuchet ms",sans-serif">
<div class="gmail_default">PartitionName=test-low</div>
<div class="gmail_default"> AllowGroups=admins
AllowAccounts=ALL AllowQos=ALL</div>
<div class="gmail_default"> AllocNodes=ALL Default=NO
QoS=N/A</div>
<div class="gmail_default"> DefaultTime=NONE
DisableRootJobs=NO ExclusiveUser=NO GraceTime=600
Hidden=NO</div>
<div class="gmail_default"> MaxNodes=UNLIMITED
MaxTime=02:00:00 MinNodes=1 LLN=NO
MaxCPUsPerNode=UNLIMITED</div>
<div class="gmail_default"> Nodes=node[100-102]</div>
<div class="gmail_default"> PriorityJobFactor=10
PriorityTier=10 RootOnly=NO ReqResv=NO OverSubscribe=NO</div>
<div class="gmail_default"> OverTimeLimit=NONE
PreemptMode=CANCEL</div>
<div class="gmail_default"> State=UP TotalCPUs=100
TotalNodes=3 SelectTypeParameters=NONE</div>
<div class="gmail_default"> DefMemPerNode=UNLIMITED
MaxMemPerNode=UNLIMITED</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">
<div class="gmail_default">PartitionName=test-high</div>
<div class="gmail_default"> AllowGroups=admins
AllowAccounts=ALL AllowQos=ALL</div>
<div class="gmail_default"> AllocNodes=ALL Default=NO
QoS=N/A</div>
<div class="gmail_default"> DefaultTime=NONE
DisableRootJobs=NO ExclusiveUser=NO GraceTime=0
Hidden=NO</div>
<div class="gmail_default"> MaxNodes=UNLIMITED
MaxTime=02:00:00 MinNodes=1 LLN=NO
MaxCPUsPerNode=UNLIMITED</div>
<div class="gmail_default"> Nodes=node[100-102]
PriorityJobFactor=30 PriorityTier=30 RootOnly=NO
ReqResv=NO OverSubscribe=NO</div>
<div class="gmail_default"> OverTimeLimit=NONE
PreemptMode=OFF</div>
<div class="gmail_default"> State=UP TotalCPUs=100
TotalNodes=3 SelectTypeParameters=NONE</div>
<div class="gmail_default"> DefMemPerNode=UNLIMITED
MaxMemPerNode=UNLIMITED</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">Any help will be much
appreciated.</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">Thanks!</div>
</div>
</div>
</div>
<div>
<div class="gmail_default"
style="font-family:"trebuchet ms",sans-serif">
<div class="gmail_default">
<div class="gmail_default">Ailing</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>