3
0
mirror of https://github.com/triqs/dft_tools synced 2024-10-31 11:13:46 +01:00

Attempt to fix gelss call in fit_tail.

uncommenting the resize fix the issue on linux.
valgrind reports no error any more.
What was the problem ?
This commit is contained in:
Olivier Parcollet 2014-03-19 13:58:36 +01:00
parent d85cf0b4d2
commit 8045598534
3 changed files with 9 additions and 7 deletions

View File

@ -66,7 +66,7 @@
... Order 2 =
[[(1,0)]]
... Order 3 =
[[(0.999247,0)]]
[[(0.999251,0)]]
... Order 4 =
[[(0.998655,0)]]
@ -80,7 +80,7 @@
... Order 2 =
[[(1,0)]]
... Order 3 =
[[(0.999186,0)]]
[[(0.999236,0)]]
... Order 4 =
[[(0.998631,0)]]
@ -94,7 +94,7 @@
... Order 2 =
[[(1,0)]]
... Order 3 =
[[(0.999214,0)]]
[[(0.999251,0)]]
... Order 4 =
[[(0.998655,0)]]

View File

@ -82,6 +82,8 @@ namespace triqs { namespace arrays { namespace lapack {
f77::gelss ( get_n_rows(Ca()), get_n_cols(Ca()), nrhs , Ca().data_start(), get_ld(Ca()),
Cb().data_start(), get_ld(Cb()), Cs().data_start(), rcond, rank, work.data_start(), lwork, info);
if (info) TRIQS_RUNTIME_ERROR << "Error in gelss : info = "<< info;
return info;
}

View File

@ -35,8 +35,8 @@ namespace triqs { namespace gfs { namespace local {
for (int j = 0; j < get_target_shape(gf)[1]; j++) {
// fit the odd moments
// S.resize(size_odd);
// A.resize(size1,size_odd); //when resizing, gelss segfaults
S.resize(size_odd);
A.resize(size1,size_odd); //when resizing, gelss segfaults
for (int k = 0; k < size1; k++) {
auto n = n_min + k;
auto iw = std::complex<double>(gf.mesh().index_to_point(n));
@ -58,8 +58,8 @@ namespace triqs { namespace gfs { namespace local {
}
// fit the even moments
// S.resize(size_even);
// A.resize(size1,size_even); //when resizing, gelss segfaults
S.resize(size_even);
A.resize(size1,size_even); //when resizing, gelss segfaults
for (int k = 0; k < size1; k++) {
auto n = n_min + k;
auto iw = std::complex<double>(gf.mesh().index_to_point(n));