Commit 8d5abe05 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

correct multiprof2

parent f811a247
......@@ -11,6 +11,7 @@ then
echo "parfile values are not shuffled (randomly) for job 1"
exit 1
fi
parFile=$1
range=$2
if [ -z "${CAMELROOT}" ] ; then
......@@ -18,10 +19,7 @@ echo "CAMELROOT undefined"
exit
fi
file=$(readlink -e $1)
parbase=$(basename $file)
dirout=${parbase%".par"}_mprof_"${var}"
file=$(readlink -e $parFile)
if [ ! -f "$file" ] ; then
echo "mssing $file"
......@@ -29,13 +27,12 @@ exit
fi
####################DEFINE VARIABLE##################################
var=Alens
var="log(10^10A_s)"
#values through array
N=20
xmin=0.9
xmax=1.5
N=30
xmin=2.95
xmax=3.20
#val array
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)}')
......@@ -71,19 +68,20 @@ echo "exiting"
exit 1
fi
parbase=$(basename $file)
dirout=${parbase%".par"}_mprof_"${var}"
if [ -d "$dirout" ] ; then
echo "directory $dirout exists: still want to run? (o/n)"
echo "directory $dirout exists: still want to run? (y/n)"
read answer
if [ $answer != 'o' ] ; then
if [ $answer != 'y' ] ; then
echo "exiting"
exit 1
fi
fi
mkdir $dirout
CAMELDIR=${GROUP_DIR}/camel
HERE=$PWD
##########LOOP################################
......@@ -95,9 +93,9 @@ OUTDIR=$HERE/$dirout/"$var"_${zeval}
mkdir $OUTDIR
cd $OUTDIR
###################################################
cat > camelrun <<EOBATCH
cat > camelrun_${zeval} <<EOBATCH
#!/bin/bash
#$ -N $(basename $(dirname $PWD))_$(basename $PWD)
#$ -N ${parbase}_$zeval
#$ -l os=sl6
#$ -R y
#$ -j y
......@@ -150,7 +148,7 @@ echo "***************************************************************"
echo "PICO BESTFIT="
cat bestfit_pico
cp -f bestfit_pico "$OUTDIR"/best_fitPico\${SGE_TASK_ID}
cp -f bestfit_pico "$OUTDIR"/pico_bf\${SGE_TASK_ID}
#MODIFY par BESTFIT
grep -v "$var" $file > parfile2
......@@ -164,7 +162,7 @@ cp parfile3 "$OUTDIR"/camelClass\${SGE_TASK_ID}.par
#CLASS RUN
./FitClassFromPico parfile3 bestfit_class
cp -f bestfit_class "$OUTDIR"/best_fitClass\${SGE_TASK_ID}
cp -f bestfit_class "$OUTDIR"/best_fit\${SGE_TASK_ID}
EOBATCH
......
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