@@ -22,6 +22,7 @@ function generate_pbs_script(
22
22
model_interface:: AbstractString ,
23
23
module_load_str:: AbstractString ;
24
24
hpc_kwargs = Dict (),
25
+ exeflags = " " ,
25
26
)
26
27
member_log = path_to_model_log (output_dir, iter, member)
27
28
@@ -46,23 +47,23 @@ function generate_pbs_script(
46
47
member_path = path_to_ensemble_member (output_dir, iter, member)
47
48
julia_filepath = joinpath (member_path, " model_run.jl" )
48
49
49
- pbs_script = """
50
- #!/bin/bash
51
- #PBS -N run_$(iter) _$member
52
- #PBS -j oe
53
- #PBS -A UCIT0011
54
- #PBS -q $queue
55
- #PBS -o $member_log
56
- #PBS -l walltime=$walltime
57
- #PBS -l select=$num_nodes :ncpus=$cpus_per_node :ngpus=$gpus_per_node :mpiprocs=$ranks_per_node
58
-
59
- $module_load_str
60
-
61
- export JULIA_MPI_HAS_CUDA=true
62
- export CLIMACOMMS_DEVICE="$climacomms_device "
63
- export CLIMACOMMS_CONTEXT="MPI"
64
- \$ MPITRAMPOLINE_MPIEXEC -n $total_ranks -ppn $ranks_per_node $set_gpu_rank julia --project=$experiment_dir $julia_filepath
65
- """
50
+ pbs_script = """ \
51
+ #!/bin/bash
52
+ #PBS -N run_$(iter) _$member
53
+ #PBS -j oe
54
+ #PBS -A UCIT0011
55
+ #PBS -q $queue
56
+ #PBS -o $member_log
57
+ #PBS -l walltime=$walltime
58
+ #PBS -l select=$num_nodes :ncpus=$cpus_per_node :ngpus=$gpus_per_node :mpiprocs=$ranks_per_node
59
+
60
+ $module_load_str
61
+
62
+ export JULIA_MPI_HAS_CUDA=true
63
+ export CLIMACOMMS_DEVICE="$climacomms_device "
64
+ export CLIMACOMMS_CONTEXT="MPI"
65
+ \$ MPITRAMPOLINE_MPIEXEC -n $total_ranks -ppn $ranks_per_node $set_gpu_rank julia $exeflags --project=$experiment_dir $julia_filepath
66
+ """
66
67
67
68
julia_script = """ \
68
69
import ClimaCalibrate as CAL
@@ -88,6 +89,7 @@ function pbs_model_run(
88
89
module_load_str;
89
90
hpc_kwargs,
90
91
debug = false ,
92
+ exeflags = " " ,
91
93
)
92
94
# Type and existence checks
93
95
@assert isdir (output_dir) " Output directory does not exist: $output_dir "
@@ -106,6 +108,7 @@ function pbs_model_run(
106
108
model_interface,
107
109
module_load_str;
108
110
hpc_kwargs,
111
+ exeflags,
109
112
)
110
113
# TODO : Improve and figure out how to clean up the model_run.jl file
111
114
# julia_filepath does not get cleaned up. `mktemp() do` syntax is ideal
0 commit comments