https://github.com/clima/slurm-buildkite

Run buildkite jobs on a slurm cluster

https://github.com/clima/slurm-buildkite

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.1%) to scientific vocabulary

Keywords

buildkite slurm

Keywords from Contributors

climate data-assimilation fluid-dynamics heterogeneous-parallel-programming julia-package julialang sciml dae differential-algebraic-equations differential-equations
Last synced: 10 months ago · JSON representation

Repository

Run buildkite jobs on a slurm cluster

Basic Info
  • Host: GitHub
  • Owner: CliMA
  • License: other
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 161 KB
Statistics
  • Stars: 11
  • Watchers: 6
  • Forks: 1
  • Open Issues: 9
  • Releases: 0
Topics
buildkite slurm
Created almost 6 years ago · Last pushed 12 months ago
Metadata Files
Readme License

README.md

Buildkite on HPC

Run Buildkite pipelines on an HPC cluster. To get started, see our set-up guide.

Design

The basic idea is that each Buildkite job is run inside a scheduled HPC job: the job runs the Buildkite agent with the --acquire-job option, which ensures that only the specific Buildkite job is scheduled, and is terminated and exits once complete.

Some clusters are not web-accessible, so we are unable to use webhooks to schedule their jobs. Instead poll the Buildkite API (via bin/poll.py) via a cron job running on the cluser login node (bin/cron.sh at a regular interval (currently every minute). This does the following:

  1. Get a list of the Buildkite jobs which are currently queued or running on the cluster.

  2. Query the Buildkite API to get a list of all builds for the organization that are currently scheduled. For each build, and for each job in the build, if the job is not already scheduled on the cluster, then schedule a new job to run bin/schedule_job.sh.

  3. Query the Buildkite API for a list of all builds that are cancelled. For each build and each job in the build, cancel any Slurm jobs with the matching job id.

Unlike regular Buildkite builds, we don't run each job in an isolated environment, so the checkout only happens on the first job (usually the pipeline upload) and the state is shared between all jobs in the build.

Passing options to Slurm

Any options in the agent metadata block which are prefixed with slurm_ are passed to sbatch: underscores _ are converted to hyphens. For arguments without values, they must be set to true.

As an example, agents: queue: new-central slurm_nodes: 1 slurm_tasks_per_node: 2 slurm_exclusive: true would pass the options --nodes=1 --tasks-per-node=2.

Passing options to PBS

Any options prefixed with pbs_ are passed to qsub. Any options prefixed with pbs_l_ are passed through to qsub's -l argument. Underscores are converted to hyphens.

For arguments without values, they must be set to true.

As an example, agents: pbs_q: preempt pbs_l_select: "2:ngpus=4:ncpus=8" pbs_l_walltime: "02:00:00" would pass the options -q preempt -l select=2:ngpus=4:ncpus=8 -l walltime=02:00:00

Testing CUDA and MPI modules

The file .buildkite/testcudampi.jl runs basic tests for MPI with CUDA. This test requires two CUDA devices, Julia and CUDA-aware MPI to run.

The following command will run the test file with two MPI ranks, profiling it with Nsight Systems. mpirun -n 2 nsys profile --trace=cuda,mpi julia --project=.buildkite .buildkite/test_cuda_mpi.jl The following tests are run: 1. CUDA smoke test running a basic computation on CUDA device 2. MPI test transferring arrays between CPU cores 3. MPI test transferring arrays between CUDA devices

The following command analyzes the profiling data and returns the type of transfer used to send CUDA arrays between devices. nsys stats --report cuda_gpu_trace report1.nsys-rep If your CUDA-aware MPI is configured correctly, you should see a peer-to-peer (PtoP) transfer: [CUDA memcpy PtoP], indicating that the CUDA devices are able to transfer data directly between one another:

If you only see [CUDA memcpy Device-to-Host], it is likely that your CUDA devices are not able to transfer data directly, resulting in a major performance decrease for distributed computations.

This test is run against pull requests using a Buildkite pipeline.

Owner

  • Name: Climate Modeling Alliance
  • Login: CliMA
  • Kind: organization
  • Email: clima@caltech.edu

An alliance of scientists, engineers and applied mathematicians, dedicated to pioneering a new, data-informed approach to climate modeling

GitHub Events

Total
  • Create event: 10
  • Issues event: 22
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 11
  • Push event: 92
  • Gollum event: 3
  • Pull request event: 26
  • Pull request review event: 34
  • Pull request review comment event: 26
  • Fork event: 1
Last Year
  • Create event: 10
  • Issues event: 22
  • Watch event: 2
  • Delete event: 1
  • Issue comment event: 11
  • Push event: 92
  • Gollum event: 3
  • Pull request event: 26
  • Pull request review event: 34
  • Pull request review comment event: 26
  • Fork event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 73
  • Total Committers: 3
  • Avg Commits per committer: 24.333
  • Development Distribution Score (DDS): 0.301
Past Year
  • Commits: 26
  • Committers: 1
  • Avg Commits per committer: 26.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Simon Byrne s****e@g****m 51
jakebolewski j****i@g****m 18
Charles Kawczynski k****s@g****m 4

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 23
  • Total pull requests: 33
  • Average time to close issues: 3 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 4
  • Total pull request authors: 5
  • Average comments per issue: 1.87
  • Average comments per pull request: 0.24
  • Merged pull requests: 28
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 7
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.14
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • simonbyrne (14)
  • Sbozzolo (8)
  • jakebolewski (7)
  • nefrathenrici (6)
Pull Request Authors
  • jakebolewski (13)
  • nefrathenrici (10)
  • simonbyrne (10)
  • Sbozzolo (7)
  • charleskawczynski (5)
  • imreddyTeja (1)
Top Labels
Issue Labels
bug (2)
Pull Request Labels