| Summary: | can i pick up --pty from job_submit.lua | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | Yee-Ting Li <ytl> |
| Component: | Configuration | Assignee: | Marcin Stolarek <cinek> |
| Status: | RESOLVED INFOGIVEN | QA Contact: | |
| Severity: | 4 - Minor Issue | ||
| Priority: | --- | CC: | cinek, radmer |
| Version: | 20.02.3 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | SLAC | Alineos Sites: | --- |
| Atos/Eviden Sites: | --- | Confidential Site: | --- |
| Coreweave sites: | --- | Cray Sites: | --- |
| DS9 clusters: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Linux Distro: | --- |
| Machine Name: | CLE Version: | ||
| Version Fixed: | Target Release: | --- | |
| DevPrio: | --- | Emory-Cloud Sites: | --- |
|
Description
Yee-Ting Li
2020-09-05 22:15:21 MDT
Yee,
This is something you can achieve easily using cli_filter plugin, where you can directly check if --pty was specified.
An example cli_filter lua function checking for that may look like:
> 1 function slurm_cli_pre_submit(options, pack_offset)
> 2 if options.pty == "set" then
> 3 options.partition="interactive-jobs";
> 4 slurm.log_info("Partition changed to interactive-jobs");
> 5 end
> 6 return slurm.SUCCESS
> 7 end
> 8
> 9 function slurm_cli_setup_defaults(options, cli_type)
> 10 return slurm.SUCCESS
> 11 end
> 12 function slurm_cli_post_submit(options, cli_type)
> 13 return slurm.SUCCESS
As a limitation of cli_filter plugin user can get around that using his own slurm client or substituted configuration. Pros of cli_filter is that it's processing happens on user end, so it doesn't increase job submission (slurmctld process it under job lock) processing time.
Let me know if the solution works for you.
cheers,
Marcin
Is there anything else I can help you with? cheers, Marcin thanks Marcin - we'll have to consider whether its sufficient for this feature to be implemented as a cli_filter. you may close the ticket. |