Commit 1b7ffecc authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

add automatic seed generation when not defined: not satisfactory yet

parent 5ca0e3c6
......@@ -87,9 +87,8 @@ int main(int argc, char *argv[])
if (parser.params.param_present("seedU")){
seedU=parser.params.find<int>("seedU",1234);
}
else {//pick automatiocally: time too close to previous one so divide by 2
time_t result = time(NULL);
seedU=static_cast<uint32_t>(result/2);
else {//automatically
seedU=seed%1024;
}
cout << "seed for algorithm=" << seedU << endl;
......
......@@ -68,18 +68,12 @@ derived H0
derived sigma8
derived sigma8(0.57)
derived rs_drag
derived Da(0.57)
derived Dv(0.106)
derived Dv(0.32)
derived Dv(0.57)
derived f(0.57)
derived H(0.57)
dim=$ndim
algo=ada
length=$NSAMPLES
proposal_cov=$cov
bunchSize=1000
t0=2000
t0=1000
ts=10000
scale=0.001
do_move=false
......@@ -102,8 +96,9 @@ echo "seed=\$RANDOM" >> $parbase
cp $parbase $PWD/camel.par
./$localexec $parbase $PWD/samples\${SGE_TASK_ID}.txt
./$localexec $parbase $PWD/samples\${SGE_TASK_ID}.txt samples.fits
cp samples.fits $PWD/samples\${SGE_TASK_ID}.fits
cp ar_vs_length.txt $PWD/ar_vs_length\${SGE_TASK_ID}.txt
cp scale_vs_length.txt $PWD/scale_vs_length\${SGE_TASK_ID}.txt
cp corr.txt $PWD/corr\${SGE_TASK_ID}.txt
......@@ -121,9 +116,9 @@ fi
jobsub="${QSUB_CMD} -o $PWD -N $(basename $zeroot) -t 1-$NCHAINS zerun.sh"
echo "about to run : $jobsub"
echo "OK? [o/n]"
echo "OK? [y/n]"
read answer
if [ $answer != 'o' ] ; then
if [ $answer != 'y' ] ; then
echo "exiting"
exit 1
fi
......
......@@ -68,7 +68,7 @@ algo=ada
length=$NSAMPLES
proposal_cov=$cov
ts=10000
t0=2000
t0=1000
scale=0.001
do_move=false
EOF
......@@ -88,8 +88,9 @@ echo "seed=\$RANDOM" >> $parbase
cp $parbase $PWD/camel.par
./$localexec $parbase $PWD/samples\${SGE_TASK_ID}.txt
./$localexec $parbase $PWD/samples\${SGE_TASK_ID}.txt samples.fits
cp samples.fits $PWD/samples\${SGE_TASK_ID}.fits
cp ar_vs_length.txt $PWD/ar_vs_length\${SGE_TASK_ID}.txt
cp scale_vs_length.txt $PWD/scale_vs_length\${SGE_TASK_ID}.txt
cp corr.txt $PWD/corr\${SGE_TASK_ID}.txt
......@@ -107,9 +108,9 @@ fi
jobsub="${QSUB_CMD} -o $PWD -N $(basename $zeroot) -t 1-$NCHAINS zerun.sh"
echo "about to run : $jobsub"
echo "OK? [o/n]"
echo "OK? [y/n]"
read answer
if [ $answer != 'o' ] ; then
if [ $answer != 'y' ] ; then
echo "exiting"
exit 1
fi
......
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