Skip to main content

A package to manage Dask clusters on SLURM systems and execute functions with Dask parallelization.

Project description

SlurmiPy

Run python functions on a SLURM cluster as easy as:

@slurm_cluster.execute
def hello_world():
    print("YAY, I am running via SLURM!")

SlurmiPy provides a factory class for managing Dask clusters on SLURM-based systems and provides very easy exectution of python code on a SLURM cluster.

Installation

pip install slurmipy

Usage

Here iss a basic example of how to use SlurmiPy on NERSCs' Perlmutter Supercomputer:

from slurmipy import SlurmiPy, configs

# Create a SLURM cluster with 4 jobs
slurm_cluster = SlurmiPy(jobs=4, **configs["perlmutter_shared_interactive"])

@slurm_cluster.execute
def process_data(data):
    return [x**2 for x in data]

# Execute the function using the SLURM cluster
result = process_data([1, 2, 3, 4])

print(result)  # Output: [1, 4, 9, 16]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slurmipy-2024.0.4.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

slurmipy-2024.0.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file slurmipy-2024.0.4.tar.gz.

File metadata

  • Download URL: slurmipy-2024.0.4.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for slurmipy-2024.0.4.tar.gz
Algorithm Hash digest
SHA256 2b3b607e652ad58341e11d4e8311d496347df781d80d599536d2b33307802999
MD5 6e2def54d664cb7a070bff2d48339aa3
BLAKE2b-256 26d461cc3a9669e7107c9025a18c4a44d20e409f9e3510576d0e3c6ddc41ad1e

See more details on using hashes here.

File details

Details for the file slurmipy-2024.0.4-py3-none-any.whl.

File metadata

  • Download URL: slurmipy-2024.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for slurmipy-2024.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fae82e3bd7ea51cebb69cdf48e1b9a686e19fe017ce366251bc0cb6d2b6e2313
MD5 0c87b092bef42595ba97b4f1a8de3fb5
BLAKE2b-256 4f2a9307bec5ca09740ae55066651aa0b08c500f5bd7b62d08c6fe90bfb5431d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page