Skip to main content

HPC Workflows & Edge Service

Project description


hide:

  • toc

logo{ style="width: 55%; display: block; margin: 0 auto" }

This page is for the Balsam pre-release. Click here for legacy Balsam 0.5 docs.

A unified platform to manage high-throughput workflows across the HPC landscape.

Run Balsam on any laptop, cluster, or supercomputer.

$ pip install --pre balsam
$ balsam login
$ balsam site init my-site

site-init{ style="width: 80%; display: block; margin: 0 auto" }

Python class-based declaration of Apps and execution lifecycles.

from balsam.api import ApplicationDefinition

class Hello(ApplicationDefinition):
    site = "my-laptop"
    command_template = "echo hello {{ name }}"

    def handle_timeout(self):
        self.job.state = "RESTART_READY"

Seamless remote job management.

# On any machine with internet access...
from balsam.api import Job, BatchJob

# Create Jobs:
job = Job.objects.create(
    site_name="my-laptop",
    app_id="Hello",
    workdir="test/say-hello",
    parameters={"name": "world!"},
)

# Or allocate resources:
BatchJob.objects.create(
    site_id=job.site_id,
    num_nodes=1,
    wall_time_min=10,
    job_mode="serial",
    project="local",
    queue="local",
)

Dispatch Python Apps across heterogeneous resources from a single session.

import numpy as np

class MyApp(ApplicationDefinition):
    site = "theta-gpu"

    def run(self, vec):
        from mpi4py import MPI
        rank = MPI.COMM_WORLD.Get_rank()
        print("Hello from rank", rank)
        return np.linalg.norm(vec)

jobs = [
    MyApp.submit(
        workdir=f"test/{i}", 
        vec=np.random.rand(3), 
        ranks_per_node=4,
        gpus_per_rank=0,
    )
    for i in range(10)
]

for job in Job.objects.as_completed(jobs):
   print(job.workdir, job.result())

Features

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

balsam-0.7.0a14.tar.gz (176.3 kB view hashes)

Uploaded Source

Built Distribution

balsam-0.7.0a14-py3-none-any.whl (219.1 kB view hashes)

Uploaded Python 3

Supported by

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