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

Adding options to reduce prints #146

Merged
merged 4 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ats/atsMachines/lsf_asq.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ def examineOptions(self, options):
print("%s options.nosrun = %s " % (DEBUG_LSF, options.nosrun))
print("%s options.checkForAtsProc = %s " % (DEBUG_LSF, options.checkForAtsProc))
print("%s options.showGroupStartOnly = %s " % (DEBUG_LSF, options.showGroupStartOnly))
print("%s options.removeStartNote = %s " % (DEBUG_LSF, options.removeStartNote))
print("%s options.removeEndNote = %s " % (DEBUG_LSF, options.removeEndNote))
print("%s options.skip = %s " % (DEBUG_LSF, options.skip))
print("%s options.blueos_exclusive = %s " % (DEBUG_LSF, options.blueos_exclusive))
print("%s options.mpibind = %s " % (DEBUG_LSF, options.mpibind))
Expand Down
2 changes: 2 additions & 0 deletions ats/atsMachines/slurmProcessorScheduled.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ def examineOptions(self, options):
print("%s options.salloc = %s " % (DEBUG_SLURM, options.salloc))
print("%s options.checkForAtsProc = %s " % (DEBUG_SLURM, options.checkForAtsProc))
print("%s options.showGroupStartOnly = %s " % (DEBUG_SLURM, options.showGroupStartOnly))
print("%s options.removeStartNote = %s " % (DEBUG_SLURM, options.removeStartNote))
print("%s options.removeEndNote = %s " % (DEBUG_SLURM, options.removeEndNote))
print("%s options.skip = %s " % (DEBUG_SLURM, options.skip))
print("%s options.exclusive = %s " % (DEBUG_SLURM, options.exclusive))
print("%s options.mpibind = %s " % (DEBUG_SLURM, options.mpibind))
Expand Down
6 changes: 6 additions & 0 deletions ats/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ def add_more_options(parser):
parser.add_option('--showGroupStartOnly', action='store_true',
help='''Only show start of first test in group, not
subsequent steps.''')
parser.add_option('--removeStartNote', action='store_true',
help='''Remove message printed before the test has started
running.''')
parser.add_option('--removeEndNote', action='store_true',
help='''Remove message printed after the test has finished
running.''')
parser.add_option('--skip', action='store_true',
help='''skip actual execution of the tests, but show
filtering results and missing test files.''')
Expand Down
3 changes: 2 additions & 1 deletion ats/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ def testEnded(self, test, status):
#note test.status is not necessarily status after this!
#see test.expectedResult

self.noteEnd(test) #to be defined in children
if not configuration.options.removeEndNote:
self.noteEnd(test) #to be defined in children
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is correct because some machines (slurm, flux, and I think lsf) use noteEnd to calculate the number of remaining resources. The implementations of noteEnd need to be refactored to remove the print portion (perhaps as logEnd).

Copy link
Member

Choose a reason for hiding this comment

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

Check, thanks for that @liu15

Copy link
Member

Choose a reason for hiding this comment

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

you are correct Ben. That needs fixed.


# now close the outputs
if test.stdOutLocGet() != 'terminal':
Expand Down
3 changes: 2 additions & 1 deletion ats/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def step(self):
self.schedule("Chose #%d to start." % nextTest.serialNumber)
self.addBlock(nextTest)
result = machine.startRun(nextTest)
self.logStart(nextTest, result)
if not configuration.options.removeStartNote:
self.logStart(nextTest, result)
if not result:
self.removeBlock(nextTest)
break # failure to launch, let it come back if tests left.
Expand Down