Skip to content

Commit

Permalink
Handling case when due to high ramdisk access latency (exceptional co…
Browse files Browse the repository at this point in the history
…ndition that does not happen normally, but is a result of some other problem), LS value given by CMSSW_STOP file

(created by hltd usually when cloud switch is made mid-run) is older than the current LS processed by CMSSW. In that case it was possible to end run in the mid of current LS, which
rarely resulted in not writing EoLS file to disk and thus causing lumisection to remain unmerged on FU. This patch sets higher "stop LS" if in such condition.
  • Loading branch information
smorovic committed Apr 18, 2016
1 parent aacc491 commit 580dcc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions EventFilter/Utilities/interface/EvFDaqDirector.h
Expand Up @@ -204,6 +204,7 @@ namespace evf{
bool readEolsDefinition_ = true;
unsigned int eolsNFilesIndex_ = 1;
std::string stopFilePath_;
unsigned int stop_ls_override_ = 0;

std::shared_ptr<Json::Value> transferSystemJson_;
};
Expand Down
7 changes: 7 additions & 0 deletions EventFilter/Utilities/src/EvFDaqDirector.cc
Expand Up @@ -482,9 +482,16 @@ namespace evf {
int stopFileLS = -1;
if (stat(stopFilePath_.c_str(),&buf)==0) {
stopFileLS = readLastLSEntry(stopFilePath_);
if (!stop_ls_override_) {
//if lumisection is higher than in stop file, should quit at next from current
if (stopFileLS>=0 && (int)ls>=stopFileLS) stopFileLS = stop_ls_override_ = ls;
}
else stopFileLS = stop_ls_override_;
edm::LogWarning("EvFDaqDirector") << "Detected stop request from hltd. Ending run for this process after LS -: " << stopFileLS;
//return runEnded;
}
else //if file was removed before reaching stop condition, reset this
stop_ls_override_ = 0;

timeval ts_lockbegin;
gettimeofday(&ts_lockbegin,0);
Expand Down

0 comments on commit 580dcc6

Please sign in to comment.