-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Enable concurrent lumis and IOVs by default when number of streams is at least 2 #34231
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d844110
Modify options setting concurrent lumis and IOVs
wddgit d4b083e
Modify MessageLogger printout related to threads
wddgit 5baf5c3
improve interface for setting nConcurrentIOVs
wddgit 804766c
Improve the manner of running options unit tests
wddgit 72d1599
Add comment in parameter description
wddgit 755296a
Improve parameter description comment
wddgit 8a8e0a8
Use new BuildFile for loop
wddgit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# Capable of running 5 tests, this bash script expects a command line | ||
# argument from 0 to 4 specifying which test to run | ||
|
||
LOCAL_TEST_DIR=${CMSSW_BASE}/src/FWCore/Framework/test | ||
LOCAL_TMP_DIR=${CMSSW_BASE}/tmp/${SCRAM_ARCH} | ||
|
||
function die { echo Failure $1: status $2 ; exit $2 ; } | ||
|
||
pushd ${LOCAL_TMP_DIR} | ||
|
||
echo "Running run_testOptions.sh $1" | ||
|
||
# Configuration files and expected outputs for the 5 tests | ||
configFiles=("testOptions0_cfg.py" "testOptions1_cfg.py" "testOptions2_cfg.py" "testOptions3_cfg.py" "testOptions4_cfg.py") | ||
expectedStreams=(1 4 4 4 1) | ||
expectedConcurrentLumis=(1 3 2 4 1) | ||
expectedConcurrentIOVs=(1 2 2 4 1) | ||
|
||
cmsRun -p ${LOCAL_TEST_DIR}/${configFiles[$1]} >& ${configFiles[$1]}.log || die "cmsRun ${configFiles[$1]}" $? | ||
grep "Number of Streams = ${expectedStreams[$1]}" ${configFiles[$1]}.log || die "Failed number of streams test" $? | ||
grep "Number of Concurrent Lumis = ${expectedConcurrentLumis[$1]}" ${configFiles[$1]}.log || die "Failed number of concurrent lumis test" $? | ||
grep "Number of Concurrent IOVs = ${expectedConcurrentIOVs[$1]}" ${configFiles[$1]}.log || die "Failed number of concurrent IOVs test" $? | ||
|
||
rm ${configFiles[$1]}.log | ||
|
||
popd | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Test of options when all parameters taken from Config.py | ||
import FWCore.ParameterSet.Config as cms | ||
process = cms.Process("TEST") | ||
process.source = cms.Source("EmptySource") | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
process.options.dumpOptions = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Test of options when all parameters explicitly set | ||
import FWCore.ParameterSet.Config as cms | ||
process = cms.Process("TEST") | ||
process.source = cms.Source("EmptySource") | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.options = dict( | ||
dumpOptions = True, | ||
numberOfThreads = 4, | ||
numberOfStreams = 4, | ||
numberOfConcurrentLuminosityBlocks = 3, | ||
eventSetup = dict( | ||
numberOfConcurrentIOVs = 2 | ||
) | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should be able to do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. It works. It is a little more concise. Thanks. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Test of options when parameters are zero | ||
import FWCore.ParameterSet.Config as cms | ||
process = cms.Process("TEST") | ||
process.source = cms.Source("EmptySource") | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.options = dict( | ||
dumpOptions = True, | ||
numberOfThreads = 4, | ||
numberOfStreams = 0, | ||
numberOfConcurrentLuminosityBlocks = 0, | ||
eventSetup = dict( | ||
numberOfConcurrentIOVs = 0 | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Test of options when concurrentIOVs and concurrentLumis are too big | ||
import FWCore.ParameterSet.Config as cms | ||
process = cms.Process("TEST") | ||
process.source = cms.Source("EmptySource") | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.options = dict( | ||
dumpOptions = True, | ||
numberOfThreads = 4, | ||
numberOfStreams = 4, | ||
numberOfConcurrentLuminosityBlocks = 5, | ||
eventSetup = dict( | ||
numberOfConcurrentIOVs = 5 | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Test of options when a looper is in the job | ||
import FWCore.ParameterSet.Config as cms | ||
process = cms.Process("TEST") | ||
process.source = cms.Source("EmptySource") | ||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
|
||
process.options = dict( | ||
dumpOptions = True, | ||
numberOfThreads = 4, | ||
numberOfStreams = 4, | ||
numberOfConcurrentLuminosityBlocks = 7, | ||
eventSetup = dict( | ||
numberOfConcurrentIOVs = 7 | ||
) | ||
) | ||
|
||
process.looper = cms.Looper("DummyLooper", | ||
value = cms.untracked.int32(4) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smuzaffar Could you double-check that these are fine? In some other tests using the
<test>
directive we've used$LOCALTOP
instead of$CMSSW_BASE
, and just run in the current working directory instead ofpushd
/cd
to elsewhere.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some level this is a management policy decision. Where do we want files generated while running tests to go? I always thought that was the purpose of the tmp/slc7_amd64_gcc900 directory. I thought the tests that left files at the top level of the working directory were misbehaving (there are several that still do). I always fixed that when I touched them for some other purpose. That is what the pushd and popd commands were for.
This is similar to the question that came up in the other PR. What should we do with log files and little data files generated by the tests? Delete them if the shell script succeeds? Leave them always just in case someone wants to look at them? Is it a judgement call to be made on a case by case basis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOCALTOP
is available only whenscram build
is run whileCMSSW_BASE
is available in the env aftercmsenv
. So if you want to run your script directly via command line then better to use CMSSW_BASE.For temp logs and output files , it is better to create them under ${CMSSW_BASE}/tmp/${SCRAM_ARCH} and even better to create a sub-directory per test there. This also helps with cleanup. At one point I wanted to automate this but few tests failed as they depend on other tests output or they assume that they are run from top level $CMSSW_BASE directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @smuzaffar. I take it that we could look into changing the scripts that use
$LOCALTOP
to put their outputs into${CMSSW_BASE}/tmp/${SCRAM_ARCH}
.