Ticket 16704

Summary: After upgrading to 23.02 SLURM_NTASKS is no longer set unless --ntasks is specified
Product: Slurm Reporter: Todd Merritt <tmerritt>
Component: slurmctldAssignee: Marshall Garey <marshall>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 4 - Minor Issue    
Priority: ---    
Version: 23.02.0   
Hardware: Linux   
OS: Linux   
Site: U of AZ Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- NoveTech Sites: ---
OCF Sites: --- Recursion Pharma Sites: ---
SFW Sites: --- SNIC sites: ---
Linux Distro: --- Machine Name:
CLE Version: Version Fixed:
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Todd Merritt 2023-05-11 12:33:38 MDT
Previously, that environment variable was always set in jobs and the lua variable job_desc.num_tasks always had a value in our job submit plugin. After upgrading from 22.05 to 23.02 though both values are undefined unless --ntasks is defined.
Comment 1 Marshall Garey 2023-05-11 12:49:23 MDT
This was an intentional change to fix a bug. See:

https://bugs.schedmd.com/show_bug.cgi?id=16278#c2
https://github.com/SchedMD/slurm/commit/ef513023ad87a3870bf575efd2329672819c59f0



Unrelated: we have fixed many bugs in 23.02.0 and 23.02.1, including fixing stability issues and fixing an issue that broke mpirun in 23.02. So I encourage you to upgrade to 23.02.2.
Comment 2 Todd Merritt 2023-05-11 13:42:10 MDT
Thanks for the info!