Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
cosmotools
CAMEL
Commits
537eaff5
Commit
537eaff5
authored
Jun 25, 2019
by
Plaszczynski Stephane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove many warnings
parent
39432dca
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
19 deletions
+13
-19
cmt/requirements-lite.generic
cmt/requirements-lite.generic
+1
-1
src/AbsRand/OofNoise.cc
src/AbsRand/OofNoise.cc
+2
-1
src/camel/CMB/Lollipop.cc
src/camel/CMB/Lollipop.cc
+1
-1
src/camel/Class/ClassAdapters.hh
src/camel/Class/ClassAdapters.hh
+1
-0
src/camel/Class/ClassEngine.cc
src/camel/Class/ClassEngine.cc
+6
-14
src/camel/Lensing/LensingLikelihood.hh
src/camel/Lensing/LensingLikelihood.hh
+1
-1
src/camel/MCMC/exec/mainMCMC.cc
src/camel/MCMC/exec/mainMCMC.cc
+1
-1
No files found.
cmt/requirements-lite.generic
View file @
537eaff5
...
...
@@ -4,7 +4,7 @@ use class *
#
compiler
options
#
default
is
gcc
here
are
the
C
++
compiler
options
macro
cppflags
" -O2 -pipe -fPIC -Wall "
macro
cppflags
" -O2 -pipe -fPIC -Wall
-Wno-reorder -Wno-sign-compare -Wno-unknown-pragmas
"
#
do
we
need
optimzations
here
?
#
macro_append
cppflags
"-ffast-math -m64 "
...
...
src/AbsRand/OofNoise.cc
View file @
537eaff5
...
...
@@ -75,7 +75,8 @@ OofNoise::OofNoise(AbsGauss* r,double slope,double fmin,double fknee,double fsam
OofNoise
::~
OofNoise
(){
for
(
unsigned
i
=
0
;
i
<
ff
.
size
();
i
++
)
delete
ff
[
i
];
if
(
_r
)
delete
_r
;
_r
=
NULL
;
if
(
_r
)
delete
_r
;
_r
=
NULL
;
}
double
...
...
src/camel/CMB/Lollipop.cc
View file @
537eaff5
...
...
@@ -86,7 +86,7 @@ void Lollipop::CreateDataSet( string DataFile)
fp
.
close
();
if
(
(
long
)
dataset
.
size
()
!=
Lmax
-
Lmin
+
1
)
{
printf
(
"Wrong number of l in datafile (%d)
\n
"
,
(
long
)
dataset
.
size
());
printf
(
"Wrong number of l in datafile (%
l
d)
\n
"
,
(
long
)
dataset
.
size
());
exit
(
-
1
);
}
...
...
src/camel/Class/ClassAdapters.hh
View file @
537eaff5
...
...
@@ -27,6 +27,7 @@ class ClassAdapter
{
public:
virtual
std
::
string
className
()
{
return
name
;};
virtual
~
ClassAdapter
(){};
virtual
std
::
string
toClass
(
const
std
::
vector
<
double
>&
par
)
const
=
0
;
protected:
...
...
src/camel/Class/ClassEngine.cc
View file @
537eaff5
...
...
@@ -94,7 +94,7 @@ ClassEngine::ClassEngine(const ClassParams& pars): cl(0),dofree(true),pvecback(0
//prepare fp structure
size_t
n
=
pars
.
size
();
//
parser_init
(
&
fc
,
n
,
"pipo"
,
_errmsg
);
parser_init
(
&
fc
,
n
,
const_cast
<
char
*>
(
"pipo"
)
,
_errmsg
);
//config
for
(
size_t
i
=
0
;
i
<
pars
.
size
();
i
++
){
...
...
@@ -151,7 +151,7 @@ ClassEngine::ClassEngine(const ClassParams& pars,const string & precision_file):
fc_input
.
filename
=
new
char
[
1
];
//prepare fc par structure
size_t
n
=
pars
.
size
();
parser_init
(
&
fc_input
,
n
,
"pipo"
,
_errmsg
);
parser_init
(
&
fc_input
,
n
,
const_cast
<
char
*>
(
"pipo"
)
,
_errmsg
);
//config
for
(
size_t
i
=
0
;
i
<
pars
.
size
();
i
++
){
strcpy
(
fc_input
.
name
[
i
],
pars
.
key
(
i
).
c_str
());
...
...
@@ -568,9 +568,9 @@ double ClassEngine::get_Pklin(double k, double z){
#ifdef CLASSV_ABOVE_2_7
double
pk_cb
=
0.
;
double
pk_cb_ic
=
0.
;
int
ret
=
spectra_pk_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
,
pk_ic
,
&
pk_cb
,
&
pk_cb_ic
);
assert
(
spectra_pk_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
,
pk_ic
,
&
pk_cb
,
&
pk_cb_ic
)
==
_SUCCESS_
)
;
#else
int
ret
=
spectra_pk_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
,
pk_ic
);
assert
(
spectra_pk_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
,
pk_ic
)
==
_SUCCESS_
)
;
#endif
return
mypk
;
...
...
@@ -587,9 +587,9 @@ double ClassEngine::get_PkNL(double k, double z){
#ifdef CLASSV_ABOVE_2_7
double
pk_cb_tot
=
0
;
int
ret
=
spectra_pk_nl_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
,
&
pk_cb_tot
);
assert
(
spectra_pk_nl_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
,
&
pk_cb_tot
)
==
_SUCCESS_
)
;
#else
int
ret
=
spectra_pk_nl_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
);
assert
(
spectra_pk_nl_at_k_and_z
(
&
ba
,
&
pm
,
&
sp
,
k
,
z
,
&
mypk
)
==
_SUCCESS_
)
;
#endif
return
mypk
;
}
...
...
@@ -727,17 +727,9 @@ double ClassEngine::get_Da(double z)
int
index
;
//transform redshift in conformal time
background_tau_of_z
(
&
ba
,
z
,
&
tau
);
//call to fill pvecback
background_at_tau
(
&
ba
,
tau
,
ba
.
long_info
,
ba
.
inter_normal
,
&
index
,
pvecback
);
double
H_z
=
pvecback
[
ba
.
index_bg_H
];
double
D_ang
=
pvecback
[
ba
.
index_bg_ang_distance
];
#ifdef DBUG
cout
<<
"H_z= "
<<
H_z
<<
endl
;
cout
<<
"D_ang= "
<<
D_ang
<<
endl
;
#endif
return
D_ang
;
}
...
...
src/camel/Lensing/LensingLikelihood.hh
View file @
537eaff5
...
...
@@ -22,7 +22,7 @@ class LensingLikelihood
{
public:
virtual
~
LensingLikelihood
(){};
virtual
int
lmax
()
const
=
0
;
//convention: return -log(L)
virtual
double
computePPLikelihood
(
const
std
::
vector
<
unsigned
int
>&
l
,
...
...
src/camel/MCMC/exec/mainMCMC.cc
View file @
537eaff5
...
...
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
//SP 25/06/19: compute scale if undefined depending on dim
if
(
scale
<
0
)
{
scale
=
2.38
*
2.38
/
dim
;
cout
<<
"
r
efining scale
to
"
<<
scale
<<
endl
;
cout
<<
"
d
efining scale
factor as
"
<<
scale
<<
endl
;
}
//--------defining seeds-----------------------------------------------
unsigned
int
seed
(
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment