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
a47a0217
Commit
a47a0217
authored
Jun 25, 2019
by
Plaszczynski Stephane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove many warnings
parent
699b7c8a
Changes
7
Hide 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 @
a47a0217
...
@@ -4,7 +4,7 @@ use class *
...
@@ -4,7 +4,7 @@ use class *
#
compiler
options
#
compiler
options
#
default
is
gcc
here
are
the
C
++
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
?
#
do
we
need
optimzations
here
?
#
macro_append
cppflags
"-ffast-math -m64 "
#
macro_append
cppflags
"-ffast-math -m64 "
...
...
src/AbsRand/OofNoise.cc
View file @
a47a0217
...
@@ -75,7 +75,8 @@ OofNoise::OofNoise(AbsGauss* r,double slope,double fmin,double fknee,double fsam
...
@@ -75,7 +75,8 @@ OofNoise::OofNoise(AbsGauss* r,double slope,double fmin,double fknee,double fsam
OofNoise
::~
OofNoise
(){
OofNoise
::~
OofNoise
(){
for
(
unsigned
i
=
0
;
i
<
ff
.
size
();
i
++
)
delete
ff
[
i
];
for
(
unsigned
i
=
0
;
i
<
ff
.
size
();
i
++
)
delete
ff
[
i
];
if
(
_r
)
delete
_r
;
_r
=
NULL
;
if
(
_r
)
delete
_r
;
_r
=
NULL
;
}
}
double
double
...
...
src/camel/CMB/Lollipop.cc
View file @
a47a0217
...
@@ -86,7 +86,7 @@ void Lollipop::CreateDataSet( string DataFile)
...
@@ -86,7 +86,7 @@ void Lollipop::CreateDataSet( string DataFile)
fp
.
close
();
fp
.
close
();
if
(
(
long
)
dataset
.
size
()
!=
Lmax
-
Lmin
+
1
)
{
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
);
exit
(
-
1
);
}
}
...
...
src/camel/Class/ClassAdapters.hh
View file @
a47a0217
...
@@ -27,6 +27,7 @@ class ClassAdapter
...
@@ -27,6 +27,7 @@ class ClassAdapter
{
{
public:
public:
virtual
std
::
string
className
()
{
return
name
;};
virtual
std
::
string
className
()
{
return
name
;};
virtual
~
ClassAdapter
(){};
virtual
std
::
string
toClass
(
const
std
::
vector
<
double
>&
par
)
const
=
0
;
virtual
std
::
string
toClass
(
const
std
::
vector
<
double
>&
par
)
const
=
0
;
protected:
protected:
...
...
src/camel/Class/ClassEngine.cc
View file @
a47a0217
...
@@ -94,7 +94,7 @@ ClassEngine::ClassEngine(const ClassParams& pars): cl(0),dofree(true),pvecback(0
...
@@ -94,7 +94,7 @@ ClassEngine::ClassEngine(const ClassParams& pars): cl(0),dofree(true),pvecback(0
//prepare fp structure
//prepare fp structure
size_t
n
=
pars
.
size
();
size_t
n
=
pars
.
size
();
//
//
parser_init
(
&
fc
,
n
,
"pipo"
,
_errmsg
);
parser_init
(
&
fc
,
n
,
const_cast
<
char
*>
(
"pipo"
)
,
_errmsg
);
//config
//config
for
(
size_t
i
=
0
;
i
<
pars
.
size
();
i
++
){
for
(
size_t
i
=
0
;
i
<
pars
.
size
();
i
++
){
...
@@ -151,7 +151,7 @@ ClassEngine::ClassEngine(const ClassParams& pars,const string & precision_file):
...
@@ -151,7 +151,7 @@ ClassEngine::ClassEngine(const ClassParams& pars,const string & precision_file):
fc_input
.
filename
=
new
char
[
1
];
fc_input
.
filename
=
new
char
[
1
];
//prepare fc par structure
//prepare fc par structure
size_t
n
=
pars
.
size
();
size_t
n
=
pars
.
size
();
parser_init
(
&
fc_input
,
n
,
"pipo"
,
_errmsg
);
parser_init
(
&
fc_input
,
n
,
const_cast
<
char
*>
(
"pipo"
)
,
_errmsg
);
//config
//config
for
(
size_t
i
=
0
;
i
<
pars
.
size
();
i
++
){
for
(
size_t
i
=
0
;
i
<
pars
.
size
();
i
++
){
strcpy
(
fc_input
.
name
[
i
],
pars
.
key
(
i
).
c_str
());
strcpy
(
fc_input
.
name
[
i
],
pars
.
key
(
i
).
c_str
());
...
@@ -568,9 +568,9 @@ double ClassEngine::get_Pklin(double k, double z){
...
@@ -568,9 +568,9 @@ double ClassEngine::get_Pklin(double k, double z){
#ifdef CLASSV_ABOVE_2_7
#ifdef CLASSV_ABOVE_2_7
double
pk_cb
=
0.
;
double
pk_cb
=
0.
;
double
pk_cb_ic
=
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
#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
#endif
return
mypk
;
return
mypk
;
...
@@ -587,9 +587,9 @@ double ClassEngine::get_PkNL(double k, double z){
...
@@ -587,9 +587,9 @@ double ClassEngine::get_PkNL(double k, double z){
#ifdef CLASSV_ABOVE_2_7
#ifdef CLASSV_ABOVE_2_7
double
pk_cb_tot
=
0
;
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
#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
#endif
return
mypk
;
return
mypk
;
}
}
...
@@ -727,17 +727,9 @@ double ClassEngine::get_Da(double z)
...
@@ -727,17 +727,9 @@ double ClassEngine::get_Da(double z)
int
index
;
int
index
;
//transform redshift in conformal time
//transform redshift in conformal time
background_tau_of_z
(
&
ba
,
z
,
&
tau
);
background_tau_of_z
(
&
ba
,
z
,
&
tau
);
//call to fill pvecback
//call to fill pvecback
background_at_tau
(
&
ba
,
tau
,
ba
.
long_info
,
ba
.
inter_normal
,
&
index
,
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
];
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
;
return
D_ang
;
}
}
...
...
src/camel/Lensing/LensingLikelihood.hh
View file @
a47a0217
...
@@ -22,7 +22,7 @@ class LensingLikelihood
...
@@ -22,7 +22,7 @@ class LensingLikelihood
{
{
public:
public:
virtual
~
LensingLikelihood
(){};
virtual
int
lmax
()
const
=
0
;
virtual
int
lmax
()
const
=
0
;
//convention: return -log(L)
//convention: return -log(L)
virtual
double
computePPLikelihood
(
const
std
::
vector
<
unsigned
int
>&
l
,
virtual
double
computePPLikelihood
(
const
std
::
vector
<
unsigned
int
>&
l
,
...
...
src/camel/MCMC/exec/mainMCMC.cc
View file @
a47a0217
...
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
...
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
//SP 25/06/19: compute scale if undefined depending on dim
//SP 25/06/19: compute scale if undefined depending on dim
if
(
scale
<
0
)
{
if
(
scale
<
0
)
{
scale
=
2.38
*
2.38
/
dim
;
scale
=
2.38
*
2.38
/
dim
;
cout
<<
"
r
efining scale
to
"
<<
scale
<<
endl
;
cout
<<
"
d
efining scale
factor as
"
<<
scale
<<
endl
;
}
}
//--------defining seeds-----------------------------------------------
//--------defining seeds-----------------------------------------------
unsigned
int
seed
(
0
);
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