Skip to content

Releases: PySlurm/pyslurm

v23.2.1

18 May 20:13
538bf42
Compare
Choose a tag to compare

Check here for the full Changelog

v23.2.0

07 Apr 11:32
f506d63
Compare
Choose a tag to compare

Changes

  • Support for Slurm 23.02.X
  • Remove Elasticsearch from get_debug_flags, as it does not exist anymore.
  • Remove launch_type, launch_params and slurmctld_plugstack from the config.get() output, as they do not exist anymore
  • Remove some constants (mostly ESLURM_* constants that do not exist anymore)

v22.5.1

26 Feb 20:02
dd73ddf
Compare
Choose a tag to compare

Changes

  • Add wait_finished method to jobs class, which blocks until a specified job is finished (#242 by @JonaOtto)
  • fix some typos (#243 by @schluenz)
  • fix not being able to create RPMs with bdist_rpm (#248)
  • fix formatting erros, add end_time to slurm_update_reservation and raise a proper ValueError when updating the reservation fails (#257, #256, #255 by @pllopis)
  • actually retrieve and return the batch script as a string, instead of just printing it (#258)
  • bring possible RPC strings in sync with slurm 22.05 when getting Slurm statistics via the statistics class (#261 by @wresch)

v22.5.0

06 Aug 15:51
467667e
Compare
Choose a tag to compare

Changes

  • Support for Slurm 22.05.X (#238)
  • Now actually link to libslurm.so instead of libslurmfull.so (#238)
  • Add a pyproject.toml to ease installation (#239)
  • Allow specifying Slurm lib-dir and include-dir via environment variables on install (#239):
    • SLURM_INCLUDE_DIR
    • SLURM_LIB_DIR
  • Removes the stats key from the job-allocation dictionary itself when doing slurmdb_jobs.get(). Support for it was removed upstream here. (stats for job-steps are still accessible though)

Check out this and this commit description for all changes.

v21.8.0

01 Mar 13:38
8febf21
Compare
Choose a tag to compare
Support for Slurm 21.08 (#227)

* Expect slurm version 21.08

* Search slurm version in slurm_version.h

Starting from Slurm >= 21.08, slurm version is declared in this
dedicated header file.

* Port templates to Slurm 21.08

These templates have been generated using autopxd2, installed with:

  $ pip install autopxd2

Then, *.pxd files have been generated using these commands:

  $ cd /usr/include
  $ autopxd --include-dir . slurm/slurm_errno.h > \
    ~/pyslurm/jinja2/slurm_errno.h.pxd
  $ autopxd --include-dir . slurm/slurm.h > \
    ~/pyslurm/jinja2/slurm.h.pxd
  $ autopxd --include-dir . slurm/slurmdb.h > \
    ~/pyslurm/jinja2/slurmdb.h.pxd

Then, jinja2/slurm.h.pxd and jinja2/slurmdb.h.pxd have been manually
modified to:

- Remove libc.stdint import
- Remove duplicated slurm_errno symbols
- Include defines from dedicated subdir

Additionally:

- in jinja2/slurm.h.pxd:
  - symbols SLURM_ERROR, SLURM_SUCCESS and SLURM_VERSION have been
    restored,
  - slurm_addr_t control_addr and pthread_mutex_t lock are commented
    out, just like before, to avoid compilation error with these types
    (they are not used by pyslurm).
- in jinja2/slurmdb.h.pxd, all symbols duplicated in
  jinja2/slurm.h.pxd have been removed.

This finally produces this commit.

* Transpose e79981c in template

* Update slurmdb CLUSTER_FLAGS defs for 21.08

* Update slurm CPU_FREQ defs for 21.08

* Update NODE_STATE defs for slurm 21.08

* Update DEBUG_FLAG defs for slurm 21.08

* Update READY_* defs for slurm 21.08

* Generate pyslurm/slurm.pxd based on template

To generate this files, I used j2cli:

  $ pip install j2cli
  $ j2 jinja2/slurm.j2 > pyslurm/slurm.pxd

* Update python structures for slurm 21.08

There are some new parameters, some have vanished, some have been
renamed.

* Update *.pxi following latest defs changes

* Add new sibling arg to slurm_kill_job2()

Slurm 21.08 slurm_kill_job2() now expects a fourth char* sibling
argument.

* Bump __version__

* Typo fix in slurmdb job dict key

* Update slurm version in README

* Update NODE_STATE in examples

* Use docker image tag 21.08.0 for tests

* Update test_slurm_api_version expected value

* Use NULL slurmdb_connection_get persist_conn_flags

Use hard-coded NULL slurm.slurmdb_connection_get() persist_conn_flags
consistently. Persistent connections are not used in PySlurm. The
variable was declared to NULL and not used elsewhere, the pointer was
not preallocated in class slurmdb_jobs.

I propose NULL to be used consistently in both cases.

Co-authored-by: Nicholas Carriero <njcarriero@gmail.com>

* Initialize and dealloc slurmdb_clusters db_conn

Class slurmdb_clusters db_conn attribute is declared and used in get()
but it was not initialized with a proper connection. Also close and
free the allocation in __dealloc__().

Co-authored-by: Nicholas Carriero <njcarriero@gmail.com>

* Add missing slurm_init() and slurm_fini()

Starting from Slurm 20.11, slurm_init() must be called prior to any
other Slurm library API calls. For the moment, its load Slurm
configuration structure. For reference:

https://github.com/SchedMD/slurm/commit/e35a6e3

On the other side, slurm_fini() cleanup the configuration data
structures in memory.

Co-authored-by: Nicholas Carriero <njcarriero@gmail.com>

* Call slurm_init() at pyslurm module load

This way, PySlurm consumers do not have to do it explicitely.

* Bump to docker-centos7-slurm:21.08.6

* fix: update tests to use pyenv

Co-authored-by: Nicholas Carriero <njcarriero@gmail.com>
Co-authored-by: Giovanni Torres <giovanni.torres@gmail.com>

v20.11.8-1

11 Nov 20:31
19086d3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 20-02-5...v20.11.8-1

20-02-5

31 Oct 20:47
88b5129
Compare
Choose a tag to compare
refactor: update setup.py (#191)

* refactor: update setup.py

- Refactor setup.py variable names and formatting
- Add Pipfile for black formatting
- Update Travis CI config
- Add .idea to .gitignore

* fix: use correct version

20-02-0

07 May 12:15
42a1f20
Compare
Choose a tag to compare
Update for 20.02 Support (#182)

* Changed Slurm version to 20.02

* Update pyslurm.pyx for 20.02

* Prepared test environment for Slurm 20.02

* Move mapping of slurm defines to python into seperate folder

  - Makes all (slurm.h, slurmdbd.h, errno.h) "#defines" from slurm headers
    available in Python

* Update slurm.pxd to 20.02

* Update setup.py

- Minimum Cython Version to 0.19
- Remove "staticmethod" mention from scandir function
  - apparently, with recursive functions in a class, "self"
    should be used otherwise the method would constantly break
    when there is a directory inside "pyslurm/"

* Update xmalloc.h, use the correct one for 20.02

* Add new directory jinja2

  - The files in defines/ contains all "#define" variables
    from the slurm headers
  - The *.h.pxd files are automatically created by autopxd2
  - With a simple jinja template, one can easily make changes
    and update the pyslurm/slurm.pxd file
  - It's not really necessary to "automate" this, because the
    SLURM headers only change every major release, so this mustn't
    be done often. And the pyslurm/slurm.pxd file shipped here is already
    complete for 20.02

* Fix -Wsign-compare error

  - Utilize size_t instead of int when dealing with unsigned ints

* Update README

  - bump SLURM Version to 20.05

Co-authored-by: Danny Rotscher <rotscher@yoga.zih.tu-dresden.de>
Co-authored-by: bikerdanny <62376119+bikerdanny@users.noreply.github.com>