mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 22:18:01 +00:00
779f2e76ac
* Update redshift reading * Add helio to CMB redshift * Update imports * Update nb * Run for Quijote * Add script * Update * Update .gitignore * Update imports * Add Peery estimator * Add bulk flow scripts * Update typs * Add comment * Add blank space * Update submission script * Update description * Add barriers * Update nb * Update nb * Rename script * Move to old * Update imports * Add nb * Update script * Fix catalogue key * Update script * Update submit * Update comment * Update .gitignore * Update nb * Update for stationary obsrevers * Update submission * Add nb * Add better verbose control * Update nb * Update submit * Update nb * Add SN errors * Add draft of the script * Update verbosity flags * Add submission script * Debug script * Quickfix * Remove comment * Update nb * Update submission * Update nb * Processed UPGLADE
31 lines
621 B
Bash
Executable file
31 lines
621 B
Bash
Executable file
nthreads=${1}
|
|
on_login=${2}
|
|
memory=4
|
|
queue="redwood"
|
|
env="/mnt/zfsusers/rstiskalek/csiborgtools/venv_csiborg/bin/python"
|
|
file="post_upglade.py"
|
|
|
|
|
|
if [[ "$on_login" != "0" && "$on_login" != "1" ]]
|
|
then
|
|
echo "Error: on_login must be either 0 or 1."
|
|
exit 1
|
|
fi
|
|
|
|
if ! [[ "$nthreads" =~ ^[0-9]+$ ]] || [ "$nthreads" -le 0 ]; then
|
|
echo "Error: nthreads must be an integer larger than 0."
|
|
exit 1
|
|
fi
|
|
|
|
|
|
pythoncm="$env $file"
|
|
if [ $on_login -eq 1 ]; then
|
|
echo $pythoncm
|
|
$pythoncm
|
|
else
|
|
cm="addqueue -q $queue -n $nthreads -m $memory $pythoncm"
|
|
echo "Submitting:"
|
|
echo $cm
|
|
echo
|
|
eval $cm
|
|
fi
|