xerus issueshttps://git.hemio.de/xerus/xerus/-/issues2019-04-12T11:18:01+02:00https://git.hemio.de/xerus/xerus/-/issues/215Not truncating properly in TT-SVD2019-04-12T11:18:01+02:00lljbashNot truncating properly in TT-SVDI notice the tSVD in TT-SVD is implemented as
```
1468 // Find rank due to the Epsilon (NOTE the scaling factor can be ignored, as it does not change the ratios).
1469 for(size_t j = 1; j < rank; ++j) {
1470 ...I notice the tSVD in TT-SVD is implemented as
```
1468 // Find rank due to the Epsilon (NOTE the scaling factor can be ignored, as it does not change the ratios).
1469 for(size_t j = 1; j < rank; ++j) {
1470 if (tmpS[j] <= _eps*tmpS[0]) {
1471 rank = j;
1472 break;
1473 }
1474 }
```
which is different from Oseledets's TT paper and will make the desired error tolerance not met. I'm not sure if there will be any side effects if I simply modify the truncation procedure.
The corresponding MATLAB codes in TT-toolbox are as follows.
```
...
pos=1;
ep=eps/sqrt(d-1);
for i=1:d-1
m=n(i)*r(i); c=reshape(c,[m,numel(c)/m]);
[u,s,v]=svd(c,'econ');
s=diag(s); r1=my_chop2(s,ep*norm(s));
u=u(:,1:r1); s=s(1:r1);
r(i+1)=r1;
core(pos:pos+r(i)*n(i)*r(i+1)-1, 1)=u(:);
v=v(:,1:r1);
v=v*diag(s); c=v';
pos=pos+r(i)*n(i)*r(i+1);
end
...
function [r] = my_chop2(sv,eps)
sv0=cumsum(sv(end:-1:1).^2);
ff=find(sv0<eps.^2);
if (isempty(ff) )
r=numel(sv);
else
r=numel(sv)-ff(end);
end
return
end
```
Would you pls fix this problem? Thanks for your time!Version 4.0RoteKekseRoteKeksehttps://git.hemio.de/xerus/xerus/-/issues/227Use the 4.0 release to rename Tensor.degree to Tensor.order ?2019-03-24T14:10:06+01:00Sebastian WolfUse the 4.0 release to rename Tensor.degree to Tensor.order ?The naming of `Tensor.degree` is mainly for historical reasons, as the most widely used term for the number of modes of a tensor is "order" and not "degree". Maybe we should use the 4.0 release to change the term accordingly?The naming of `Tensor.degree` is mainly for historical reasons, as the most widely used term for the number of modes of a tensor is "order" and not "degree". Maybe we should use the 4.0 release to change the term accordingly?Version 4.0Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/256REQUIREs in `uq_ra_adf_iv` are too restrictive2019-06-13T12:51:20+02:00Manuel MarschallREQUIREs in `uq_ra_adf_iv` are too restrictiveThe function `xerus::uq::uq_ra_adf_iv` in `src/xerus/applications/uqADF.cpp` requires
```
_x.order() <= _measurements.parameterVectors[i].size()
```
This is too restrictive in the UQ setting.
It requires the order of the tensor to be l...The function `xerus::uq::uq_ra_adf_iv` in `src/xerus/applications/uqADF.cpp` requires
```
_x.order() <= _measurements.parameterVectors[i].size()
```
This is too restrictive in the UQ setting.
It requires the order of the tensor to be less than the order of the rank-one measurement.
This does not take into account the fact that the first mode is reserved for the physical domain.
I propose to change the `REQUIRE` condition to
```
_x.order() <= _measurements.parameterVectors[i].size()+1
```Version 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/254bug in reshuffle2019-05-02T14:34:15+02:00Philipp Trunschkebug in reshuffle`xe.reshuffle(xe.reshuffle(a, [1,0,2]), [0,2,1]) != xe.reshuffle(a, [1,2,0])``xe.reshuffle(xe.reshuffle(a, [1,0,2]), [0,2,1]) != xe.reshuffle(a, [1,2,0])`Version 4.0https://git.hemio.de/xerus/xerus/-/issues/253make recompiles xerus even without changes2019-06-12T22:00:18+02:00RoteKeksemake recompiles xerus even without changesVersion 4.0https://git.hemio.de/xerus/xerus/-/issues/249load_from_file shoud raise an IOError instead of returning None if the file d...2019-06-13T12:26:28+02:00Philipp Trunschkeload_from_file shoud raise an IOError instead of returning None if the file does not existVersion 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/248uq_ra_adf may diverge with non-uniform weights2019-04-05T12:54:54+02:00Philipp Trunschkeuq_ra_adf may diverge with non-uniform weightsVersion 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/247test pybind11 bindings2019-06-12T23:08:00+02:00Philipp Trunschketest pybind11 bindings- [x] `xe.Tensor(xe.TTTensor([2]))` raises `ValueError`
- [ ] segfault in `test_pickle.py` with python2-bindings- [x] `xe.Tensor(xe.TTTensor([2]))` raises `ValueError`
- [ ] segfault in `test_pickle.py` with python2-bindingsVersion 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/246clean up interface to `uq_ra_adf`2019-06-16T20:37:40+02:00Philipp Trunschkeclean up interface to `uq_ra_adf`Clean up the interface for `uq_ra_adf`.
- [ ] define `uq_ra_adf_iv`, ... as overloaded version of `uq_ra_adf`Clean up the interface for `uq_ra_adf`.
- [ ] define `uq_ra_adf_iv`, ... as overloaded version of `uq_ra_adf`Version 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/245race conditions in CI execution2019-04-02T15:29:28+02:00Fuchsi*race conditions in CI executionour current method of separating the compilation and execution of the unittests is unstable if two or more commits are pending in the CI pipeline. Which executable gets tested is pretty much random. At the moment this can be a problem wi...our current method of separating the compilation and execution of the unittests is unstable if two or more commits are pending in the CI pipeline. Which executable gets tested is pretty much random. At the moment this can be a problem with commits that are less than 25 min apart...Version 4.0Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/242Add a CI test using _GLIBCXX_ASSERTIONS2019-04-02T15:39:55+02:00Sebastian WolfAdd a CI test using _GLIBCXX_ASSERTIONSThe config file allows to use the additional assertions of the GLIBC via `-D _GLIBCXX_ASSERTIONS`. There should be a CI test where this is active as it would directly expose e.g. vector out-of-bounds errors.The config file allows to use the additional assertions of the GLIBC via `-D _GLIBCXX_ASSERTIONS`. There should be a CI test where this is active as it would directly expose e.g. vector out-of-bounds errors.Version 4.0Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/240invalid read of size 8 in TRASD unittest2019-03-23T15:19:36+01:00Fuchsi*invalid read of size 8 in TRASD unittest```
| Fixed_Rank_Recovery starting: ==9814== Invalid read of size 8
==9814== at 0x4EC23A: tt_dofs(std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&) (c...```
| Fixed_Rank_Recovery starting: ==9814== Invalid read of size 8
==9814== at 0x4EC23A: tt_dofs(std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&) (common.hxx:38)
==9814== by 0x4F14AD: random_low_tt_ranks (common.hxx:83)
==9814== by 0x4F14AD: {lambda()#1}::operator()() const [clone .isra.151] (asd.cxx:39)
==9814== by 0x68571F: operator() (std_function.h:687)
==9814== by 0x68571F: xerus::misc::internal::test(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void ()> > const&, unsigned long) [clone .constprop.118] (test.cpp:112)
==9814== by 0x481A4B: main (test.cpp:231)
==9814== Address 0xcabaae8 is 0 bytes after a block of size 8 alloc'd
==9814== at 0x4838E86: operator new(unsigned long) (vg_replace_malloc.c:344)
==9814== by 0x4F13B6: allocate (new_allocator.h:111)
==9814== by 0x4F13B6: allocate (alloc_traits.h:436)
==9814== by 0x4F13B6: _M_allocate (stl_vector.h:296)
==9814== by 0x4F13B6: _M_create_storage (stl_vector.h:311)
==9814== by 0x4F13B6: _Vector_base (stl_vector.h:260)
==9814== by 0x4F13B6: vector (stl_vector.h:460)
==9814== by 0x4F13B6: random_low_tt_ranks (common.hxx:80)
==9814== by 0x4F13B6: {lambda()#1}::operator()() const [clone .isra.151] (asd.cxx:39)
==9814== by 0x68571F: operator() (std_function.h:687)
==9814== by 0x68571F: xerus::misc::internal::test(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void ()> > const&, unsigned long) [clone .constprop.118] (test.cpp:112)
==9814== by 0x481A4B: main (test.cpp:231)
```Version 4.0Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/237Remove Spaces from Test names2019-03-20T18:15:30+01:00RoteKekseRemove Spaces from Test namesVersion 4.0RoteKekseRoteKeksehttps://git.hemio.de/xerus/xerus/-/issues/235ARPACK Wrapper Documentation2019-04-12T12:25:26+02:00RoteKekseARPACK Wrapper DocumentationVersion 4.0RoteKekseRoteKeksehttps://git.hemio.de/xerus/xerus/-/issues/234File Utilities Documentation2019-03-24T04:02:14+01:00RoteKekseFile Utilities DocumentationVersion 4.0Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/232Move BlockTT to internal namespace2019-06-13T12:32:09+02:00RoteKekseMove BlockTT to internal namespaceVersion 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/231Add Skip option for test cases for non-regression failing tests2019-03-31T12:47:04+02:00RoteKekseAdd Skip option for test cases for non-regression failing testsVersion 4.0Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/230Memory Leak in Python Interface2019-06-13T01:30:25+02:00Philipp TrunschkeMemory Leak in Python InterfaceThere is a memory leak in the python interface to `xerus`.
Minimal working example:
```
import xerus as xe
i, = xe.indices(1)
d = xe.Tensor.random([100]*3)
while True:
d_tmp = xe.Tensor()
d_tmp(i&0) << d(i&0)
```There is a memory leak in the python interface to `xerus`.
Minimal working example:
```
import xerus as xe
i, = xe.indices(1)
d = xe.Tensor.random([100]*3)
while True:
d_tmp = xe.Tensor()
d_tmp(i&0) << d(i&0)
```Version 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/226How to handle weights in L2 error for Measurments2019-03-20T12:05:58+01:00Sebastian WolfHow to handle weights in L2 error for MeasurmentsHow should the L2 error in measurements with weights be calculated? The options are
```math
\sqrt{ \sum_i w_i (x_i - y_i)^2 }
```
and
```math
\sqrt{ \sum_i w_i^2 (x_i - y_i)^2 }
```
or anything else...How should the L2 error in measurements with weights be calculated? The options are
```math
\sqrt{ \sum_i w_i (x_i - y_i)^2 }
```
and
```math
\sqrt{ \sum_i w_i^2 (x_i - y_i)^2 }
```
or anything else...Version 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/225HT::round uses wrong index to access desired rank2019-03-20T11:29:56+01:00Fuchsi*HT::round uses wrong index to access desired rankfrom valgrind:
```
==19016== Invalid read of size 8
==19016== at 0x698428: xerus::HTNetwork<true>::round(std::vector<unsigned long, std::allocator<unsigned long> > const&, double) (htNetwork.cpp:727)
==19016== by 0x698946: xerus::H...from valgrind:
```
==19016== Invalid read of size 8
==19016== at 0x698428: xerus::HTNetwork<true>::round(std::vector<unsigned long, std::allocator<unsigned long> > const&, double) (htNetwork.cpp:727)
==19016== by 0x698946: xerus::HTNetwork<true>::round(unsigned long) (htNetwork.cpp:740)
==19016== by 0x6989C4: xerus::HTNetwork<true>::round(int) (htNetwork.cpp:747)
==19016== by 0x4F038C: {lambda()#11}::operator()() const [clone .isra.201] (htArithmetic.cxx:393)
==19016== by 0x67E80F: operator() (std_function.h:687)
==19016== by 0x67E80F: xerus::misc::internal::test(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void ()> > const&, unsigned long) [clone .constprop.118] (test.cpp:112)
==19016== by 0x47D70B: main (test.cpp:231)
==19016== Address 0xaafe060 is 0 bytes after a block of size 16 alloc'd
==19016== at 0x4838E86: operator new(unsigned long) (vg_replace_malloc.c:344)
==19016== by 0x6988AF: allocate (new_allocator.h:111)
==19016== by 0x6988AF: allocate (alloc_traits.h:436)
==19016== by 0x6988AF: _M_allocate (stl_vector.h:296)
==19016== by 0x6988AF: _M_create_storage (stl_vector.h:311)
==19016== by 0x6988AF: _Vector_base (stl_vector.h:260)
==19016== by 0x6988AF: vector (stl_vector.h:429)
==19016== by 0x6988AF: xerus::HTNetwork<true>::round(unsigned long) (htNetwork.cpp:740)
==19016== by 0x6989C4: xerus::HTNetwork<true>::round(int) (htNetwork.cpp:747)
==19016== by 0x4F038C: {lambda()#11}::operator()() const [clone .isra.201] (htArithmetic.cxx:393)
==19016== by 0x67E80F: operator() (std_function.h:687)
==19016== by 0x67E80F: xerus::misc::internal::test(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void ()> > const&, unsigned long) [clone .constprop.118] (test.cpp:112)
==19016== by 0x47D70B: main (test.cpp:231)
==19016==
==19016== Invalid read of size 8
==19016== at 0x698428: xerus::HTNetwork<true>::round(std::vector<unsigned long, std::allocator<unsigned long> > const&, double) (htNetwork.cpp:727)
==19016== by 0x698946: xerus::HTNetwork<true>::round(unsigned long) (htNetwork.cpp:740)
==19016== by 0x6989C4: xerus::HTNetwork<true>::round(int) (htNetwork.cpp:747)
==19016== by 0x4F053E: {lambda()#11}::operator()() const [clone .isra.201] (htArithmetic.cxx:395)
==19016== by 0x67E80F: operator() (std_function.h:687)
==19016== by 0x67E80F: xerus::misc::internal::test(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void ()> > const&, unsigned long) [clone .constprop.118] (test.cpp:112)
==19016== by 0x47D70B: main (test.cpp:231)
==19016== Address 0xa4d6770 is 0 bytes after a block of size 16 alloc'd
==19016== at 0x4838E86: operator new(unsigned long) (vg_replace_malloc.c:344)
==19016== by 0x6988AF: allocate (new_allocator.h:111)
==19016== by 0x6988AF: allocate (alloc_traits.h:436)
==19016== by 0x6988AF: _M_allocate (stl_vector.h:296)
==19016== by 0x6988AF: _M_create_storage (stl_vector.h:311)
==19016== by 0x6988AF: _Vector_base (stl_vector.h:260)
==19016== by 0x6988AF: vector (stl_vector.h:429)
==19016== by 0x6988AF: xerus::HTNetwork<true>::round(unsigned long) (htNetwork.cpp:740)
==19016== by 0x6989C4: xerus::HTNetwork<true>::round(int) (htNetwork.cpp:747)
==19016== by 0x4F053E: {lambda()#11}::operator()() const [clone .isra.201] (htArithmetic.cxx:395)
==19016== by 0x67E80F: operator() (std_function.h:687)
==19016== by 0x67E80F: xerus::misc::internal::test(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void ()> > const&, unsigned long) [clone .constprop.118] (test.cpp:112)
==19016== by 0x47D70B: main (test.cpp:231)
```
(HT::round should also be changed to divide provided _eps by the square-root of rounding operations performed to have error guarantees)Version 4.0RoteKekseRoteKekse