diff --git a/slurm/model_run.sbatch b/slurm/model_run.sbatch index 94fd6724..7aabe9b2 100644 --- a/slurm/model_run.sbatch +++ b/slurm/model_run.sbatch @@ -2,22 +2,26 @@ # Extract command-line arguments experiment_id=$1 -iteration=$2 +i=$2 # Find output directory -format_i=$(printf "iteration_%03d" "$iteration") +format_i=$(printf "iteration_%03d" "$i") member=$(printf "member_%03d" "$SLURM_ARRAY_TASK_ID") output=output/$experiment_id/$format_i/$member/model_log.out julia --project=experiments/$experiment_id -e 'using Conda; Conda.add("scipy=1.8.1", channel="conda-forge"); Conda.add("scikit-learn=1.1.1")' # Run the forward model -srun --output=$output julia --color=no --project=experiments/$experiment_id -e " +srun --output=$output julia --color=no --project=experiments/$experiment_id -e ' @show Base.active_project(); using Pkg; Pkg.build("CalibrateAtmos"); Pkg.instantiate(;verbose=true) import CalibrateAtmos - include(\"experiments/$experiment_id/model_interface.jl\") + experiment_id = "'$experiment_id'" + i = '$i' + member = '$SLURM_ARRAY_TASK_ID' - physical_model = CalibrateAtmos.get_forward_model(Val(:$experiment_id)) - config = CalibrateAtmos.get_config(physical_model, $SLURM_ARRAY_TASK_ID, $iteration, \"$experiment_id\") + include("experiments/$experiment_id/model_interface.jl") + + physical_model = CalibrateAtmos.get_forward_model(Val(Symbol(experiment_id))) + config = CalibrateAtmos.get_config(physical_model, member, i, experiment_id) CalibrateAtmos.run_forward_model(physical_model, config) -" +'