// Output archive for the merging jdl
TString outputArchive;
if (TestBit(AliAnalysisGrid::kDefaultOutputs)) {
- outputArchive = "log_archive.zip:std*@disk=1 ";
+ outputArchive = "log_archive.zip:std*,*.stat@disk=1 ";
// Add normal output files, extra files + terminate files
TString files = GetListOfFiles("outextter");
// Do not register merge excludes
files.ReplaceAll(".root", "*.root");
outputArchive += Form("root_archive.zip:%s@disk=%d",files.Data(),fNreplicas);
} else {
- outputArchive = fOutputArchive;
+ TString files = fOutputArchive;
+ files.ReplaceAll(".root", "*.root"); // nreplicas etc should be already atttached by use
+ outputArchive = files;
}
arr = outputArchive.Tokenize(" ");
TIter next2(arr);
fDataPattern = "*AliESDs.root"; // Can be like: *AliESDs.root, */pass1/*AliESDs.root, ...
fFriendChainName = "";
fGridOutputDir = "output";
- fOutputArchive = "log_archive.zip:std*@disk=1 root_archive.zip:*.root@disk=2";
+ fOutputArchive = "log_archive.zip:std*,*.stat@disk=1 root_archive.zip:*.root@disk=2";
fOutputFiles = ""; // Like "AliAODs.root histos.root"
fInputFormat = "xml-single";
fJDLName = "analysis.jdl";
// Sumbit merging jobs for all missing chunks for the current stage.
TString query = Form("submit %s %s", jdl, aliendir);
Int_t ichunk = -1;
+ chunksDone.SetBitNumber(ntotstage); // expand the array to the maximum number of chunks
if (nmissing) {
for (i=0; i<nmissing; i++) {
ichunk = chunksDone.FirstNullBit(ichunk+1);
TIter next(list);
TObjString *package;
while((package=(TObjString*)next())) {
- if (gROOT->ProcessLine(Form("gProof->UploadPackage(\"%s\");", package->GetName()))) {
- if (gROOT->ProcessLine(Form("gProof->EnablePackage(\"%s\",kTRUE);", package->GetName()))) {
+ TString spkg = package->GetName();
+ spkg.ReplaceAll(".par", "");
+ gSystem->Exec(TString::Format("rm -rf %s", spkg.Data()));
+ if (!gROOT->ProcessLine(Form("gProof->UploadPackage(\"%s\");", package->GetName()))) {
+ TString enablePackage = (testMode)?Form("gProof->EnablePackage(\"%s\",kFALSE);", package->GetName()):Form("gProof->EnablePackage(\"%s\",kTRUE);", package->GetName());
+ if (gROOT->ProcessLine(enablePackage)) {
Error("StartAnalysis", "There was an error trying to enable package %s", package->GetName());
return kFALSE;
}
while ((package=next())) {
// Skip packages already enabled
if (parLibs.Contains(package->GetName())) continue;
+ TString spkg = package->GetName();
+ spkg.ReplaceAll(".par", "");
+ gSystem->Exec(TString::Format("rm -rf %s", spkg.Data()));
if (gROOT->ProcessLine(Form("gProof->UploadPackage(\"%s\");", package->GetName()))) {
if (gROOT->ProcessLine(Form("gProof->EnablePackage(\"%s\",kTRUE);", package->GetName()))) {
Error("StartAnalysis", "There was an error trying to enable package %s", package->GetName());
fOutputFiles += extra;
}
// Compose the output archive.
- fOutputArchive = "log_archive.zip:std*@disk=1 ";
+ fOutputArchive = "log_archive.zip:std*,*.stat@disk=1 ";
fOutputArchive += Form("root_archive.zip:%s@disk=%d",fOutputFiles.Data(),fNreplicas);
}
// if (!fCloseSE.Length()) fCloseSE = gSystem->Getenv("alien_CLOSE_SE");
out << "// Compile the package and set it up." << endl;
out << " TString pkgdir = package;" << endl;
out << " pkgdir.ReplaceAll(\".par\",\"\");" << endl;
- out << " gSystem->Exec(Form(\"tar xvzf %s.par\", pkgdir.Data()));" << endl;
+ out << " gSystem->Exec(TString::Format(\"tar xvzf %s.par\", pkgdir.Data()));" << endl;
out << " TString cdir = gSystem->WorkingDirectory();" << endl;
out << " gSystem->ChangeDirectory(pkgdir);" << endl;
out << " // Check for BUILD.sh and execute" << endl;
out << "// Compile the package and set it up." << endl;
out << " TString pkgdir = package;" << endl;
out << " pkgdir.ReplaceAll(\".par\",\"\");" << endl;
- out << " gSystem->Exec(Form(\"tar xvzf %s.par\", pkgdir.Data()));" << endl;
+ out << " gSystem->Exec(TString::Format(\"tar xvzf %s.par\", pkgdir.Data()));" << endl;
out << " TString cdir = gSystem->WorkingDirectory();" << endl;
out << " gSystem->ChangeDirectory(pkgdir);" << endl;
out << " // Check for BUILD.sh and execute" << endl;
// LD_LIBRARY_PATH
TString pkgdir = package;
pkgdir.ReplaceAll(".par","");
- gSystem->Exec(Form("tar xvzf %s.par", pkgdir.Data()));
+ gSystem->Exec(TString::Format("tar xzf %s.par", pkgdir.Data()));
TString cdir = gSystem->WorkingDirectory();
gSystem->ChangeDirectory(pkgdir);
// Check for BUILD.sh and execute
return;
}
out << "#!/bin/bash" << endl;
+ // Make sure we can properly compile par files
+ out << "export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH" << endl;
out << "echo \"=========================================\"" << endl;
out << "echo \"############## PATH : ##############\"" << endl;
out << "echo $PATH" << endl;
out << "echo \"############## memory : ##############\"" << endl;
out << "free -m" << endl;
out << "echo \"=========================================\"" << endl << endl;
- // Make sure we can properly compile par files
- if (TObject::TestBit(AliAnalysisGrid::kUsePars)) out << "export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH" << endl;
out << fExecutableCommand << " ";
out << fAnalysisMacro.Data() << " " << fExecutableArgs.Data() << endl << endl;
out << "echo \"======== " << fAnalysisMacro.Data() << " finished with exit code: $? ========\"" << endl;
return;
}
out << "#!/bin/bash" << endl;
+ // Make sure we can properly compile par files
+ out << "export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH" << endl;
out << "echo \"=========================================\"" << endl;
out << "echo \"############## PATH : ##############\"" << endl;
out << "echo $PATH" << endl;
out << "echo \"############## memory : ##############\"" << endl;
out << "free -m" << endl;
out << "echo \"=========================================\"" << endl << endl;
- // Make sure we can properly compile par files
- if (TObject::TestBit(AliAnalysisGrid::kUsePars)) out << "export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH" << endl;
TString mergeMacro = fExecutable;
mergeMacro.ReplaceAll(".sh", "_merge.C");
if (IsOneStageMerging())