Skip to content
Snippets Groups Projects
Commit 56eb4257 authored by Morris Jette's avatar Morris Jette
Browse files

Add sview support for job arrays

parent f2f1f46c
No related branches found
No related tags found
No related merge requests found
...@@ -94,7 +94,7 @@ $ scancel 20_3 20_5 ...@@ -94,7 +94,7 @@ $ scancel 20_3 20_5
$ scancel 20 $ scancel 20
</pre> </pre>
<h2>Squeue and Sview Command Use</h2> <h2>Squeue Command Use</h2>
<p>TBD</p> <p>TBD</p>
...@@ -110,6 +110,7 @@ The <i>JobID</i> is a unique identifier for the job. ...@@ -110,6 +110,7 @@ The <i>JobID</i> is a unique identifier for the job.
The <i>ArrayJobID</i> is the <i>JobID</i> of the first element of the job The <i>ArrayJobID</i> is the <i>JobID</i> of the first element of the job
array. array.
The <i>ArrayTaskID</i> is the array index of this particular entry. The <i>ArrayTaskID</i> is the array index of this particular entry.
Neiher field is displayed if the job is not part of a job array.
In order to modify a job, always use the <i>JobID</i> specification.</p> In order to modify a job, always use the <i>JobID</i> specification.</p>
<pre> <pre>
...@@ -128,7 +129,11 @@ $ scontrol update JobId=15 TimeLimit=30 ...@@ -128,7 +129,11 @@ $ scontrol update JobId=15 TimeLimit=30
<p>The following Slurm commands do not currently recognize job arrays and their <p>The following Slurm commands do not currently recognize job arrays and their
use requires the use of SLurm job IDs, which are unique for each array element: use requires the use of SLurm job IDs, which are unique for each array element:
sacct, sattach, sbcast, smap, sprio, sreport, sshare, sstat and strigger.</p> sacct, sattach, sbcast, smap, sprio, sreport, sshare, sstat, strigger, and
sview.
The sview command has been modified to permit display of a job's ArrayJobId
and ArrayTaskId fields. Both fields are displayed with a value of "N/A" if
the job is not part of a job array.</p>
<p style="text-align:center;">Last modified 24 January 2013</p> <p style="text-align:center;">Last modified 24 January 2013</p>
......
...@@ -97,6 +97,8 @@ enum { ...@@ -97,6 +97,8 @@ enum {
SORTID_ALLOC, SORTID_ALLOC,
SORTID_ALLOC_NODE, SORTID_ALLOC_NODE,
SORTID_ALPS_RESV_ID, SORTID_ALPS_RESV_ID,
SORTID_ARRAY_JOB_ID,
SORTID_ARRAY_TASK_ID,
SORTID_BATCH, SORTID_BATCH,
SORTID_BATCH_HOST, SORTID_BATCH_HOST,
SORTID_BLOCK, SORTID_BLOCK,
...@@ -207,6 +209,10 @@ static display_data_t display_data_job[] = { ...@@ -207,6 +209,10 @@ static display_data_t display_data_job[] = {
EDIT_MODEL, refresh_job, create_model_job, admin_edit_job}, EDIT_MODEL, refresh_job, create_model_job, admin_edit_job},
{G_TYPE_INT, SORTID_ALLOC, NULL, FALSE, EDIT_NONE, refresh_job, {G_TYPE_INT, SORTID_ALLOC, NULL, FALSE, EDIT_NONE, refresh_job,
create_model_job, admin_edit_job}, create_model_job, admin_edit_job},
{G_TYPE_STRING, SORTID_ARRAY_JOB_ID, "Array_Job_ID", FALSE, EDIT_NONE,
refresh_job, create_model_job, admin_edit_job},
{G_TYPE_STRING, SORTID_ARRAY_TASK_ID, "Array_Task_ID", FALSE, EDIT_NONE,
refresh_job, create_model_job, admin_edit_job},
{G_TYPE_STRING, SORTID_PARTITION, "Partition", FALSE, {G_TYPE_STRING, SORTID_PARTITION, "Partition", FALSE,
EDIT_TEXTBOX, refresh_job, create_model_job, admin_edit_job}, EDIT_TEXTBOX, refresh_job, create_model_job, admin_edit_job},
#ifdef HAVE_BG #ifdef HAVE_BG
...@@ -1317,6 +1323,29 @@ static void _layout_job_record(GtkTreeView *treeview, ...@@ -1317,6 +1323,29 @@ static void _layout_job_record(GtkTreeView *treeview,
tmp_char, tmp_char,
sizeof(tmp_char), sizeof(tmp_char),
SELECT_PRINT_DATA)); SELECT_PRINT_DATA));
if (job_ptr->array_task_id != (uint16_t) NO_VAL) {
snprintf(tmp_char, sizeof(tmp_char), "%u",
job_ptr->array_job_id);
} else {
snprintf(tmp_char, sizeof(tmp_char), "N/A");
}
add_display_treestore_line(update, treestore, &iter,
find_col_name(display_data_job,
SORTID_ARRAY_JOB_ID),
tmp_char);
if (job_ptr->array_task_id != (uint16_t) NO_VAL) {
snprintf(tmp_char, sizeof(tmp_char), "%u",
job_ptr->array_task_id);
} else {
snprintf(tmp_char, sizeof(tmp_char), "N/A");
}
add_display_treestore_line(update, treestore, &iter,
find_col_name(display_data_job,
SORTID_ARRAY_TASK_ID),
tmp_char);
if (job_ptr->batch_flag) if (job_ptr->batch_flag)
sprintf(tmp_char, "yes"); sprintf(tmp_char, "yes");
else else
...@@ -1806,6 +1835,7 @@ static void _layout_job_record(GtkTreeView *treeview, ...@@ -1806,6 +1835,7 @@ static void _layout_job_record(GtkTreeView *treeview,
static void _update_job_record(sview_job_info_t *sview_job_info_ptr, static void _update_job_record(sview_job_info_t *sview_job_info_ptr,
GtkTreeStore *treestore) GtkTreeStore *treestore)
{ {
char tmp_array_job_id[20], tmp_array_task_id[20];
char tmp_time_run[40], tmp_time_resize[40], tmp_time_submit[40]; char tmp_time_run[40], tmp_time_resize[40], tmp_time_submit[40];
char tmp_time_elig[40], tmp_time_start[40], tmp_time_end[40]; char tmp_time_elig[40], tmp_time_start[40], tmp_time_end[40];
char tmp_time_sus[40], tmp_time_limit[40], tmp_alloc_node[40]; char tmp_time_sus[40], tmp_time_limit[40], tmp_alloc_node[40];
...@@ -1829,6 +1859,16 @@ static void _update_job_record(sview_job_info_t *sview_job_info_ptr, ...@@ -1829,6 +1859,16 @@ static void _update_job_record(sview_job_info_t *sview_job_info_ptr,
snprintf(tmp_alloc_node, sizeof(tmp_alloc_node), "%s:%u", snprintf(tmp_alloc_node, sizeof(tmp_alloc_node), "%s:%u",
job_ptr->alloc_node, job_ptr->alloc_sid); job_ptr->alloc_node, job_ptr->alloc_sid);
if (job_ptr->array_task_id != (uint16_t) NO_VAL) {
snprintf(tmp_array_job_id, sizeof(tmp_array_job_id), "%u",
job_ptr->array_job_id);
snprintf(tmp_array_task_id, sizeof(tmp_array_task_id), "%u",
job_ptr->array_task_id);
} else {
snprintf(tmp_array_job_id, sizeof(tmp_array_job_id), "N/A");
snprintf(tmp_array_task_id, sizeof(tmp_array_task_id), "N/A");
}
if (job_ptr->batch_flag) if (job_ptr->batch_flag)
tmp_batch = "yes"; tmp_batch = "yes";
else else
...@@ -2020,6 +2060,8 @@ static void _update_job_record(sview_job_info_t *sview_job_info_ptr, ...@@ -2020,6 +2060,8 @@ static void _update_job_record(sview_job_info_t *sview_job_info_ptr,
SORTID_ACCOUNT, job_ptr->account, SORTID_ACCOUNT, job_ptr->account,
SORTID_ALLOC, 1, SORTID_ALLOC, 1,
SORTID_ALLOC_NODE, tmp_alloc_node, SORTID_ALLOC_NODE, tmp_alloc_node,
SORTID_ARRAY_JOB_ID, tmp_array_job_id,
SORTID_ARRAY_TASK_ID,tmp_array_task_id,
SORTID_BATCH, tmp_batch, SORTID_BATCH, tmp_batch,
SORTID_BATCH_HOST, job_ptr->batch_host, SORTID_BATCH_HOST, job_ptr->batch_host,
SORTID_COLOR, SORTID_COLOR,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment