Skip to content

Commit 3b23430

Browse files
author
Matthew Schlegel
committed
Adding slurm examples
1 parent cd19949 commit 3b23430

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
[config]
4+
5+
save_backend="mysql" # mysql only database backend supported
6+
database="mkschleg_test_iter" # for params and resutsl
7+
save_dir="test_iter_sql" # for exceptions, settings, and more!
8+
9+
exp_file="examples/experiment.jl"
10+
exp_module_name = "Main"
11+
exp_func_name = "main_experiment"
12+
arg_iter_type = "iter"
13+
14+
[static_args]
15+
steps=102902
16+
17+
[sweep_args]
18+
opt2 = [5,6,7,8,9]
19+
opt1 = "1:50"
20+
"opt3+opt4" = [["a", 1], ["b", 2], ["c", 3]]

examples/slurm_sql_parallel.jl

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/julia/1.6.2/bin/julia
2+
3+
#SBATCH --mail-type=ALL
4+
#SBATCH -o test_sql.out # Standard output
5+
#SBATCH -e test_sql.err # Standard error
6+
#SBATCH --ntasks=8
7+
#SBATCH --mem-per-cpu=2000M # Memory request of 2 GB
8+
#SBATCH --time=0:10:00 # Running time of 24 hours
9+
#SBATCH --account=def-whitem
10+
11+
using Pkg
12+
Pkg.activate(".")
13+
14+
using Reproduce
15+
16+
const CONFIGFILE = "examples/configs/arg_iter_config_sql_slurm.toml"
17+
const DETAILSPATH = "/home/mkschleg/scratch/reproduce"
18+
19+
function main()
20+
21+
22+
experiment = Reproduce.parse_experiment_from_config(CONFIGFILE, DETAILSPATH)
23+
24+
pre_experiment(experiment)
25+
ret = job(experiment)
26+
post_experiment(experiment, ret)
27+
28+
end
29+
30+
main()

0 commit comments

Comments
 (0)