Commit 2f9319a0 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

No commit message

No commit message
parent cda35604
......@@ -7,9 +7,9 @@ yup=18
xr=[-.5,.5]
yr=[0,yup]
;dirs=["hlpTT_bflike_vhl_LCDMClass_nuscan","hlpTT_vhl_lensing_LCDMClass_nuscan"]
dirs=["../hlpTT_bflike_vhl_LCDM_nuscan","../hlpTT_bflike_vhl2_LCDM_nuscan"]
;dirs=["hlpTT_bflike_vhl_LCDMClass_nuscan","hlpTT_bflike_vhl_LCDMClass_nuscan0"]
dirs=["hlpTT_bflike_vhl_LCDMClass_nuscan","hlpTT_bflike_vhl_JLA_LCDMClass_nuscan"]
;dirs=["hlpTT_bflike_vhl_LCDMClass_nuscan","hlpTT_bflike_vhl_JLA_LCDMClass_nuscan"]
names=dirs
......
#!/bin/bash
#var=Alens
var=Alens
val=(0.9 0.92 0.95 0.98 1 1.03 1.05 1.07 1.10 1.13 1.15 1.18 1.20)
#N=50
#xmin=0.8
#xmax=1.5
......@@ -10,15 +11,15 @@
#done
var=tau_reio
#var=tau_reio
#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)
N=30
xmin=0.05
xmax=0.25
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
#N=30
#xmin=0.05
#xmax=0.25
#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
file=$(readlink -e $1)
......@@ -60,7 +61,7 @@ mkdir $OUTDIR
cd $OUTDIR
######################creation bestfitpico###############################
cat bfrun <<EOF
cat > bfrun <<EOF
#!/bin/bash
#$ -l os=sl6
#$ -R y
......@@ -92,7 +93,7 @@ cat parfile_in
echo "PICO BESTFIT="
cat bestfit_pico
cp -f bestfit_pico "$OUTDIR"/bestfit.pico
cp -f bestfit_pico $OUTDIR/bestfit.pico
EOF
......@@ -112,12 +113,12 @@ export OMP_NUM_THREADS=8
export PYTHONPATH=${PICO_CODE}
#
if [ ! -f "$OUTDIR"/bestfit.pico ] ; then
if [ ! -f $OUTDIR/bestfit.pico ] ; then
echo "NO BESTFITPICO FOUND : CATASTROPHIC ERROR"
exit 1
fi
#compute var
cp "$OUTDIR"/bestfit.pico .
cp $OUTDIR/bestfit.pico .
# copies localeS
cp $CAMELROOT/$CMTCONFIG/FitClassFromPico .
......@@ -125,7 +126,7 @@ cp $CAMELROOT/batch/awk/genrand.awk .
cp $CAMELROOT/batch/python/changepars.py .
#
#MODIFY input .par according to bestfit
#MODIFY input .par according to pico bestfit
grep -v "$var" $file > parfile2
echo "fix $var cosmo $zeval" >> parfile2
python ./changepars.py parfile2 bestfit.pico > parfile_in
......@@ -137,15 +138,13 @@ else
RANDOM=\${SGE_TASK_ID}
awk -v seed=\$RANDOM -f genrand.awk parfile_in > parfile
fi
echo "CLASS .par:"
cat parfile
cp parfile "$OUTDIR"/camelClass\${SGE_TASK_ID}.par
cp parfile $OUTDIR/camelClass\${SGE_TASK_ID}.par
#CLASS RUN
./FitClassFromPico parfile bestfit_class
cp -f bestfit_class "$OUTDIR"/best_fitClass\${SGE_TASK_ID}
cp -f bestfit_class $OUTDIR/best_fitClass\${SGE_TASK_ID}
EOBATCH
......@@ -153,15 +152,13 @@ EOBATCH
#qsub -P P_planck_prod -t 1-10 -pe openmpi_8 8 -q pa_long camelrun
#qsub -P P_planck_prod -t 1-10 -pe multicores 8 -q mc_long camelrun
base=$(basename $PWD)
picojob="picofit_$base"
picojob="pico_${dirout}_$zeval"
classjob="class_${dirout}_$zeval"
#mc
#qsub -P P_planck_prod -pe multicores 8 -q mc_long -N $picojob bfrun
#qsub -P P_planck_prod -t 1-10 -pe multicores 8 -q mc_long -hold_jid $picojob -N "class_$base" camelrun
#pa
qsub -P P_planck_prod -pe openmpi_8 8 -q pa_long -N $picojob bfrun
qsub -P P_planck_prod -t 1-10 -pe openmpi_8 8 -q pa_long -hold_jid $picojob -N "class_$base" camelrun
qsub -P P_planck_prod -pe openmpi_8 8 -q pa_long -N "$picojob" bfrun
qsub -P P_planck_prod -t 1-5 -pe openmpi_8 8 -q pa_long -hold_jid "$picojob" -N "$classjob" camelrun
#####################################################################################################################################
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