Commit 59980b30 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

fix sigsev form planck_lkl

parent ab1d5ba1
#!/bin/env bash
NCHAINS=4
MCORE=16
NCORES=16
myexec=$CAMELROOT/$CMTCONFIG/mcmc
......@@ -31,9 +31,9 @@ fi
#cat $parFile
cd `dirname $parFile`
dirpar=$PWD
cd -
cd - > /dev/null
parbase=`basename $parFile`
zeroot=${parbase%".par"}_MC
zeroot=$CAMELROOT/batch/${parbase%".par"}_MC
if [ -d "$zeroot" ] ; then
......@@ -51,6 +51,8 @@ ndim=`awk '$1=="par"{n++}; END {print n}' $parFile`
mkdir $zeroot
cd $zeroot
echoi "output will be in $PWD"
#MCMC stuff :TT
cov=$dirpar/covmat.dat
if ! [ -f $cov ] ; then
......@@ -88,7 +90,7 @@ cat > zerun.sh <<eof
echo "running on : \$(uname -a)"
export PYTHONPATH=${PICO_CODE}
export OMP_NUM_THREADS=$MCORE
export OMP_NUM_THREADS=$NCORES
cd \$TMPDIR
cp $myexec .
......@@ -118,8 +120,15 @@ echo "exiting"
exit 1
fi
#qsub -P P_$GROUP -t 1-$NCHAINS -pe openmpi_$MCORE $MCORE -q pa_long -l sps=1 -R y -j y -o $PWD -e $PWD -N $zeroot zerun.sh
#qsub -P P_$GROUP -t 1-$NCHAINS -pe multicores $MCORE -q mc_longlasting -l sps=1 -R y -j y -o $PWD -e $PWD -N $zeroot zerun.sh
#qsub -P P_$GROUP -t 1-$NCHAINS -pe openmpi_$NCORES $NCORES -q pa_longlasting -l sps=1 -R y -j y -o $PWD -e $PWD -N $(basename $zeroot) zerun.sh
#qsub -P P_$GROUP -t 1-$NCHAINS -pe multicores $NCORES -q mc_longlasting -l sps=1 -R y -j y -o $PWD -e $PWD -N $(basename $zeroot) zerun.sh
QSUB_CMD="qsub -P P_planck_prod -pe openmpi_$NCORES $NCORES -q pa_longlasting -R y -j y"
eval "${QSUB_CMD} -o $PWD -N $(basename $zeroot) -t 1-$NCHAINS zerun.sh"
cd -
cd - > /dev/null
......@@ -4,7 +4,7 @@ use class v2.4.3
#compiler options
macro cpp "icpc"
macro cppflags " -O2 -ip -ansi_alias -align -Wbrief -Wdeprecated -Wuninitialized -align -Wbrief -Wunused-function -Wpointer-arith -Wreturn-type"
macro cppflags " -O2 -ip -ansi_alias -align -Wbrief -Wdeprecated -Wuninitialized -align -Wbrief -Wunused-function -Wpointer-arith -Wreturn-type"
#CAMEL includes
include_dirs " ../src"
......
......@@ -52,7 +52,7 @@ public:
std::vector<double>& clbb,
std::vector<double>& nuisance);
//this uses a fiducial model for CMB
//this uses an internal fiducial model for ClTT&P
double computePPLikelihood(const std::vector<unsigned int>& l,
std::vector<double>& clphiphi,
std::vector<double>& nuisance);
......
......@@ -7,7 +7,7 @@
using namespace std;
//default constructor
planck_lkh::planck_lkh(Chi2Combiner* chi2, Parser parser): _chi2(chi2), _parser(parser), _e(0),_par(_parser.vars().Params()),_fix_par(parser.vars().fixedParams())
planck_lkh::planck_lkh(Chi2Combiner* chi2, const Parser& parser): _chi2(chi2), _parser(parser), _e(0),_par(parser.vars().Params()),_fix_par(parser.vars().fixedParams())
{
if(_parser.derivedVars().size()!=0)
{
......
......@@ -27,7 +27,7 @@ public:
std::vector<double> _derived_par;
//constructor
planck_lkh(Chi2Combiner* chi2, Parser parser);
planck_lkh(Chi2Combiner* chi2, const Parser& parser);
//method no longer virtual
void evaluate(const HepVector& value);
......
......@@ -59,7 +59,7 @@ public:
}
inline std::vector<bool> fixedParams() const {
const size_t N=Params().size();
const size_t N=Parameters().size();
std::vector<bool> f(N);
for (size_t i=0;i<N;i++) f[i]=isFixed(i);
return f;
......
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