Commit 326f8179 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

No commit message

No commit message
parent 6e567d73
#!/bin/bash
#vhl
#M=(0 0.06 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.7 0.80 0.90 1)
#M=(0 0.06 0.10 0.20 0.30 0.40 0.50 0.60 0.7 0.80 0.90 1 1.2 1.5)
#BAO
M=(0 0.02 0.04 0.06 0.08 0.10 0.12 0.15 0.17 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.60 0.7 0.8 0.9 1.0)
cd `dirname $1`
dirpar=$PWD
cd -
parbase=`basename $1`
file=$dirpar/$parbase
dirout=${parbase%".par"}_nuscan
if [ -d "$dirout" ] ; then
echo "directory $dirout exists: still want to run? (o/n)"
read answer
if [ $answer != 'o' ] ; then
echo "exiting"
exit 1
fi
fi
mkdir $dirout
if [ -z "${CAMELROOT}" ] ; then
echo "CAMELROOT undefined"
exit
fi
if [ -z "$CLIKDIR" ] ; then
echo "miss CLIKDIR"
exit
fi
if [ ! -f "$file" ] ; then
echo "mssing $file"
exit
fi
CAMELDIR=${GROUP_DIR}/camel
HERE=$PWD
##########LOOP MNU################################
for inu in $(seq 0 $((${#M[@]}-1))) ; do
mnu=${M[$inu]}
echo $mnu
OUTDIR=$HERE/$dirout/nu_${mnu}
mkdir $OUTDIR
cd $OUTDIR
###################################################
cat > camelrun <<EOBATCH
#!/bin/bash
#$ -N $(basename $(dirname $PWD))_$(basename $PWD)
#$ -l os=sl6
#$ -R y
#$ -j y
#$ -o $PWD
#$ -e $PWD
cd \$TMPDIR
uname -a
echo "NSLOTS=\$NSLOTS"
export OMP_NUM_THREADS=8
export PYTHONPATH=${PICO_CODE}
# copies localeS
cp $CAMELROOT/$CMTCONFIG/Minimize .
cp $CAMELROOT/batch/awk/genrand.awk .
#
#input file
# enleve lo:w-l
grep -v ncdm $file | grep -v Alens | grep -v N_eff > parfile_in
#rajouter MNU
#================================
if [ "$mnu" == "0" ] ; then
echo "fix N_ncdm cosmo 0" >> parfile_in
echo "class N_eff 3.046" >> parfile_in
else
echo "class N_ncdm 1" >> parfile_in
echo "fix m_ncdm cosmo $mnu" >> parfile_in
echo "class N_eff 2.046" >> parfile_in
fi
echo "init par:"
cat parfile_in
#================================
#randomize si id ne 1
#================================
echo "***************************************************************"
if [ \${SGE_TASK_ID} -eq 1 ] ; then
cp parfile_in parfile
else
RANDOM=\${SGE_TASK_ID}
awk -v seed=\$RANDOM -f genrand.awk parfile_in > parfile
fi
cp parfile $OUTDIR/camel\${SGE_TASK_ID}.par
echo "***************************************************************"
#================================
# Camel run
#================================
./Minimize parfile bestfit
cp -f bestfit $OUTDIR/best_fit\${SGE_TASK_ID}
EOBATCH
#####################################################################################################################################
qsub -P P_planck_prod -t 1-5 -pe multicores 8 -q mc_long camelrun
qsub -P P_planck_prod -t 6-10 -pe openmpi_8 8 -q pa_long camelrun
#sps=1
#qsub -t 1-10 -pe multicores 8 -l sps=1 -q mc_long camelrun
#qsub -t 6-10 -pe openmpi_8 8 -l sps=1 -q pa_long camelrun
#####################################################################################################################################
done
......@@ -8,13 +8,16 @@ var=Alens
#for ((i=0;i<N;i++)) ; do
#val[$i]=$(echo | awk -v xmin=$xmin -v xmax=$xmax -v N=$N -v i=$i 'BEGIN{step=(xmax-xmin)/(N-1)} {printf("%f",xmin+(i)*step)}')
#done
val=(0.9 0.95 1 1.03 1.05 1.07 1.10 1.15 1.20 1.3)
#val=(0.9 1 1.05 1.10 1.15 1.20 1.25 1.30 1.35 1.4)
#val=(0.95 1.03 1.07 1.12 1.17)
val=(0.95 1 1.03 1.05 1.07 1.10 1.12 1.15 1.20 1.25 1.30)
#var=tau_reio
#val=(0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.12)
#val=(0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10 0.12 0.13 0.15 0.15)
#val=(0.025 0.035 0.045 0.055 0.065 0.075 0.085 0.095)
#val=(0.01 0.02 0.025 0.03 0.035 0.04 0.045 0.05 0.055 0.06 0.065 0.07 0.075 0.08 0.085 0.09 0.095 0.10 0.12)
#val=(0.095)
#val=(0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 0.055 0.06 0.065 0.07 0.075 0.08 0.085 0.09 0.095 0.10 0.11 0.12)
#val=(0.16 0.17 0.18 0.10 0.20 0.21 0.22 0.23 0.24 0.25)
#var=N_eff
......@@ -134,7 +137,9 @@ cp -f covmat "$OUTDIR"/covmat\${SGE_TASK_ID}
EOBATCH
#####################################################################################################################################
qsub -P P_$GROUP -t 6-10 -pe openmpi_8 8 -q pa_long -l sps=1 camelrun_$zeval
qsub -P P_$GROUP -t 1-5 -pe multicores 8 -q mc_long -l sps=1 camelrun_$zeval
#SP only
qsub -P P_planck_prod -t 1-5 -pe openmpi_8 8 -q pa_long camelrun_$zeval
qsub -P P_planck_prod -t 6-10 -pe multicores 8 -q mc_long camelrun_$zeval
#qsub -P P_planck_prod -t 1-10 -pe multicores 8 -q mc_long camelrun_$zeval
#####################################################################################################################################
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment