csiborgtools/scripts/flow/flow_validation.sh
Richard Stiskalek 32e36afdc3
Add CLONES support (#145)
* Add submit script

* Add support for gadget2

* Add OMP

* Lower resolution

* Update resolution again

* Add selection on galactic latitude

* Update name

* Update nb

* Update nb

* Add CLONES params

* Add import

* Add CLONES path

* Add CLONES reader

* Quick fix

* Add CLONES

* Update slice nb

* Update nb

* Update nb

* Tiny updates

* Update nb

* Add name

* Add CLONES support

* Add CF4 field

* Add CLONES

* Update script

* Update nb

* Update nb
2024-09-12 17:04:25 +02:00

78 lines
No EOL
2.4 KiB
Bash
Executable file

#!/bin/bash
memory=14
on_login=${1}
queue=${2}
ndevice=1
file="flow_validation.py"
ksmooth=0
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'."
exit 1
fi
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
# for simname in "CLONES"; do
# for simname in "csiborg2_main" "csiborg2X" ; do
# for simname in "carrick2015" "lilow2024" "csiborg2_main" "csiborg2x" "cf4" "clones"; do
for simname in "Carrick2015" "csiborg2_main"; do
# for simname in "Carrick2015" "csiborg2X" "csiborg2_main"; do
# for simname in "Carrick2015"; do
# for catalogue in "LOSS" "Foundation" "2MTF" "SFI_gals" "CF4_TFR_i" "CF4_TFR_w1"; do
for catalogue in "SFI_gals" "2MTF" "CF4_TFR_i"; do
# for catalogue in "CF4_TFR_i" "CF4_TFR_w1"; do
# for catalogue in "2MTF" "SFI" "CF4_TFR_not2MTForSFI_i"; do
# for catalogue in "2MTF" "SFI_gals" "CF4_TFR_i"; do
# for catalogue in "CF4_TFR_w1"; do
# for catalogue in "CF4_GroupAll"; do
for ksmooth in 1 2 3 4; do
for ksim in "none"; do
# for ksim in {0..500}; do
pythoncm="$env $file --catalogue $catalogue --simname $simname --ksim $ksim --ksmooth $ksmooth --ndevice $ndevice --device $device"
if [ "$on_login" == "1" ]; then
echo $pythoncm
eval $pythoncm
else
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
fi
echo
sleep 0.01
done
done
done
done