Skip to content

Commit

Permalink
one last try
Browse files Browse the repository at this point in the history
  • Loading branch information
nefrathenrici committed Mar 23, 2024
1 parent f2e8a4a commit 3f3dacd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions slurm/model_run.sbatch
Original file line number Diff line number Diff line change
Expand Up @@ -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)
"
'

0 comments on commit 3f3dacd

Please sign in to comment.