-
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
Changes from 6 commits
d844110
d4b083e
5baf5c3
804766c
72d1599
755296a
8a8e0a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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} | ||
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. @smuzaffar Could you double-check that these are fine? In some other tests using the 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. 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 commentThe reason will be displayed to describe this comment to others. Learn more.
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 commentThe 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 |
||
|
||
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 |
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 |
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. |
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 | ||
) | ||
) |
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 | ||
) | ||
) |
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) | ||
) |
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.
@wddgit , these are good candidates of recently added feature of scram V3 (which I will present in one of core sw meetings). You can use either
or
and scram will define
TestFWCoreFrameworkOptions_N
testsThere 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.
I just pushed a commit using the new for loop in the BuildFile. It seems to work well. Thanks.