Commit 2c9a1913 authored by Frank Winkler's avatar Frank Winkler
Browse files

Added more debug features.

parent 5678eef5
......@@ -43,7 +43,7 @@
*/
#define PLUGIN_NAME "PrEp-pika: "
#define STRING_LEN 256
#define STRING_LEN 512
const char plugin_name[] = "PrEp plugin pika";
......@@ -194,6 +194,8 @@ static void job_state(job_record_t *job_ptr, char **state)
static void job_data_prolog(job_record_t *job_ptr, char **job_data)
{
int i;
// start
char time_str[32];
slurm_make_time_str((&job_ptr->start_time), time_str, 32);
......@@ -205,15 +207,52 @@ static void job_data_prolog(job_record_t *job_ptr, char **job_data)
// partition
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "PARTITION = %s\n", job_ptr->part_ptr->name);
// EXCLUSIVE
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "EXCLUSIVE = %d\n", job_ptr->details->whole_node);
// CPU CNT
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "total_cpus = %d\n", job_ptr->total_cpus);
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "cpu_cnt = %d\n", job_ptr->cpu_cnt);
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "job_resrcs->ncpus = %d\n", job_ptr->job_resrcs->ncpus);
// Core spec
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "core_spec = %d\n", job_ptr->details->core_spec);
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "orig_cpus_per_task = %d\n", job_ptr->details->orig_cpus_per_task);
// Arguments
for (i = 0; i < job_ptr->details->argc; i++)
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "argv[%d] = %s\n", i, job_ptr->details->argv[i]);
// billable_tres
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "billable_tres = %f\n", job_ptr->billable_tres);
// cpus_per_tres
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "cpus_per_tres = %s\n", job_ptr->cpus_per_tres);
// tres
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "tres_fmt_alloc_str = %s\n", job_ptr->tres_fmt_alloc_str);
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "tres_alloc_str = %s\n", job_ptr->tres_alloc_str);
// gres
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "gres_alloc = %s\n", job_ptr->gres_alloc);
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "gres_used = %s\n", job_ptr->gres_used);
char **gres_detail_str = job_ptr->gres_detail_str;
for (i = 0; i < job_ptr->gres_detail_cnt; i++)
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "gres_detail_str[%d] = %s\n", i, gres_detail_str[i]);
List gres_list = job_ptr->gres_list;
ListIterator gres_iterator;
char * gres_item;
gres_iterator = list_iterator_create(gres_list);
while ((gres_item = list_next(gres_iterator))) {
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "gres_iterator: %s\n", gres_item);
}
list_iterator_destroy(gres_iterator);
snprintf(*job_data + strlen(*job_data), STRING_LEN - strlen(*job_data), "----");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment