Skip to content
Snippets Groups Projects
Commit 5be9f42d authored by Gerardo Ganis's avatar Gerardo Ganis
Browse files

proof/proof: fix for ROOT-8466

Remove residual symlink creation (after optimization introduced in 0a976f4a).
For PROOF-Lite, make sure that all the relevant files (including .pcm) are present in the cache.
parent b5f3f2aa
No related branches found
No related tags found
No related merge requests found
...@@ -88,7 +88,6 @@ private: ...@@ -88,7 +88,6 @@ private:
protected: protected:
TProofLite() : TProof() { } // For derived classes to use TProofLite() : TProof() { } // For derived classes to use
Int_t CreateSymLinks(TList *files, TList *wrks = 0);
Int_t Init(const char *masterurl, const char *conffile, Int_t Init(const char *masterurl, const char *conffile,
const char *confdir, Int_t loglevel, const char *confdir, Int_t loglevel,
const char *alias = 0); const char *alias = 0);
......
...@@ -1423,44 +1423,6 @@ Long64_t TProofLite::Process(TDSet *dset, const char *selector, Option_t *option ...@@ -1423,44 +1423,6 @@ Long64_t TProofLite::Process(TDSet *dset, const char *selector, Option_t *option
return rv; return rv;
} }
////////////////////////////////////////////////////////////////////////////////
/// Create in each worker sandbox symlinks to the files in the list
/// Used to make the cache information available to workers.
Int_t TProofLite::CreateSymLinks(TList *files, TList *wrks)
{
Int_t rc = 0;
if (files) {
TList *wls = (wrks) ? wrks : fActiveSlaves;
TIter nxf(files);
TObjString *os = 0;
while ((os = (TObjString *) nxf())) {
// Expand target
TString tgt(os->GetName());
gSystem->ExpandPathName(tgt);
// Loop over active workers
TIter nxw(wls);
TSlave *wrk = 0;
while ((wrk = (TSlave *) nxw())) {
// Link name
TString lnk = Form("%s/%s", wrk->GetWorkDir(), gSystem->BaseName(os->GetName()));
gSystem->Unlink(lnk);
if (gSystem->Symlink(tgt, lnk) != 0) {
rc++;
Warning("CreateSymLinks", "problems creating sym link: %s", lnk.Data());
} else {
PDB(kGlobal,1)
Info("CreateSymLinks", "created sym link: %s", lnk.Data());
}
}
}
} else {
Warning("CreateSymLinks", "files list is undefined");
}
// Done
return rc;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// Initialize the dataset manager from directives or from defaults /// Initialize the dataset manager from directives or from defaults
/// Return 0 on success, -1 on failure /// Return 0 on success, -1 on failure
...@@ -1626,8 +1588,6 @@ Int_t TProofLite::Load(const char *macro, Bool_t notOnClient, Bool_t uniqueOnly, ...@@ -1626,8 +1588,6 @@ Int_t TProofLite::Load(const char *macro, Bool_t notOnClient, Bool_t uniqueOnly,
} }
gSystem->FreeDirectory(dirp); gSystem->FreeDirectory(dirp);
} }
// Create the relevant symlinks
CreateSymLinks(&cachedFiles, wrks);
} }
} }
...@@ -1649,7 +1609,7 @@ Int_t TProofLite::Load(const char *macro, Bool_t notOnClient, Bool_t uniqueOnly, ...@@ -1649,7 +1609,7 @@ Int_t TProofLite::Load(const char *macro, Bool_t notOnClient, Bool_t uniqueOnly,
/// Return -1 in case of error, 0 otherwise. /// Return -1 in case of error, 0 otherwise.
Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired, Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired,
TSelector **selector, Int_t opt, TList *wrks) TSelector **selector, Int_t opt, TList *)
{ {
// Relevant pointers // Relevant pointers
TString cacheDir = fCacheDir; TString cacheDir = fCacheDir;
...@@ -1760,6 +1720,7 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired, ...@@ -1760,6 +1720,7 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired,
dot = binname.Last('.'); dot = binname.Last('.');
if (dot != kNPOS) if (dot != kNPOS)
binname.Replace(dot,1,"_"); binname.Replace(dot,1,"_");
TString pcmname = TString::Format("%s_ACLiC_dict_rdict.pcm", binname.Data());
binname += "."; binname += ".";
FileStat_t stlocal, stcache; FileStat_t stlocal, stcache;
...@@ -1771,7 +1732,8 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired, ...@@ -1771,7 +1732,8 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired,
if (dirp) { if (dirp) {
const char *e = 0; const char *e = 0;
while ((e = gSystem->GetDirEntry(dirp))) { while ((e = gSystem->GetDirEntry(dirp))) {
if (!strncmp(e, binname.Data(), binname.Length())) { if (!strncmp(e, binname.Data(), binname.Length()) ||
!strncmp(e, pcmname.Data(), pcmname.Length())) {
TString fncache = Form("%s/%s", cacheDir.Data(), e); TString fncache = Form("%s/%s", cacheDir.Data(), e);
Bool_t docp = kTRUE; Bool_t docp = kTRUE;
if (!gSystem->GetPathInfo(fncache, stcache)) { if (!gSystem->GetPathInfo(fncache, stcache)) {
...@@ -1810,7 +1772,8 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired, ...@@ -1810,7 +1772,8 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired,
if (dirp) { if (dirp) {
const char *e = 0; const char *e = 0;
while ((e = gSystem->GetDirEntry(dirp))) { while ((e = gSystem->GetDirEntry(dirp))) {
if (!strncmp(e, binname.Data(), binname.Length())) { if (!strncmp(e, binname.Data(), binname.Length()) ||
!strncmp(e, pcmname.Data(), pcmname.Length())) {
Bool_t docp = kTRUE; Bool_t docp = kTRUE;
if (!gSystem->GetPathInfo(e, stlocal)) { if (!gSystem->GetPathInfo(e, stlocal)) {
TString fncache = Form("%s/%s", cacheDir.Data(), e); TString fncache = Form("%s/%s", cacheDir.Data(), e);
...@@ -1864,10 +1827,6 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired, ...@@ -1864,10 +1827,6 @@ Int_t TProofLite::CopyMacroToCache(const char *macro, Int_t headerRequired,
cacheLock->Unlock(); cacheLock->Unlock();
// Create symlinks
if (opt & (kCp | kCpBin))
CreateSymLinks(cachedFiles, wrks);
cachedFiles->SetOwner(); cachedFiles->SetOwner();
delete cachedFiles; delete cachedFiles;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment