github PySlurm/pyslurm v23.2.3

2 days ago

https://pyslurm.github.io/23.2/changelog/

Added

  • Add truncate_time option to pyslurm.db.JobFilter, which is the same as -T /
    --truncate from sacct.
  • Add new Attributes to pyslurm.db.Jobs that help gathering statistics for a
    collection of Jobs more convenient.
  • Add new idle_memory and allocated_tres attributes to pyslurm.Node class
  • Added stats attribute to both pyslurm.Job, pyslurm.Jobs and
    pyslurm.db.Jobs
  • Added pids attribute to pyslurm.Job which contains Process-IDs of the Job
    organized by node-name
  • Added load_stats method to pyslurm.Job and pyslurm.Jobs classes.
    Together with the stats and pids attributes mentioned above, it is now
    possible to fetch live statistics (like sstat)
  • Switch to link with libslurmfull.so instead of libslurm.so

    This change really has no impact from a user perspective. Everything will
    keep working the same, except that Slurms more internal library
    libslurmfull.so is linked with (which is located alongside the plugins
    inside the slurm directory, which itself is next to libslurm.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 basically sstat, is for example not possible
    with libslurm.so

    You can keep providing the directory where libslurm.so resided as
    $SLURM_LIB_DIR to pyslurm, and it will automatically find libslurmfull.so
    from there.
  • Added run_time_remaining and elapsed_cpu_time attributes to pyslurm.JobStep
  • Added run_time_remaining attribute to pyslurm.Job

Fixed

  • Fix allocated_gres attribute in the pyslurm.Node Class returning nothing.
  • Fix Node State being displayed as ALLOCATED when it should actually be
    MIXED.
  • Fix crash for the gres_per_node attribute of the pyslurm.Job class when
    the GRES String received from Slurm contains no count.
  • Fixed total_cpu_time, system_cpu_time and user_cpu_time not getting
    calculated correctly for Job statistics
  • Actually make sure that avg_cpu_time, min_cpu_time, total_cpu_time,
    system_cpu_time and user_cpu_time are integers, not float.

Changed

  • Breaking: rename cpu_time to elapsed_cpu_time in pyslurm.Job and
    pyslurm.Jobs classes
  • Breaking: rename attribute alloc_cpus to just cpus in pyslurm.JobStep
  • Breaking: removed the following attributes from pyslurm.db.Jobs:
    • consumed_energy
    • disk_read
    • disk_write
    • page_faults
    • resident_memory
    • virtual_memory
    • elapsed_cpu_time
    • total_cpu_time
    • user_cpu_time
    • system_cpu_time
  • The removed attributes above are now all available within the stats
    attribute, which is of type pyslurm.db.JobStatistics
  • Renamed the original class of pyslurm.db.JobStatistics to
    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 new pyslurm.db.JobStatistics class only contains all
    statistics that make sense at the Job-level.
  • return 1 as a value for the cpus attribute in pyslurm.db.Job when there
    is no value set from Slurm's side.

Removed

  • Removed pyslurm.version() function. Should use __version__ attribute directly.
  • Removed --slurm-lib and --slurm-inc parameters to setup.py.

    SLURM_LIB_DIR and SLURM_INCLUDE_DIR environment variables should be used instead.

Don't miss a new pyslurm release

NewReleases is sending notifications on new releases.