-
Notifications
You must be signed in to change notification settings - Fork 18
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
add setting to give all jobs a unique name #273
Conversation
tasks/build.py
Outdated
@@ -654,6 +662,7 @@ def submit_job(job, cfg): | |||
build_env_cfg[config.BUILDENV_SETTING_SLURM_PARAMS], | |||
time_limit, | |||
job.slurm_opts, | |||
f"--job-name='{job_name}'", |
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.
Also here, only use --job-name
is the job_name is not None
?
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.
Addressed in c614a96
tasks/build.py
Outdated
@@ -67,6 +67,10 @@ def get_build_env_cfg(cfg): | |||
|
|||
buildenv = cfg[config.SECTION_BUILDENV] | |||
|
|||
job_name = buildenv.get(config.BUILDENV_SETTING_JOB_NAME) | |||
log(f"{fn}(): job_name '{job_name}'") | |||
config_data = {config.BUILDENV_SETTING_JOB_NAME: job_name} |
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.
This won't work, since config_data
is overwritten below?
You should change the line 76 below to:
config_data[config.BUILDENV_SETTING_JOBS_BASE_DIR] = jobs_base_dir
This also shows this wasn't (re)tested?
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.
Yep. Silly me.
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.
Fixed. Tested. Should work. 😬
Until now all jobs are named after the job script. This PR adds a new configuration setting
job_name
that is used as the job's name. This is then also used by the job manager to list all jobs (with that name). Thus it is possible to have multiple bot instances running at the same cluster where each bot instance uses a different job name. Hence, each bot instance is able to only handle its "own" jobs. We can use this to run a separate bot instance, for example, for bot development and testing.