mirror of
https://github.com/Richard-Sti/csiborgtools_public.git
synced 2025-05-14 14:41:12 +00:00
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
This commit is contained in:
parent
a4d02b4cc4
commit
32e36afdc3
17 changed files with 874 additions and 214 deletions
39
scripts_independent/field_sph_gadget.sh
Executable file
39
scripts_independent/field_sph_gadget.sh
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
nthreads=28
|
||||
memory=7
|
||||
on_login=${1}
|
||||
queue="berg"
|
||||
env="/mnt/zfsusers/rstiskalek/csiborgtools/venv_csiborg/bin/python"
|
||||
file="field_sph_gadget.py"
|
||||
|
||||
# Guilhem says higher resolution is better
|
||||
resolution=1024
|
||||
SPH_executable="/mnt/users/rstiskalek/cosmotool/bld/sample/simple3DFilter"
|
||||
scratch_space="/mnt/extraspace/rstiskalek/dump/"
|
||||
|
||||
snapshot_kind="gadget2"
|
||||
snapshot_path="/mnt/extraspace/rstiskalek/CLONES/s8/cf2gvpecc1pt5elmo73_sig6distribsbvoldi_RZA3Derrv2_512_500_ss8_zinit60_000"
|
||||
output_path="/mnt/extraspace/rstiskalek/CLONES/s8/cf2gvpecc1pt5elmo73_sig6distribsbvoldi_RZA3Derrv2_512_500_ss8_zinit60_000.hdf5"
|
||||
|
||||
|
||||
# Check if `on_login` is either 0 or 1
|
||||
# Check if on_login is not empty and is a valid integer (0 or 1)
|
||||
if [ -z "$on_login" ] || ! [[ "$on_login" =~ ^[0-1]$ ]]; then
|
||||
echo "First argument must be either 0 or 1. Received: $on_login"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export OMP_NUM_THREADS={nthreads}
|
||||
export OMP_NESTED=true
|
||||
|
||||
pythoncm="$env $file --snapshot_path $snapshot_path --output_path $output_path --resolution $resolution --scratch_space $scratch_space --SPH_executable $SPH_executable --snapshot_kind $snapshot_kind"
|
||||
if [ $on_login -eq 1 ]; then
|
||||
echo $pythoncm
|
||||
$pythoncm
|
||||
else
|
||||
cm="addqueue -s -q $queue -n 1x$nthreads -m $memory $pythoncm"
|
||||
echo "Submitting:"
|
||||
echo $cm
|
||||
echo
|
||||
eval $cm
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue