Releases: PySlurm/pyslurm
v25.11.0
Added
- Support for Slurm 25.11.x
- Added new member
metrics_typetopyslurm.slurmctld.Config - The following new members have been added to the
pyslurm.Jobclass:submit_session_idallocated_licensescontainer_idkill_step_when_oomsubmit_lineextrafailed_node
Fixed
- Fixed an issue when parsing additional configs like
cgroup.conformpi.confwhen loading the slurm configuration withpyslurm.slurmctld.Config.load()
Changed
- Split up
prolog_epilog_timeoutinprolog_timeoutandepilog_timeoutinpyslurm.slurmctld.Config - Renamed
job_container_typetonamespace_plugininpyslurm.slurmctld.Config - The
uid_to_nameandgid_to_namefunctions that are used in a few places now don't error by default if the user/group doesn't exist anymore.
Now, if the user/group is gone already, the UID/GID is simply returned as astr.
Removed
-
Removed member
accounting_storage_userfrompyslurm.slurmctld.Config -
Removed
preempt_modefrom deprecated classpyslurm.qos- class will be replaced soon. -
Removed deprecated functions from the old API:
pyslurm.slurm_signal_job_step- usesend_signal()method onpyslurm.JobSteppyslurm.slurm_complete_jobpyslurm.slurm_terminate_job_steppyslurm.slurm_kill_job_step- usecancel()frompyslurm.JobSteppyslurm.slurm_ping- usepyslurm.slurmctld.ping(),pyslurm.slurmctld.ping_all(),pyslurm.slurmctld.ping_primary()orpyslurm.slurmctld.ping_backup()pyslurm.reconfigure- usepyslurm.slurmctld.reconfigure()pyslurm.slurm_shutdown- usepyslurm.slurmctld.shutdown()pyslurm.slurm_takeover- usepyslurm.slurmctld.takeover()pyslurm.slurm_set_debug_level- usepyslurm.slurmctld.set_log_level()pyslurm.slurm_set_debugflags- usepyslurm.slurmctld.add_debug_flags()pyslurm.slurm_set_schedlog_level- usepyslurm.slurmctld.enable_scheduler_logging()pyslurm.slurm_suspend- usesuspend()method onpyslurm.Jobpyslurm.slurm_resume- useunsuspend()method onpyslurm.Jobpyslurm.slurm_requeue- userequeue()method onpyslurm.Jobpyslurm.slurm_signal_job- usesend_signal()method on eitherpyslurm.Joborpyslurm.JobSteppyslurm.slurm_kill_job- usesend_signal()orcancel()method on eitherpyslurm.Joborpyslurm.JobSteppyslurm.slurm_kill_job2pyslurm.slurm_notify_job- usenotify()method onpyslurm.Jobpyslurm.get_job_state_reason- accessstate_reasonmember on apyslurm.Jobinstance (Job info must be loaded first)pyslurm.get_job_state- accessstatemember on apyslurm.Jobinstance (Job info must be loaded first)pyslurm.get_partition_state- accessstatemember on apyslurm.Partitioninstance (Partition info must be loaded first)pyslurm.get_preempt_mode- runpyslurm.slurmctld.Config.load()and accesspreempt_modememberpyslurm.get_node_state- accessstatemember on apyslurm.Nodeinstance (Node info must be loaded first)pyslurm.get_debug_flags- usepyslurm.slurmctld.get_debug_flags()pyslurm.get_node_use- just returned the node state, which is redundantpyslurm.get_last_slurm_error- usepyslurm.error.get_last_slurm_error()pyslurm.mins2time_str- usepyslurm.utils.mins_to_timestrpyslurm.secs2time_str- usepyslurm.utils.secs_to_timestrpyslurm.get_private_data_list- runpyslurm.slurmctld.Config.load()and accessprivate_datamember
-
Removed the following long deprecated old-api classes:
pyslurm.jobstep- usepyslurm.JobStepandpyslurm.JobStepspyslurm.statisticsusepyslurm.slurmctld.diag()to getpyslurm.slurmctld.Statisticspyslurm.job- usepyslurm.Job,pyslurm.Jobsandpyslurm.JobSubmitDescriptionpyslurm.reservation- usepyslurm.Reservationandpyslurm.Reservations
Reason for the removal: interfering with upgrades, and the fact that they haven't
been maintained in years anyway and better documented replacement classes are available.
Also speeds up compilation time.
v25.5.0
Added
- Support for Slurm 25.05.x
Changed
- Split up
prolog_epilog_timeoutinprolog_timeoutandepilog_timeoutinpyslurm.slurmctld.Config
Removed
-
get_environment_timeoutmember inpyslurm.slurmctld.Configclass -
The following long deprecated classes have been removed:
pyslurm.node(usepyslurm.Nodeinstead)pyslurm.config(usepyslurm.slurmctld.Configinstead)pyslurm.front_end(no replacement, functionality has been removed from Slurm)pyslurm.partition(usepyslurm.Partitioninstead)pyslurm.topology(no replacement, this was heavily reworked in 25.05 and needs separate followup)
Reason for the removal: interfering with the 25.05 upgrade, they haven't
been maintained in years anyway and better documented replacement classes are available.
v23.2.3
https://pyslurm.github.io/23.2/changelog/
Added
- Add
truncate_timeoption topyslurm.db.JobFilter, which is the same as -T /
--truncate from sacct. - Add new Attributes to
pyslurm.db.Jobsthat help gathering statistics for a
collection of Jobs more convenient. - Add new
idle_memoryandallocated_tresattributes topyslurm.Nodeclass - Added
statsattribute to bothpyslurm.Job,pyslurm.Jobsand
pyslurm.db.Jobs - Added
pidsattribute topyslurm.Jobwhich contains Process-IDs of the Job
organized by node-name - Added
load_statsmethod topyslurm.Jobandpyslurm.Jobsclasses.
Together with thestatsandpidsattributes mentioned above, it is now
possible to fetch live statistics (like sstat) - Switch to link with
libslurmfull.soinstead oflibslurm.so
This change really has no impact from a user perspective. Everything will
keep working the same, except that Slurms more internal library
libslurmfull.sois linked with (which is located alongside the plugins
inside theslurmdirectory, which itself is next tolibslurm.so)
Why the change? Because it will likely make development easier. It allows
access to more functions that might be needed in some places, without
completely having to implement them on our own. Implementing the
live-statistics feature, so basicallysstat, is for example not possible
withlibslurm.so
You can keep providing the directory wherelibslurm.soresided as
$SLURM_LIB_DIRto pyslurm, and it will automatically findlibslurmfull.so
from there. - Added
run_time_remainingandelapsed_cpu_timeattributes topyslurm.JobStep - Added
run_time_remainingattribute topyslurm.Job
Fixed
- Fix
allocated_gresattribute in thepyslurm.NodeClass returning nothing. - Fix Node State being displayed as
ALLOCATEDwhen it should actually be
MIXED. - Fix crash for the
gres_per_nodeattribute of thepyslurm.Jobclass when
the GRES String received from Slurm contains no count. - Fixed
total_cpu_time,system_cpu_timeanduser_cpu_timenot getting
calculated correctly for Job statistics - Actually make sure that
avg_cpu_time,min_cpu_time,total_cpu_time,
system_cpu_timeanduser_cpu_timeare integers, not float.
Changed
- Breaking: rename
cpu_timetoelapsed_cpu_timeinpyslurm.Joband
pyslurm.Jobsclasses - Breaking: rename attribute
alloc_cpusto justcpusinpyslurm.JobStep - Breaking: removed the following attributes from
pyslurm.db.Jobs:
consumed_energydisk_readdisk_writepage_faultsresident_memoryvirtual_memoryelapsed_cpu_timetotal_cpu_timeuser_cpu_timesystem_cpu_time
- The removed attributes above are now all available within the
stats
attribute, which is of typepyslurm.db.JobStatistics - Renamed the original class of
pyslurm.db.JobStatisticsto
pyslurm.db.JobStepStatistics.
All this class contains is really mostly applicable only to Steps, but
doesn't fully apply at the Job Level.
Therefore, the newpyslurm.db.JobStatisticsclass only contains all
statistics that make sense at the Job-level. - return
1as a value for thecpusattribute inpyslurm.db.Jobwhen there
is no value set from Slurm's side.
Removed
- Removed
pyslurm.version()function. Should use__version__attribute directly. - Removed
--slurm-liband--slurm-incparameters tosetup.py.
SLURM_LIB_DIRandSLURM_INCLUDE_DIRenvironment variables should be used instead.
v24.11.0
v23.11.1
Added
- Added
statsattribute to bothpyslurm.Job,pyslurm.Jobsand
pyslurm.db.Jobs - Added
pidsattribute topyslurm.Jobwhich contains Process-IDs of the Job
organized by node-name - Added
load_statsmethod topyslurm.Jobandpyslurm.Jobsclasses.
Together with thestatsandpidsattributes mentioned above, it is now
possible to fetch live statistics (like sstat) - Switch to link with
libslurmfull.soinstead oflibslurm.so
This change really has no impact from a user perspective. Everything will
keep working the same, except that Slurms more internal library
libslurmfull.sois linked with (which is located alongside the plugins
inside theslurmdirectory, which itself is next tolibslurm.so)
Why the change? Because it will likely make development easier. It allows
access to more functions that might be needed in some places, without
completely having to implement them on our own. Implementing the
live-statistics feature, so basicallysstat, is for example not possible
withlibslurm.so
You can keep providing the directory wherelibslurm.soresided as
$SLURM_LIB_DIRto pyslurm, and it will automatically findlibslurmfull.so
from there. - Added
run_time_remainingandelapsed_cpu_timeattributes topyslurm.JobStep - Added
run_time_remainingattribute topyslurm.Job
Fixed
- Fixed
total_cpu_time,system_cpu_timeanduser_cpu_timenot getting
calculated correctly for Job statistics - Actually make sure that
avg_cpu_time,min_cpu_time,total_cpu_time,
system_cpu_timeanduser_cpu_timeare integers, not float.
Changed
- Breaking: rename
cpu_timetoelapsed_cpu_timeinpyslurm.Joband
pyslurm.Jobsclasses - Breaking: rename attribute
alloc_cpusto justcpusinpyslurm.JobStep - Breaking: removed the following attributes from
pyslurm.db.Jobs:
consumed_energydisk_readdisk_writepage_faultsresident_memoryvirtual_memoryelapsed_cpu_timetotal_cpu_timeuser_cpu_timesystem_cpu_time
- The removed attributes above are now all available within the
stats
attribute, which is of typepyslurm.db.JobStatistics - Renamed the original class of
pyslurm.db.JobStatisticsto
pyslurm.db.JobStepStatistics.
All this class contains is really mostly applicable only to Steps, but
doesn't fully apply at the Job Level.
Therefore, the newpyslurm.db.JobStatisticsclass only contains all
statistics that make sense at the Job-level. - return
1as a value for thecpusattribute inpyslurm.db.Jobwhen there
is no value set from Slurm's side.
Removed
- Removed
pyslurm.version()function. Should use__version__attribute directly. - Removed
--slurm-liband--slurm-incparameters tosetup.py.
SLURM_LIB_DIRandSLURM_INCLUDE_DIRenvironment variables should be used instead.
v24.5.1
Added
- Added
statsattribute to bothpyslurm.Job,pyslurm.Jobsand
pyslurm.db.Jobs - Added
pidsattribute topyslurm.Jobwhich contains Process-IDs of the Job
organized by node-name - Added
load_statsmethod topyslurm.Jobandpyslurm.Jobsclasses.
Together with thestatsandpidsattributes mentioned above, it is now
possible to fetch live statistics (like sstat) - Switch to link with
libslurmfull.soinstead oflibslurm.so
This change really has no impact from a user perspective. Everything will
keep working the same, except that Slurms more internal library
libslurmfull.sois linked with (which is located alongside the plugins
inside theslurmdirectory, which itself is next tolibslurm.so)
Why the change? Because it will likely make development easier. It allows
access to more functions that might be needed in some places, without
completely having to implement them on our own. Implementing the
live-statistics feature, so basicallysstat, is for example not possible
withlibslurm.so
You can keep providing the directory wherelibslurm.soresided as
$SLURM_LIB_DIRto pyslurm, and it will automatically findlibslurmfull.so
from there. - Added
run_time_remainingandelapsed_cpu_timeattributes topyslurm.JobStep - Added
run_time_remainingattribute topyslurm.Job
Fixed
- Fixed
total_cpu_time,system_cpu_timeanduser_cpu_timenot getting
calculated correctly for Job statistics - Actually make sure that
avg_cpu_time,min_cpu_time,total_cpu_time,
system_cpu_timeanduser_cpu_timeare integers, not float.
Changed
- Breaking: rename
cpu_timetoelapsed_cpu_timeinpyslurm.Joband
pyslurm.Jobsclasses - Breaking: rename attribute
alloc_cpusto justcpusinpyslurm.JobStep - Breaking: removed the following attributes from
pyslurm.db.Jobs:
consumed_energydisk_readdisk_writepage_faultsresident_memoryvirtual_memoryelapsed_cpu_timetotal_cpu_timeuser_cpu_timesystem_cpu_time
- The removed attributes above are now all available within the
stats
attribute, which is of typepyslurm.db.JobStatistics - Renamed the original class of
pyslurm.db.JobStatisticsto
pyslurm.db.JobStepStatistics.
All this class contains is really mostly applicable only to Steps, but
doesn't fully apply at the Job Level.
Therefore, the newpyslurm.db.JobStatisticsclass only contains all
statistics that make sense at the Job-level. - return
1as a value for thecpusattribute inpyslurm.db.Jobwhen there
is no value set from Slurm's side.
Removed
- Removed
pyslurm.version()function. Should use__version__attribute directly. - Removed
--slurm-liband--slurm-incparameters tosetup.py.
SLURM_LIB_DIRandSLURM_INCLUDE_DIRenvironment variables should be used instead.
v24.5.0
v23.11.0
Added
- Support for Slurm 23.11.x
- Add
truncate_timeoption topyslurm.db.JobFilter, which is the same as -T /
--truncate from sacct. - Add new attributes to
pyslurm.db.Jobsthat help gathering statistics for a
collection of Jobs more convenient. - Add new attribute
gres_tasks_per_sharingtopyslurm.Joband
pyslurm.JobSubmitDescription
Fixed
- Fix
allocated_gresattribute in thepyslurm.NodeClass returning nothing. - Add new
idle_memoryandallocated_tresattributes topyslurm.Nodeclass - Fix Node State being displayed as
ALLOCATEDwhen it should actually be
MIXED. - Fix crash for the
gres_per_nodeattribute of thepyslurm.Jobclass when
the GRES String received from Slurm contains no count.
Removed
route_plugin,job_credential_private_keyandjob_credential_public_certificate
keys are removed from the output ofpyslurm.config().get()- Some deprecated and unused Slurm constants