cream_reallyrunning.l \
cream_done.l \
cream_failed.l \
+ submitted_ft_reg.l \
+ running_ft.l \
+ done_ft.l \
+ aborted_ft.l \
# TODO: missing resubmission_deep
# shallow_resub_complex.l shallow_resub_simple.l shallow_resub_simple2.l \
--- /dev/null
+# macro definition for RUNNING state
+
+:running_ft:
+-s Application, -e FileTransfer, --result=FAIL, --reason="problem with transfer"
+-s JobController,-e Abort,--reason "just to test"
--- /dev/null
+# macro definition for RUNNING state
+
+:running_ft:
+-s Application, -e FileTransfer, --result=OK, --reason="ok"
/-e CREAMCancel/ { logit(); next;}
/-e CREAMAbort/ { logit(); next;}
+/-e FileTransferRegister/ { if (checkNOP(4) == 0) logit();
+ next;}
+/-e FileTransfer/ { logit(); next;}
+/-e Sandbox/ { logit(); next;}
+
# shell escape (for sequence number branching)
/^!/ { print substr($0,2,(length($0) - 1)); }
s = edg_wll_StatToString(stat.state);
/* print whole flat structure */
printf("%sstate : %s\n", ind, s);
- printf("%sjobId : %s\n", ind, j1 = edg_wlc_JobIdUnparse(stat.jobId));
+ printf("%sjobId : %s\n", ind, j1 = edg_wlc_JobIdUnparse(stat.jobId)); free(j1);
printf("%sowner : %s\n", ind, stat.owner);
switch (stat.jobtype) {
case EDG_WLL_STAT_SIMPLE:
}
printf("%ssandbox_retrieved : %d\n", ind, stat.sandbox_retrieved);
printf("%sjw_status : %s\n", ind, edg_wll_JWStatToString(stat.jw_status));
-
+
+ printf("%sisb_transfer : %s\n", ind, j1 = edg_wlc_JobIdUnparse(stat.isb_transfer)); free(j1);
+ printf("%sosb_transfer : %s\n", ind, j1 = edg_wlc_JobIdUnparse(stat.osb_transfer)); free(j1);
+
/* PBS state section */
if (stat.jobtype == EDG_WLL_STAT_PBS) {
printf("%spbs_state : %s\n", ind, stat.pbs_state);
free(cream_stat_name);
}
+ /* File Transfer section */
+ printf("%sft_compute_job : %s\n", ind, j1 = edg_wlc_JobIdUnparse(stat.ft_compute_job)); free(j1);
+ if (stat.ft_sandbox_type == EDG_WLL_STAT_INPUT)
+ printf("%sft_sandbox_type : INPUT\n", ind);
+ else if (stat.ft_sandbox_type == EDG_WLL_STAT_OUTPUT)
+ printf("%sft_sandbox_type : OUTPUT\n", ind);
+ else
+ printf("%sft_sandbox_type : UNKNOWN\n", ind);
+ printf("%sft_src : %s\n", ind, stat.ft_src);
+ printf("%sft_dest : %s\n", ind, stat.ft_dest);
+
+
printf("\n");
- free(j1);
free(j2);
free(s);
}
--- /dev/null
+# macro definition for RUNNING state
+
+:submitted_ft_reg:
+-s Application, -e FileTransfer, --result=START, --reason="started"
--- /dev/null
+# macro definition for SUBMITTED state
+
+-s Application, -e FileTransferRegister, --src="muj.stroj:/data/file.tar", --dest="new_file.tar"
if (ret) ret = enc_strlist(ret, stat->user_fqans);
if (ret) ret = enc_int(ret, stat->sandbox_retrieved);
if (ret) ret = enc_int(ret, stat->jw_status);
+ if (ret) ret = enc_jobid(ret, stat->isb_transfer);
+ if (ret) ret = enc_jobid(ret, stat->osb_transfer);
if (ret) ret = enc_string(ret, stat->pbs_state);
if (ret) ret = enc_string(ret, stat->pbs_queue);
if (ret) ret = enc_string(ret, stat->pbs_owner);
if (ret) ret = enc_int(ret, stat->cream_cancelling);
if (ret) ret = enc_int(ret, stat->cream_cpu_time);
if (ret) ret = enc_int(ret, stat->cream_jw_status);
+ if (ret) ret = enc_jobid(ret, stat->ft_compute_job);
+ if (ret) ret = enc_int(ret, stat->ft_sandbox_type);
+ if (ret) ret = enc_string(ret, stat->ft_src);
+ if (ret) ret = enc_string(ret, stat->ft_dest);
return ret;
}
if (tmp_in != NULL) stat->user_fqans = dec_strlist(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->sandbox_retrieved = dec_int(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->jw_status = dec_int(tmp_in, &tmp_in);
+ if (tmp_in != NULL) stat->isb_transfer = dec_jobid(tmp_in, &tmp_in);
+ if (tmp_in != NULL) stat->osb_transfer = dec_jobid(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->pbs_state = dec_string(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->pbs_queue = dec_string(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->pbs_owner = dec_string(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->cream_cancelling = dec_int(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->cream_cpu_time = dec_int(tmp_in, &tmp_in);
if (tmp_in != NULL) stat->cream_jw_status = dec_int(tmp_in, &tmp_in);
+ if (tmp_in != NULL) stat->ft_compute_job = dec_jobid(tmp_in, &tmp_in);
+ if (tmp_in != NULL) stat->ft_sandbox_type = dec_int(tmp_in, &tmp_in);
+ if (tmp_in != NULL) stat->ft_src = dec_string(tmp_in, &tmp_in);
+ if (tmp_in != NULL) stat->ft_dest = dec_string(tmp_in, &tmp_in);
+
*rest = tmp_in;
/* where Z.XX is version from indent + 1 (version after commit), Y = Z+1 */
/* and DESCRIPTION is short hit why version changed */
-#define INTSTAT_VERSION "revision 2.8 - undef status time"
+#define INTSTAT_VERSION "revision 2.9 - file transfers"
// ".... MAX LENGTH 32 BYTES !! ...."
// Internal error codes
js->pub.done_code = e->collectionState.done_code;
}
break;
+ case EDG_WLL_EVENT_SANDBOX:
+ if (USABLE_DATA(res, strict)) {
+ if ((e->sandbox.variant == EDG_WLL_SANDBOX_INPUT) && e->sandbox.transfer_job) {
+ edg_wlc_JobIdFree(js->pub.isb_transfer);
+ edg_wlc_JobIdParse(e->sandbox.transfer_job,&js->pub.isb_transfer);
+ }
+
+ if ((e->sandbox.variant == EDG_WLL_SANDBOX_OUTPUT) && e->sandbox.transfer_job) {
+ edg_wlc_JobIdFree(js->pub.osb_transfer);
+ edg_wlc_JobIdParse(e->sandbox.transfer_job,&js->pub.osb_transfer);
+ }
+ }
+ break;
+
default:
goto bad_event;
break;
;
}
break;
+ case EDG_WLL_EVENT_FILETRANSFERREGISTER:
+ if (USABLE(res)) {
+ ;
+ }
+ if (USABLE_DATA(res)) {
+ rep(js->pub.ft_src, e->fileTransferRegister.src);
+ rep(js->pub.ft_dest, e->fileTransferRegister.dest);
+ }
+ break;
+ case EDG_WLL_EVENT_FILETRANSFER:
+ if (USABLE(res)) {
+ switch (e->fileTransfer.result) {
+ case EDG_WLL_FILETRANSFER_START:
+ js->pub.state = EDG_WLL_JOB_RUNNING;
+ break;
+ case EDG_WLL_FILETRANSFER_OK:
+ js->pub.state = EDG_WLL_JOB_DONE;
+ js->pub.done_code = EDG_WLL_STAT_OK;
+ break;
+ case EDG_WLL_FILETRANSFER_FAIL:
+ js->pub.state = EDG_WLL_JOB_DONE;
+ js->pub.done_code = EDG_WLL_STAT_FAILED;
+ rep(js->pub.failure_reasons, e->fileTransfer.reason);
+ break;
+ default:
+ break;
+ }
+ }
+ if (USABLE_DATA(res)) {
+ ;
+ }
+ break;
+ case EDG_WLL_EVENT_ABORT:
+ if (USABLE(res)) {
+ js->pub.state = EDG_WLL_JOB_ABORTED;
+ js->pub.remove_from_proxy = 1;
+ rep(js->pub.reason, e->abort.reason);
+ rep(js->pub.location, "none");
+ }
+ break;
+ case EDG_WLL_EVENT_SANDBOX:
+ if (USABLE_DATA(res)) {
+ if (e->sandbox.variant == EDG_WLL_SANDBOX_INPUT)
+ js->pub.ft_sandbox_type = EDG_WLL_STAT_INPUT;
+
+ if (e->sandbox.variant == EDG_WLL_SANDBOX_OUTPUT)
+ js->pub.ft_sandbox_type = EDG_WLL_STAT_OUTPUT;
+
+ if (e->sandbox.compute_job) {
+ edg_wlc_JobIdFree(js->pub.ft_compute_job);
+ edg_wlc_JobIdParse(e->sandbox.compute_job,&js->pub.ft_compute_job);
+ }
+ }
+ break;
default:
break;
}