Skip to content

Conversation

@bouthilx
Copy link
Collaborator

It is difficult to debug resuming while important process are taking place in the pbs script automatically built by SmartDispatch.

Adding:

  • verbose to smart-dispatch/sd-launch-pbs command-line options
  • debugging prints in epilog (based on verbosity option)

It is difficult to debug resuming while important process are taking place in
the pbs script automatically built by SmartDispatch.

We add verbose to smart-dispatch script and add debugging prints in epilog.
@bouthilx
Copy link
Collaborator Author

@mgermain Small PR I took out of Slurm Backend PR

@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.532% when pulling 329efce on bouthilx:verbose into 9133e15 on SMART-Lab:master.


logger = logging.getLogger()


Copy link
Member

Choose a reason for hiding this comment

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

remove the logging.root.setLevel(logging.INFO) below and make sure the default throughout the system is warning.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mgermain Done

Copy link
Member

Choose a reason for hiding this comment

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

Even in the rest of the smartdispatch to stay consistent?

The user can now specify which level of logging it wants with -vv
option. The default one is WARNING. If is it important for the user to
have INFO present in stderr, it can use -v or -vv.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.532% when pulling 502181d on bouthilx:verbose into 9133e15 on SMART-Lab:master.

AUTORESUME_WORKER_CALL_PREFIX = 'timeout -s TERM {trigger_after} '.format(trigger_after=AUTORESUME_TRIGGER_AFTER)
AUTORESUME_WORKER_CALL_SUFFIX = ' WORKER_PIDS+=" $!"'
AUTORESUME_PROLOG = 'WORKER_PIDS=""'
AUTORESUME_PROLOG = """
Copy link
Member

Choose a reason for hiding this comment

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

Add the \ after the """ so there is no extra blank line later on.

AUTORESUME_PROLOG = """\

epilog = [AUTORESUME_EPILOG.format(launcher=LAUNCHER if args.launcher is None else args.launcher, path_job=path_job)]
prolog = [
AUTORESUME_PROLOG.format(verbose=str(args.verbose >= 2).lower())]
epilog = [
Copy link
Member

Choose a reason for hiding this comment

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

This project follows the entirety of PEP8 but the 80 columns.

@mgermain
Copy link
Member

After the tiny modifs mentioned this is ready to be merged.

I've been told the admins decided long ago not to follow rule E501. Even though
I disagree with this decision, I won't argue. :P
VERBOSE in the PBS file was simply set to "true". Because of this we could only
pass args.verbose=0 or args.verbose=2 to sd-launch-pbs. VERBOSE is now set to
args.verbose and the command-line option {"", -v, -vv} is rebuilt in the PBS
script based on the value of args.parse.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.532% when pulling 65239f5 on bouthilx:verbose into 9133e15 on SMART-Lab:master.

@bouthilx
Copy link
Collaborator Author

bouthilx commented Nov 3, 2017

@mgermain I bit the bullet and reverted the E501 fixes. 😜 I also changed the debugging logic in the epilog to support passing WARNING/INFO/DEBUG levels to sd-launch-pbs. Previously, it could only pass WARNING (no -v) or DEBUG (-vv).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants