2024-06-26 09:43:26 +00:00
|
|
|
#!/bin/bash
|
2024-09-11 06:45:42 +00:00
|
|
|
memory=14
|
2024-06-26 09:43:26 +00:00
|
|
|
on_login=${1}
|
2024-07-30 16:02:48 +00:00
|
|
|
queue=${2}
|
2024-06-26 09:43:26 +00:00
|
|
|
ndevice=1
|
2024-03-08 10:44:19 +00:00
|
|
|
file="flow_validation.py"
|
2024-06-26 09:43:26 +00:00
|
|
|
ksmooth=0
|
2024-03-08 10:44:19 +00:00
|
|
|
|
|
|
|
|
2024-07-30 16:02:48 +00:00
|
|
|
if [ "$on_login" != "1" ] && [ "$on_login" != "0" ]
|
|
|
|
then
|
|
|
|
echo "'on_login' (1) must be either 0 or 1."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$queue" != "redwood" ] && [ "$queue" != "berg" ] && [ "$queue" != "cmb" ] && [ "$queue" != "gpulong" ] && [ "$queue" != "cmbgpu" ]; then
|
|
|
|
echo "Invalid queue: $queue (2). Please provide one of 'redwood', 'berg', 'cmb', 'gpulong', 'cmbgpu'."
|
2024-06-26 09:43:26 +00:00
|
|
|
exit 1
|
2024-03-08 10:44:19 +00:00
|
|
|
fi
|
2024-06-26 09:43:26 +00:00
|
|
|
|
2024-06-28 12:23:32 +00:00
|
|
|
|
2024-07-30 16:02:48 +00:00
|
|
|
if [ "$queue" == "gpulong" ]
|
|
|
|
then
|
|
|
|
device="gpu"
|
|
|
|
gputype="rtx2080with12gb"
|
|
|
|
# gputype="rtx3070with8gb"
|
|
|
|
env="/mnt/users/rstiskalek/csiborgtools/venv_gpu_csiborgtools/bin/python"
|
|
|
|
elif [ "$queue" == "cmbgpu" ]
|
|
|
|
then
|
|
|
|
device="gpu"
|
|
|
|
gputype="rtx3090with24gb"
|
|
|
|
env="/mnt/users/rstiskalek/csiborgtools/venv_gpu_csiborgtools/bin/python"
|
|
|
|
else
|
|
|
|
device="cpu"
|
|
|
|
env="/mnt/users/rstiskalek/csiborgtools/venv_csiborg/bin/python"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2024-09-17 20:01:20 +00:00
|
|
|
for simname in "IndranilVoid_exp" "IndranilVoid_gauss" "IndranilVoid_mb"; do
|
|
|
|
# for simname in "no_field"; do
|
2024-09-16 10:12:32 +00:00
|
|
|
# for catalogue in "2MTF" "SFI_gals" "CF4_TFR_i" "CF4_TFR_w1"; do
|
2024-09-12 15:04:25 +00:00
|
|
|
# for catalogue in "CF4_TFR_i" "CF4_TFR_w1"; do
|
2024-09-16 10:12:32 +00:00
|
|
|
for catalogue in "2MTF" "SFI_gals" "CF4_TFR_i" "CF4_TFR_w1"; do
|
2024-09-17 20:01:20 +00:00
|
|
|
# for ksim in "none"; do
|
2024-09-16 10:12:32 +00:00
|
|
|
# for ksim in 0; do
|
|
|
|
# for ksim in $(seq 0 5 500); do
|
2024-09-17 20:01:20 +00:00
|
|
|
for ksim in "0_100_5" "100_200_5" "200_300_5" "300_400_5" "400_500_5"; do
|
2024-09-11 14:21:24 +00:00
|
|
|
# for ksim in {0..500}; do
|
2024-09-16 10:12:32 +00:00
|
|
|
for ksmooth in 0; do
|
|
|
|
pythoncm="$env $file --catalogue $catalogue --simname $simname --ksim $ksim --ksmooth $ksmooth --ndevice $ndevice --device $device"
|
2024-06-26 09:43:26 +00:00
|
|
|
|
2024-09-16 10:12:32 +00:00
|
|
|
if [ "$on_login" == "1" ]; then
|
|
|
|
echo $pythoncm
|
|
|
|
eval $pythoncm
|
2024-07-30 16:02:48 +00:00
|
|
|
else
|
2024-09-16 10:12:32 +00:00
|
|
|
if [ "$device" == "gpu" ]; then
|
|
|
|
cm="addqueue -q $queue -s -m $memory --gpus 1 --gputype $gputype $pythoncm"
|
|
|
|
else
|
|
|
|
cm="addqueue -s -q $queue -n 1 -m $memory $pythoncm"
|
|
|
|
fi
|
|
|
|
echo "Submitting:"
|
|
|
|
echo $cm
|
|
|
|
eval $cm
|
2024-07-30 16:02:48 +00:00
|
|
|
fi
|
|
|
|
|
2024-09-16 10:12:32 +00:00
|
|
|
echo
|
|
|
|
sleep 0.001
|
2024-07-30 16:02:48 +00:00
|
|
|
|
2024-09-16 10:12:32 +00:00
|
|
|
done
|
2024-06-26 09:43:26 +00:00
|
|
|
done
|
|
|
|
done
|
2024-09-11 06:45:42 +00:00
|
|
|
done
|