test: added slurm process creation

This commit is contained in:
nebmit 2023-12-05 09:41:20 +01:00
parent 3f7163e0af
commit 63dd329047
No known key found for this signature in database

View File

@ -1,4 +1,5 @@
using BenchmarkTools using BenchmarkTools
using ClusterManagers
using CSV using CSV
using DataFrames using DataFrames
using Distributed using Distributed
@ -10,7 +11,13 @@ using .TUG
# 1. Environment Setup # 1. Environment Setup
function setup_environment(num_procs::Int) function setup_environment(num_procs::Int)
if num_procs > 0 if num_procs > 0
added_procs = addprocs(num_procs) if haskey(ENV, "SLURM_JOB_ID")
# Add SLURM processes
added_procs = addprocs(SlurmManager(num_procs), exclusive="")
else
# Add local processes
added_procs = addprocs(num_procs)
end
# Use remotecall to include TUG on each new worker # Use remotecall to include TUG on each new worker
for proc in added_procs for proc in added_procs