Skip to content

Commit 7245492

Browse files
committed
Excision: Remove all non-Condor code
1 parent e683c53 commit 7245492

18 files changed

+14
-960
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -66,68 +66,6 @@ jobs:
6666
# If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors.
6767
# If this is not a PR, then DO fail CI if the Codecov upload errors.
6868
fail_ci_if_error: ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
69-
test-slurm:
70-
if: false
71-
runs-on: ubuntu-latest
72-
timeout-minutes: 20
73-
strategy:
74-
fail-fast: false
75-
matrix:
76-
version:
77-
# Please note: You must specify the full Julia version number (major.minor.patch).
78-
# This is because the value here will be directly interpolated into a download URL.
79-
# - '1.2.0' # minimum Julia version supported in Project.toml
80-
- '1.6.7' # previous LTS
81-
- '1.10.7' # current LTS
82-
- '1.11.2' # currently the latest stable release
83-
steps:
84-
- uses: actions/checkout@v4
85-
with:
86-
persist-credentials: false
87-
- name: Print Docker version
88-
run: |
89-
docker --version
90-
docker version
91-
# This next bit of code is taken from:
92-
# https://github.com/kleinhenz/SlurmClusterManager.jl
93-
# Original author: Joseph Kleinhenz
94-
# License: MIT
95-
- name: Setup Slurm inside Docker
96-
run: |
97-
docker version
98-
docker compose version
99-
docker build --build-arg "JULIA_VERSION=${MATRIX_JULIA_VERSION:?}" -t slurm-cluster-julia -f ci/Dockerfile .
100-
docker compose -f ci/docker-compose.yml up -d
101-
docker ps
102-
env:
103-
MATRIX_JULIA_VERSION: ${{matrix.version}}
104-
- name: Print some information for debugging purposes
105-
run: |
106-
docker exec -t slurmctld pwd
107-
docker exec -t slurmctld ls -la
108-
docker exec -t slurmctld ls -la HTCondorClusterManager
109-
- name: Instantiate package
110-
run: docker exec -t slurmctld julia --project=HTCondorClusterManager -e 'import Pkg; @show Base.active_project(); Pkg.instantiate(); Pkg.status()'
111-
- name: Run tests without a Slurm allocation
112-
run: docker exec -t slurmctld julia --project=HTCondorClusterManager -e 'import Pkg; Pkg.test(; test_args=["slurm"])'
113-
- name: Run tests inside salloc
114-
run: docker exec -t slurmctld salloc -t 00:10:00 -n 2 julia --project=HTCondorClusterManager -e 'import Pkg; Pkg.test(; test_args=["slurm"], coverage=true)'
115-
- name: Run tests inside sbatch
116-
run: docker exec -t slurmctld HTCondorClusterManager/ci/run_my_sbatch.sh
117-
- run: find . -type f -name '*.cov'
118-
- name: Copy .cov files out of the Docker container
119-
run: docker exec slurmctld /bin/bash -c 'cd /home/docker/HTCondorClusterManager && tar -cf - src/*.cov' | tar -xvf -
120-
- run: find . -type f -name '*.cov'
121-
# - run: find . -type f -name '*.cov' -exec cat {} \;
122-
- uses: julia-actions/julia-processcoverage@v1
123-
- uses: codecov/codecov-action@v5
124-
with:
125-
files: lcov.info
126-
token: ${{ secrets.CODECOV_TOKEN }}
127-
# If this PR is from a fork, then do NOT fail CI if the Codecov upload errors.
128-
# If this PR is NOT from a fork, then DO fail CI if the Codecov upload errors.
129-
# If this is not a PR, then DO fail CI if the Codecov upload errors.
130-
fail_ci_if_error: ${{ github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name }}
13169
example-pull-gcr:
13270
runs-on: ubuntu-latest
13371
timeout-minutes: 20

ci/Dockerfile

Lines changed: 0 additions & 21 deletions
This file was deleted.

ci/docker-compose.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

ci/my_sbatch.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

ci/run_my_sbatch.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/sge.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

slurm_test.jl

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/HTCondorClusterManager.jl

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
module HTCondorClusterManager
22

3-
using Distributed
4-
using Sockets
5-
using Pkg
3+
import Distributed
4+
import Sockets
5+
import Pkg
6+
7+
using Distributed: launch, manage, kill, init_worker, connect
68

79
export launch, manage, kill, init_worker, connect
8-
import Distributed: launch, manage, kill, init_worker, connect
10+
911

1012
worker_cookie() = begin Distributed.init_multi(); cluster_cookie() end
1113
worker_arg() = `--worker=$(worker_cookie())`
1214

13-
14-
# PBS doesn't have the same semantics as SGE wrt to file accumulate,
15-
# a different solution will have to be found
16-
include("qsub.jl")
17-
include("scyld.jl")
1815
include("condor.jl")
19-
include("slurm.jl")
20-
include("affinity.jl")
21-
include("elastic.jl")
2216

2317
end

src/affinity.jl

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/condor.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
export HTCManager, addprocs_htc
44

5-
struct HTCManager <: ClusterManager
5+
struct HTCManager <: Distributed.ClusterManager
66
np::Integer
77
end
88

@@ -51,7 +51,7 @@ function condor_script(portnum::Integer, np::Integer, params::Dict)
5151
"$tdir/$jobname.sub"
5252
end
5353

54-
function launch(manager::HTCManager, params::Dict, instances_arr::Array, c::Condition)
54+
function Distributed.launch(manager::HTCManager, params::Dict, instances_arr::Array, c::Condition)
5555
let
5656
mgr_desc = "HTCondor"
5757
msg = "The $(mgr_desc) functionality in ClusterManagers.jl is currently not actively maintained. " *
@@ -63,7 +63,7 @@ function launch(manager::HTCManager, params::Dict, instances_arr::Array, c::Cond
6363
end
6464
try
6565
portnum = rand(8000:9000)
66-
portnum, server = listenany(ip"0.0.0.0", portnum)
66+
portnum, server = listenany(Distributed.ip"0.0.0.0", portnum)
6767
np = manager.np
6868

6969
script = condor_script(portnum, np, params)
@@ -76,7 +76,7 @@ function launch(manager::HTCManager, params::Dict, instances_arr::Array, c::Cond
7676

7777
for i=1:np
7878
conn = accept(server)
79-
config = WorkerConfig()
79+
config = Distributed.WorkerConfig()
8080

8181
config.io = conn
8282

@@ -92,12 +92,12 @@ function launch(manager::HTCManager, params::Dict, instances_arr::Array, c::Cond
9292
end
9393
end
9494

95-
function kill(manager::HTCManager, id::Int64, config::WorkerConfig)
95+
function Distributed.kill(manager::HTCManager, id::Int64, config::Distributed.WorkerConfig)
9696
remotecall(exit,id)
9797
close(config.io)
9898
end
9999

100-
function manage(manager::HTCManager, id::Integer, config::WorkerConfig, op::Symbol)
100+
function Distributed.manage(manager::HTCManager, id::Integer, config::Distributed.WorkerConfig, op::Symbol)
101101
if op == :finalize
102102
if !isnothing(config.io)
103103
close(config.io)

0 commit comments

Comments
 (0)