case EDG_WLL_STAT_CONDOR:
printf("%sjobtype : CONDOR\n", ind);
break;
+ case EDG_WLL_STAT_CREAM:
+ printf("%sjobtype : CREAM\n", ind);
+ break;
default:
+ printf("%sjobtype : UNKNOWN\n", ind);
break;
}
printf("%sparent_job : %s\n", ind,
(stat.pbs_error_desc) ? "\n" : "", stat.pbs_error_desc);
}
+ /* CREAM state section */
+ if (stat.jobtype == EDG_WLL_STAT_CREAM) {
+ char *cream_stat_name = edg_wll_JWStatToString(stat.cream_state);
+
+ printf("%scream_state : %s\n", ind, cream_stat_name);
+ printf("%scream_owner : %s\n", ind, stat.cream_owner);
+ printf("%scream_endpoint : %s\n", ind, stat.cream_endpoint);
+ printf("%scream_reason : %s\n", ind, stat.cream_reason);
+ printf("%scream_lrms_id : %s\n", ind, stat.cream_lrms_id);
+ printf("%scream_node : %s\n", ind, stat.cream_node);
+ printf("%scream_done_code : %d\n", ind, stat.cream_done_code);
+ printf("%scream_exit_code : %d\n", ind, stat.cream_exit_code);
+ printf("%scream_cancelling : %d\n", ind, stat.cream_cancelling);
+ printf("%scream_cpu_time : %d\n", ind, stat.cream_cpu_time);
+ printf("%scream_jw_status : %d\n", ind, stat.cream_jw_status);
+
+ free(cream_stat_name);
+ }
+
printf("\n");
free(j1);
return strdup(jw_statNames[statCode]);
}
+static const char * const cream_statNames[] = {
+@@@{
+ my $f = selectField $status cream_state;
+ if ($f->{codes}) {
+ for (@{$f->{codes}}) {
+ my $lc = lc $_->{name};
+ my $uc = ucfirst $lc;
+ gen qq{
+! "$uc",
+};
+ }
+ }
+@@@}
+};
+
+enum edg_wll_StatCream_state edg_wll_StringToCreamStat(const char *name)
+{
+ unsigned int i;
+
+ for (i=0; i<sizeof(cream_statNames)/sizeof(cream_statNames[0]); i++)
+ if (strcasecmp(cream_statNames[i],name) == 0) return (enum edg_wll_StatCream_state) i;
+ return (enum edg_wll_StatCream_state) -1;
+}
+
+char *edg_wll_CreamStatToString(enum edg_wll_StatCream_state statCode)
+{
+ if ((int)statCode < 0 || statCode >= sizeof(cream_statNames)/sizeof(cream_statNames[0])) return (char *) NULL;
+ return strdup(cream_statNames[statCode]);
+}
+
+
+
char *edg_wll_JDLField(edg_wll_JobStat *stat, const char *field_name)
{
char *extr_val;