All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased on the 25.11.x branch
- New Classes to interact with Database Associations (WIP)
pyslurm.db.Associationpyslurm.db.Associations
- New Classes to interact with Database QoS (WIP)
pyslurm.db.QualityOfServicepyslurm.db.QualitiesOfService
- New members added for the
pyslurm.Jobclass:preferred_featuresgpusgrestrestres_per_nodetres_per_jobtres_per_socketallocated_tresrequested_tresreserved_portsselinux_contextsegment_sizespread_segmentsconsolidate_segmentsslurm_protocol_version
- New members added for the
pyslurm.JobStepclass:gpusgrestrestres_per_nodetres_per_tasktres_per_steptres_per_socketcontainer_idarray_idarray_task_idstandard_inputstandard_outputstandard_errorworking_directory
- New members added for the
pyslurm.db.Jobclass:gpusgrestresallocated_tresrequested_tresstandard_inputstandard_outputstandard_errorheterogenous_idheterogenous_offsetrequeue_countrequested_reservationsreservation_idwckey_idlineagelicensessegment_sizeschedulerstart_rpc_received
- New members added for the
pyslurm.db.JobStepclass:gpusgrestresstandard_inputstandard_outputstandard_errorworking_directory
- New members added for the
pyslurm.JobSubmitDescriptionclass:container_idselinux_contextsegment_sizereserved_portsextra
- The
gres_per_nodeattribute ofpyslurm.Jobwill soon be removed. Usegresinstead.
pyslurm.db.TrackableResourcesno longer inherits fromdict, and now has properly all possible TRES in Slurm defined.- Type for
tres_per_taskinpyslurm.Jobhas been changed topyslurm.db.TrackableResources
25.11.0 - 2026-02-13
- 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 an issue when parsing additional configs like
cgroup.conformpi.confwhen loading the slurm configuration withpyslurm.slurmctld.Config.load()
- 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 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.
25.5.0 - 2025-11-04
- Support for Slurm 25.05.x
- Split up
prolog_epilog_timeoutinprolog_timeoutandepilog_timeoutinpyslurm.slurmctld.Config
-
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.
24.11.0 - 2024-12-30
- Support for Slurm 24.11.x
24.5.1 - 2024-12-27
- Added
statsattribute to bothpyslurm.Job,pyslurm.Jobsandpyslurm.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 librarylibslurmfull.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.sofrom there. - Added
run_time_remainingandelapsed_cpu_timeattributes topyslurm.JobStep - Added
run_time_remainingattribute topyslurm.Job
- 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.
- Breaking: rename
cpu_timetoelapsed_cpu_timeinpyslurm.Jobandpyslurm.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
statsattribute, which is of typepyslurm.db.JobStatistics - Renamed the original class of
pyslurm.db.JobStatisticstopyslurm.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
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.
24.5.0 - 2024-11-16
- Support for Slurm 24.5.x
- add
power_down_on_idleattribute topyslurm.Partitionclass
- bump minimum Cython version to 0.29.37
- Removed
power_optionsfromJobSubmitDescription
23.11.1 - 2024-12-28
- Added
statsattribute to bothpyslurm.Job,pyslurm.Jobsandpyslurm.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 librarylibslurmfull.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.sofrom there. - Added
run_time_remainingandelapsed_cpu_timeattributes topyslurm.JobStep - Added
run_time_remainingattribute topyslurm.Job
- 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.
- Breaking: rename
cpu_timetoelapsed_cpu_timeinpyslurm.Jobandpyslurm.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
statsattribute, which is of typepyslurm.db.JobStatistics - Renamed the original class of
pyslurm.db.JobStatisticstopyslurm.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
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.
23.11.0 - 2024-01-27
- 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.Jobandpyslurm.JobSubmitDescription
- 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 beMIXED. - Fix crash for the
gres_per_nodeattribute of thepyslurm.Jobclass when the GRES String received from Slurm contains no count.
route_plugin,job_credential_private_keyandjob_credential_public_certificatekeys are removed from the output ofpyslurm.config().get()- Some deprecated and unused Slurm constants
23.2.3 - 2025-01-03
- 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.Jobsandpyslurm.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 librarylibslurmfull.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.sofrom there. - Added
run_time_remainingandelapsed_cpu_timeattributes topyslurm.JobStep - Added
run_time_remainingattribute topyslurm.Job
- Fix
allocated_gresattribute in thepyslurm.NodeClass returning nothing. - Fix Node State being displayed as
ALLOCATEDwhen it should actually beMIXED. - 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.
- Breaking: rename
cpu_timetoelapsed_cpu_timeinpyslurm.Jobandpyslurm.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
statsattribute, which is of typepyslurm.db.JobStatistics - Renamed the original class of
pyslurm.db.JobStatisticstopyslurm.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
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.
23.2.2 - 2023-07-18
- Ability to modify Database Jobs
- New classes to interact with the Partition API
- [pyslurm.Partition][]
- [pyslurm.Partitions][]
- New attributes for a Database Job:
extrafailed_node
- Added a new Base Class [MultiClusterMap][pyslurm.xcollections.MultiClusterMap] that some Collections inherit from.
- Added
to_jsonfunction to all Collections
- Fixes a problem that prevented loading specific Jobs from the Database if
the following two conditions were met:
- no start/end time was specified
- the Job was older than a day
- Improved Docs
- Renamed
JobSearchFilterto [pyslurm.db.JobFilter][] - Renamed
as_dictfunction of some classes toto_dict
23.2.1 - 2023-05-18
- Classes to interact with the Job and Submission API
- Classes to interact with the Database Job API
- Classes to interact with the Node API
- Exceptions added:
- Utility Functions
- Completely overhaul the documentation, switch to mkdocs
- Rework the tests: Split them into unit and integration tests
- Following classes are superseded by new ones:
23.2.0 - 2023-04-07
- Support for Slurm 23.02.x (f506d63)
Elasticsearchdebug flag fromget_debug_flagslaunch_type,launch_paramsandslurmctld_plugstackkeys from theconfig.get()output- Some constants (mostly
ESLURM_*constants that do not exist anymore)
22.5.3 - 2023-07-19
- Ability to modify Database Jobs
- New classes to interact with the Partition API
- [pyslurm.Partition][]
- [pyslurm.Partitions][]
- New attributes for a Database Job:
extrafailed_node
- Added a new Base Class [MultiClusterMap][pyslurm.xcollections.MultiClusterMap] that some Collections inherit from.
- Added
to_jsonfunction to all Collections
- Fixes a problem that prevented loading specific Jobs from the Database if
the following two conditions were met:
- no start/end time was specified
- the Job was older than a day
- Improved Docs
- Renamed
JobSearchFilterto [pyslurm.db.JobFilter][] - Renamed
as_dictfunction of some classes toto_dict
22.5.2 - 2023-05-21
- Classes to interact with the Job and Submission API (PR #283 by tazend)
- Classes to interact with the Database Job API (PR #283 by tazend)
- Classes to interact with the Node API (PR #283 by tazend)
- Exceptions added (PR #283 by tazend)
- Utility Functions
- Completely overhaul the documentation (PR #283 by tazend)
- Switch to mkdocs for generating documentation (PR #271 by tazend,multimeric)
- Rework the tests: Split them into unit and integration tests (PR #283 by tazend)
- Following classes are superseded by new ones:
22.5.1 - 2023-02-26
wait_finishedmethod to pyslurm.job class, which blocks until a specified job is finished (PR #242 by JonaOtto)- Support updating
end_timeinslurm_update_reservation(PR #255 by pllopsis)
- Actually retrieve and return the batch script as a string, instead of just printing it (PR #258 by tazend)
- Raise
ValueErroronslurm_update_reservationinstead of just returning the error code (PR #257 by pllopsis)
- Fix some typos in
pyslurm.jobclass (PR #243 by JonaOtto, PR #252 by schluenz) - Fix not being able to create RPMs with
bdist_rpm(PR #248 by tazend) - Fix formatting error for
reservation_listexample (PR #256 by pllopsis) - Fix RPC strings, bringing them in sync with slurm 22.05 when getting Slurm
statistics via the
statisticsclass (PR #261 by wresch)
22.5.0 - 2022-08-06
- Support for Slurm 22.05.x (PR #238 by tazend)
- A
pyproject.tomlfile to ease installation (PR #239 by tazend) - Allow specifying Slurm lib-dir and include-dir via
SLURM_LIB_DIRandSLURM_INCLUDE_DIRenvironment variables on install (PR #239 by tazend)
statskey from the job-allocation dictionary itself when doingslurmdb_jobs.get()(PR #238 by tazend). Support for it was removed upstream here. Note that stats for job-steps are still accessible
21.8.1 - 2023-07-19
- A
pyproject.tomlfile to ease installation (PR #239 by tazend) - Allow specifying Slurm lib-dir and include-dir via
SLURM_LIB_DIRandSLURM_INCLUDE_DIRenvironment variables on install (PR #239 by tazend) wait_finishedmethod to pyslurm.job class, which blocks until a specified job is finished (PR #242 by JonaOtto)- Support updating
end_timeinslurm_update_reservation(PR #255 by pllopsis) - Classes to interact with the Job and Submission API (PR #283 by tazend)
- [pyslurm.Job][]
- [pyslurm.Jobs][]
- [pyslurm.JobStep][]
- [pyslurm.JobSteps][]
- [pyslurm.JobSubmitDescription][]
- Classes to interact with the Database Job API (PR #283 by tazend)
- [pyslurm.db.Job][]
- [pyslurm.db.Jobs][]
- [pyslurm.db.JobStep][]
- [pyslurm.db.JobFilter][]
- Classes to interact with the Node API (PR #283 by tazend)
- [pyslurm.Node][]
- [pyslurm.Nodes][]
- Exceptions added (PR #283 by tazend)
- [pyslurm.PyslurmError][]
- [pyslurm.RPCError][]
- [Utility Functions][pyslurm.utils]
- New classes to interact with the Partition API
- [pyslurm.Partition][]
- [pyslurm.Partitions][]
- Added a new Base Class [MultiClusterMap][pyslurm.xcollections.MultiClusterMap] that some Collections inherit from.
- Added
to_jsonfunction to all Collections
- Fix some typos in
pyslurm.jobclass (PR #243 by JonaOtto, PR #252 by schluenz) - Fix not being able to create RPMs with
bdist_rpm(PR #248 by tazend) - Fix formatting error for
reservation_listexample (PR #256 by pllopsis) - Fix RPC strings, bringing them in sync with slurm 21.08 when getting Slurm
statistics via the
statisticsclass (PR #261 by wresch)
- Now actually link to
libslurm.soinstead oflibslurmfull.so(PR #239 by tazend) - Actually retrieve and return the batch script as a string, instead of just printing it (PR #258 by tazend)
- Raise
ValueErroronslurm_update_reservationinstead of just returning the error code (PR #257 by pllopsis) - Completely overhaul the documentation (PR #283 by tazend)
- Switch to mkdocs for generating documentation (PR #271 by tazend, multimeric)
- Rework the tests: Split them into unit and integration tests (PR #283 by tazend)
- Following classes are superseded by new ones:
- [pyslurm.job][]
- [pyslurm.node][]
- [pyslurm.jobstep][]
- [pyslurm.slurmdb_jobs][]
21.8.0 - 2022-03-01
- Support for Slurm 21.8.x (PR #227 by rezib, njcarriero)