Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secondary input source improvements/fixes #9091

Merged
merged 1 commit into from May 16, 2015

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented May 14, 2015

This PR makes several improvements/fixes to the secondary input source.

  1. In "sequential" mode (referred to as "deterministic" mode by WMAgent), the skipEvents parameter is currently ignored silently. This PR implements the initial skipping of events if this parameter is non-zero.
  2. In sequential mode, the secondary source currently will not return any more events after the last event in the last file specified. This PR implements looping back to the beginning of the first file.
  3. The secondary input source opens a random input file in its ctor. The random number seed uses getpid() to determine the seed. Brian Bockelman pointed out that getpid() is deterministic at some sites. This PR replaces the use of getpid() with /dev/urandom to determine the seed. Note that linux and OSX both support /dev/urandom.
  4. When the randomization of the first input file was implemented, a bug was introduced in sequential mode such that the sequence of events began with the randomly chosen file, rather than the first file.
    This bug is fixed by the same change that implements 1).
    Note that 1), and possibly 2), are needed by any reasonable deterministic scheme to avoid duplication of premixed pileup.
  5. The secondary input source unit tests are enhanced to test that the skipEvents parameter is working correctly.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wmtan for CMSSW_7_5_X.

Secndary input source improvements/fixes

It involves the following packages:

IOPool/Input
IOPool/SecondaryInput

@cmsbuild, @Dr15Jones, @nclopezo can you please review it and eventually sign? Thanks.
@wddgit this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@nclopezo you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@Dr15Jones
Copy link
Contributor

please test

seed = (seed << 16) + seed;
std::ifstream f("/dev/urandom");
unsigned int seed;
f.read(reinterpret_cast<char*>(&seed), sizeof(seed));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbockelm Is this how you expected it to work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup - that's going to be as good as we can make things.

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@Dr15Jones
Copy link
Contributor

+1

@Dr15Jones
Copy link
Contributor

@ericvaandering this should fix the problem you were discussing with Bill.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs unless changes or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @nclopezo, @smuzaffar

@wmtan
Copy link
Contributor Author

wmtan commented May 14, 2015

@davidlange6 @Dr15Jones
The ORP meeting should also decide if these changes should go into 7_4_X. If so, I would be happy to do the backport.

@cmsbuild
Copy link
Contributor

-1
Tested at: 682c174
When I ran the RelVals I found an error in the following worklfows:
50202.0 step2

runTheMatrix-results/50202.0_TTbar_13+TTbar_13+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15_PU50+MINIAODMCUP1550/step2_TTbar_13+TTbar_13+DIGIUP15_PU50+RECOUP15_PU50+HARVESTUP15_PU50+MINIAODMCUP1550.log
----- Begin Fatal Exception 14-May-2015 20:48:04 CEST-----------------------
An exception of category 'Configuration' occurred while
   [0] Processing run: 1 lumi: 1 event: 1
   [1] Running path 'digitisation_step'
   [2] Calling event method for module MixingModule/'mix'
Exception Message:
RootInputFileSequence::readOneRandom(): no input files specified for secondary input source.
----- End Fatal Exception -------------------------------------------------

you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9091/4668/summary.html

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_5_X IBs unless changes (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @nclopezo, @smuzaffar

@davidlange6
Copy link
Contributor

+1

@mark-grimes
Copy link

I've backported this to 6_2_X_SLHC with #9140. There were some minor clashes with differences between 62X and 75X, if anyone has the time for a cursory glance I'd appreciate you checking over it.

@wmtan
Copy link
Contributor Author

wmtan commented May 18, 2015

I looked over #9140 briefly, and it looks OK. I did not notice any obvious differences between 62X and 75X.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants