Skip to content

Commit a3ba87a

Browse files
authored
Test parsl+slurm in CI (#3606)
Fixes #3579
1 parent 3a256de commit a3ba87a

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

.github/workflows/parsl+slurm.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test Slurm Scheduler
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-22.04
8+
permissions:
9+
packages: read
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
container: ["ghcr.io/tylern4/slurm-standalone:slurm-24-05-0-1"]
14+
timeout-minutes: 30
15+
16+
container:
17+
image: ${{ matrix.container }}
18+
options: "--platform=linux/amd64 --rm -h node01"
19+
20+
name: ${{ matrix.container }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Install Dependencies and Parsl
26+
run: |
27+
CC=/usr/lib64/openmpi/bin/mpicc pip3 install . -r test-requirements.txt
28+
29+
- name: Verify Parsl Installation
30+
run: |
31+
pytest parsl/tests/ -k "not cleannet and not unix_filesystem_permissions_required" --config parsl/tests/configs/local_threads.py --random-order --durations 10
32+
33+
- name: Test Parsl with Slurm Config
34+
run: |
35+
./parsl/tests/slurm-entrypoint.sh pytest parsl/tests/ -k "not cleannet and not unix_filesystem_permissions_required" --config parsl/tests/configs/slurm_local.py --random-order --durations 10

parsl/tests/configs/slurm_local.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from parsl.channels import LocalChannel
2+
from parsl.config import Config
3+
from parsl.executors import HighThroughputExecutor
4+
from parsl.launchers import SrunLauncher
5+
from parsl.providers import SlurmProvider
6+
7+
8+
def fresh_config():
9+
return Config(
10+
executors=[
11+
HighThroughputExecutor(
12+
label="docker_slurm",
13+
encrypted=True,
14+
provider=SlurmProvider(
15+
cmd_timeout=60, # Add extra time for slow scheduler responses
16+
channel=LocalChannel(),
17+
nodes_per_block=1,
18+
init_blocks=1,
19+
min_blocks=1,
20+
max_blocks=1,
21+
walltime='00:10:00',
22+
launcher=SrunLauncher(),
23+
),
24+
)
25+
],
26+
)

parsl/tests/slurm-entrypoint.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "---> Starting the MUNGE Authentication service (munged) ..."
5+
gosu munge /usr/sbin/munged
6+
7+
echo "---> Starting the slurmctld ..."
8+
exec gosu slurm /usr/sbin/slurmctld -i -Dvvv &
9+
10+
echo "---> Waiting for slurmctld to become active before starting slurmd..."
11+
12+
echo "---> Starting the Slurm Node Daemon (slurmd) ..."
13+
exec /usr/sbin/slurmd -Dvvv &
14+
15+
echo "---> Running user command '${@}'"
16+
exec "$@"

0 commit comments

Comments
 (0)