25 TB.
checkFile(gSystem->Getenv(
"CWB_ROOTLOGON_FILE"));
26 TB.
checkFile(gSystem->Getenv(
"CWB_PARAMETERS_FILE"));
27 TB.
checkFile(gSystem->Getenv(
"CWB_UPARAMETERS_FILE"));
31 if(gSystem->Getenv(
"CWB_CONDOR_DAG")!=NULL) {
33 cwb_condor_dag=
TString(gSystem->Getenv(
"CWB_CONDOR_DAG"));
35 TObjArray*
token = cwb_condor_dag.Tokenize(
TString(
'/'));
36 TObjString* stoken =(TObjString*)token->At(token->GetEntries()-1);
37 cwb_condor_dag = stoken->GetString();
42 if(gSystem->Getenv(
"CWB_PEGASUS_USITE")!=NULL) {
44 TString cwb_pegasus_usite=
TString(gSystem->Getenv(
"CWB_PEGASUS_USITE"));
49 cwb_condor_workflow.ReplaceAll(
".",
"_");
56 if(gSystem->Getenv(
"_USE_PEGASUS")!=NULL) batch_cmd = cwb_scripts+
"/cwb_pegasus_submit.sh";
57 if(gSystem->Getenv(
"_USE_LSF")!=NULL) batch_cmd = cwb_scripts+
"/cwb_lsf_submit.sh";
59 if(gSystem->Getenv(
"_USE_PEGASUS")!=NULL) {
63 int estat = gSystem->GetPathInfo(workflowfile,&
id,&size,&flags,&mt);
68 cout <<
"File \"" << workflowfile <<
"\" already exist" << endl;
69 cout <<
"Do you want to submit again ? (y/n) ";
72 }
while ((strcmp(answer,
"y")!=0)&&(strcmp(answer,
"n")!=0));
73 if (strcmp(answer,
"n")==0) {
76 sprintf(cmd,
"rm %s",workflowfile);
77 int ret=gSystem->Exec(cmd);
78 if(ret) {cout <<
"Error while executing " << cmd <<
" !!!" << endl;
exit(1);}
83 if(cwb_condor_dag==
"") {
84 sprintf(cmd,
"cd %s/%s;%s %s.dag %s",
87 sprintf(cmd,
"cd %s/%s;%s %s %s",
91 int ret=gSystem->Exec(cmd);
92 if(ret) {cout <<
"Error while executing " << batch_cmd <<
" !!!" << endl;
exit(1);}
94 if(gSystem->Getenv(
"_USE_LSF")!=NULL) {
96 cout <<
"Your LSF jobs has been submitted" << endl;
97 cout <<
"To monitor the jobs do : cwb_lsf status" << endl;
98 cout <<
"To monitor the queue : cwb_lsf queue" << endl;
99 cout <<
"To kill the all jobs do : cwb_lsf kill" << endl;
100 cout <<
"To resubmit paused jobs do : cwb_lsf resume" << endl;
101 cout <<
"To suspend all jobs do : cwb_lsf stop" << endl << endl;
104 if(gSystem->Getenv(
"_USE_PEGASUS")!=NULL) {
105 sprintf(cmd,
"cd %s;ls -1 -trd workflows/*/pegasus/cwb/* | tail -n 1 | awk 'BEGIN { OFS = \"\"; ORS = \"\" } ; {print $1}; {print \" %s\"}' | xargs ln -sf",
condor_dir,
data_label);
107 int ret=gSystem->Exec(cmd);
108 if(ret) {cout <<
"Error while executing " << cmd <<
" !!!" << endl;
exit(1);}
111 ret=gSystem->Exec(cmd);
112 cout << endl << endl;
113 cout <<
"Your workflow has been started and is running in the base directory: " << endl;
114 cout << workflowfile << endl << endl;
115 cout <<
"To monitor the workflow do : cwb_pstatus" << endl;
116 cout <<
"To remove the workflow do : cwb_premove" << endl;
117 cout <<
"To resubmit an aborted or failed workflow do : cwb_prun" << endl;
118 cout <<
"To analyze the workflow do : cwb_panalyzer" << endl << endl;
TString cwb_condor_workflow
strcpy(RunLabel, RUN_LABEL)
sprintf(workflowfile,"%s/%s", condor_dir, cwb_condor_workflow.Data())
TString cwb_pegasus_usite