7 TB.
checkFile(gSystem->Getenv(
"CWB_ROOTLOGON_FILE"));
8 TB.
checkFile(gSystem->Getenv(
"CWB_PARAMETERS_FILE"));
9 TB.
checkFile(gSystem->Getenv(
"CWB_UPARAMETERS_FILE"));
13 if(gSystem->Getenv(
"CWB_CONDOR_DAG")!=NULL) {
15 cwb_condor_dag=
TString(gSystem->Getenv(
"CWB_CONDOR_DAG"));
17 TObjArray*
token = cwb_condor_dag.Tokenize(
TString(
'/'));
18 TObjString* stoken =(TObjString*)token->At(token->GetEntries()-1);
19 cwb_condor_dag = stoken->GetString();
24 if(gSystem->Getenv(
"CWB_PEGASUS_USITE")!=NULL) {
26 TString cwb_pegasus_usite=
TString(gSystem->Getenv(
"CWB_PEGASUS_USITE"));
31 cwb_condor_workflow.ReplaceAll(
".",
"_");
38 if(gSystem->Getenv(
"_USE_PEGASUS")!=NULL) batch_cmd = cwb_scripts+
"/cwb_pegasus_submit.sh";
39 if(gSystem->Getenv(
"_USE_LSF")!=NULL) batch_cmd = cwb_scripts+
"/cwb_lsf_submit.sh";
41 if(gSystem->Getenv(
"_USE_PEGASUS")!=NULL) {
45 int estat = gSystem->GetPathInfo(workflowfile,&
id,&size,&flags,&mt);
50 cout <<
"File \"" << workflowfile <<
"\" already exist" << endl;
51 cout <<
"Do you want to submit again ? (y/n) ";
54 }
while ((strcmp(answer,
"y")!=0)&&(strcmp(answer,
"n")!=0));
55 if (strcmp(answer,
"n")==0) {
58 sprintf(cmd,
"rm %s",workflowfile);
59 int ret=gSystem->Exec(cmd);
60 if(ret) {cout <<
"Error while executing " << cmd <<
" !!!" << endl;
exit(1);}
65 if(cwb_condor_dag==
"") {
66 sprintf(cmd,
"cd %s/%s;%s %s.dag %s",
69 sprintf(cmd,
"cd %s/%s;%s %s %s",
73 int ret=gSystem->Exec(cmd);
74 if(ret) {cout <<
"Error while executing " << batch_cmd <<
" !!!" << endl;
exit(1);}
76 if(gSystem->Getenv(
"_USE_LSF")!=NULL) {
78 cout <<
"Your LSF jobs has been submitted" << endl;
79 cout <<
"To monitor the jobs do : cwb_lsf status" << endl;
80 cout <<
"To monitor the queue : cwb_lsf queue" << endl;
81 cout <<
"To kill the all jobs do : cwb_lsf kill" << endl;
82 cout <<
"To resubmit paused jobs do : cwb_lsf resume" << endl;
83 cout <<
"To suspend all jobs do : cwb_lsf stop" << endl << endl;
86 if(gSystem->Getenv(
"_USE_PEGASUS")!=NULL) {
87 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);
89 int ret=gSystem->Exec(cmd);
90 if(ret) {cout <<
"Error while executing " << cmd <<
" !!!" << endl;
exit(1);}
93 ret=gSystem->Exec(cmd);
95 cout <<
"Your workflow has been started and is running in the base directory: " << endl;
96 cout << workflowfile << endl << endl;
97 cout <<
"To monitor the workflow do : cwb_pstatus" << endl;
98 cout <<
"To remove the workflow do : cwb_premove" << endl;
99 cout <<
"To resubmit an aborted or failed workflow do : cwb_prun" << endl;
100 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