xerus issueshttps://git.hemio.de/xerus/xerus/-/issues2021-06-08T22:29:46+02:00https://git.hemio.de/xerus/xerus/-/issues/268Fancy callstacks cause memory leaks2021-06-08T22:29:46+02:00Sebastian WolfFancy callstacks cause memory leaksCan be reproduced by with Valgrind or by compiling XerusTest with address sanitizer and running
```
$ ASAN_OPTIONS=alloc_dealloc_mismatch=0 ./XerusTest Tensor:triple_indices
##############################################################...Can be reproduced by with Valgrind or by compiling XerusTest with address sanitizer and running
```
$ ASAN_OPTIONS=alloc_dealloc_mismatch=0 ./XerusTest Tensor:triple_indices
###############################################################################
# unit-testing #
###############################################################################
| Tensor:triple_indices starting: ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
| Tensor:triple_indices: passed! (83.552 ms)
|
|
| total summary 1 of 1 passed
-------------------------------------------------------------------------------
|
| Total time elapsed: 83.639 ms
-------------------------------------------------------------------------------
=================================================================
==47735==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 5415540 byte(s) in 31 object(s) allocated from:
#0 0x7ff33cdd193f in __interceptor_malloc (/lib64/libasan.so.6+0xae93f)
#1 0x1088be5 in bfd_malloc /builddir/build/BUILD/binutils-2.35.1/bfd/libbfd.c:275
Direct leak of 526 byte(s) in 9 object(s) allocated from:
#0 0x7ff33cd7c967 in strdup (/lib64/libasan.so.6+0x59967)
#1 0x10d7b6a in scan_unit_for_symbols dwarf2.c:3530
#2 0x10d7b6a in comp_unit_maybe_decode_line_info dwarf2.c:3946
#3 0x10d7b6a in comp_unit_maybe_decode_line_info dwarf2.c:3924
SUMMARY: AddressSanitizer: 5416066 byte(s) leaked in 40 allocation(s).
```https://git.hemio.de/xerus/xerus/-/issues/267How to load pickled xerus objects in C++?2020-12-04T14:38:31+01:00Philipp TrunschkeHow to load pickled xerus objects in C++?This should be possible since pickle uses `xerus::misc::serialize` to serialize the object.
However, I am not sure how to get to the data. For a simple tensor the following seems to work (pseudo code in python):
```
def load_pickled(file...This should be possible since pickle uses `xerus::misc::serialize` to serialize the object.
However, I am not sure how to get to the data. For a simple tensor the following seems to work (pseudo code in python):
```
def load_pickled(fileName):
with open(fileName, 'rb') as f:
bytes = f.read()
headerLength = bytes.index("Xerus xerus::")
return xerus.deserialize(bytes[headerLength:])
```https://git.hemio.de/xerus/xerus/-/issues/266XERUS_REPLACE_ALLOCATOR generates an error on gitlab CI2020-05-02T22:49:51+02:00Philipp TrunschkeXERUS_REPLACE_ALLOCATOR generates an error on gitlab CISee e.g. [#2034](https://git.hemio.de/xerus/xerus/pipelines/2034).See e.g. [#2034](https://git.hemio.de/xerus/xerus/pipelines/2034).https://git.hemio.de/xerus/xerus/-/issues/264Adding conda recipe2020-04-29T13:03:54+02:00faysouAdding conda recipeHello,
It would be great if you could add a conda recipe for your project in order to be able to use it in jupyter with Xeus-Cling (https://github.com/jupyter-xeus/xeus-cling).
See this similar request for more details.
https://github...Hello,
It would be great if you could add a conda recipe for your project in order to be able to use it in jupyter with Xeus-Cling (https://github.com/jupyter-xeus/xeus-cling).
See this similar request for more details.
https://github.com/Dobiasd/FunctionalPlus/issues/161
Thank youhttps://git.hemio.de/xerus/xerus/-/issues/263replace `TTOpertor.degrees_of_freedom` with `xe.degrees_of_freedom` in the py...2020-04-21T10:27:21+02:00Philipp Trunschkereplace `TTOpertor.degrees_of_freedom` with `xe.degrees_of_freedom` in the python interfaceVersion 4.1Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/262Slice TTTensor2020-04-21T10:19:54+02:00Nando FarchminSlice TTTensorWould be good to get a subtensor, i.e. slice of the tensor (a subtensor from dimensions (l_1,...,l_n) to dimensions (u_1,...,u_n) where 0 <= l_i <= u_i <= tensor_dim_i, see code below.)
```
def slice_tt(tt, lower, upper):
"""
Sl...Would be good to get a subtensor, i.e. slice of the tensor (a subtensor from dimensions (l_1,...,l_n) to dimensions (u_1,...,u_n) where 0 <= l_i <= u_i <= tensor_dim_i, see code below.)
```
def slice_tt(tt, lower, upper):
"""
Slice TTTensor in each component from lower to (not including) upper dimension.
"""
assert len(lower) == len(upper) == len(tt.dimensions)
assert np.all(np.array(lower) < np.array(upper))
assert np.all(np.array(upper) <= np.array(tt.dimensions))
diff = [u-l for l,u in zip(lower,upper)]
# TODO there should be a more elegant way to slice TTTensors!
tmp = xe.TTTensor(tt)
for pos in range(tt.order()):
tmp.move_core(pos)
cmp = np.asarray(tmp.get_component(pos))
cmp[:, :lower[pos], :] = 0
cmp[:, upper[pos]:, :] = 0
tmp.set_component(pos, xe.Tensor.from_buffer(cmp))
tmp.move_core(0)
tt_slice = xe.TTTensor.random(diff, tmp.ranks())
for pos in range(tt.order()):
cmp = np.asarray(tmp.get_component(pos))
cmp = np.array(cmp[:, lower[pos]:upper[pos], :])
tt_slice.set_component(pos, xe.Tensor.from_buffer(cmp))
return tt_slice
```Version 4.1Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/261New flag in gcc 9.1 -Wsign-compare2020-04-21T10:22:19+02:00RoteKekseNew flag in gcc 9.1 -Wsign-compareThe flag throws some warninings. Need to correct the thrown instances.
```
src/xerus/cholmod_wrapper.cpp:265:14: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsi...The flag throws some warninings. Need to correct the thrown instances.
```
src/xerus/cholmod_wrapper.cpp:265:14: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
265 | REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/xerus/misc/check.h:56:101: note: in definition of macro ‘XERUS_CHECK’
56 | #define XERUS_CHECK(condition, level, message) XERUS_REQUIRE_TEST; if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0)
| ^~~~~~~~~
include/xerus/misc/internal.h:36:19: note: in expansion of macro ‘XERUS_REQUIRE’
36 | #define REQUIRE XERUS_REQUIRE
| ^~~~~~~~~~~~~
src/xerus/cholmod_wrapper.cpp:265:3: note: in expansion of macro ‘REQUIRE’
265 | REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
| ^~~~~~~
src/xerus/cholmod_wrapper.cpp:265:55: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
265 | REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/xerus/misc/check.h:56:101: note: in definition of macro ‘XERUS_CHECK’
56 | #define XERUS_CHECK(condition, level, message) XERUS_REQUIRE_TEST; if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0)
| ^~~~~~~~~
include/xerus/misc/internal.h:36:19: note: in expansion of macro ‘XERUS_REQUIRE’
36 | #define REQUIRE XERUS_REQUIRE
| ^~~~~~~~~~~~~
src/xerus/cholmod_wrapper.cpp:265:3: note: in expansion of macro ‘REQUIRE’
265 | REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
| ^~~~~~~
src/xerus/cholmod_wrapper.cpp:265:103: warning: comparison of integer expressions of different signedness: ‘std::map<long unsigned int, double>::size_type’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
265 | REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/xerus/misc/check.h:56:101: note: in definition of macro ‘XERUS_CHECK’
56 | #define XERUS_CHECK(condition, level, message) XERUS_REQUIRE_TEST; if(XERUS_IS_LOGGING(level) && !(condition)) { XERUS_LOG(level, #condition " failed msg: " << message); } else void(0)
| ^~~~~~~~~
include/xerus/misc/internal.h:36:19: note: in expansion of macro ‘XERUS_REQUIRE’
36 | #define REQUIRE XERUS_REQUIRE
| ^~~~~~~~~~~~~
src/xerus/cholmod_wrapper.cpp:265:3: note: in expansion of macro ‘REQUIRE’
265 | REQUIRE(_m < std::numeric_limits<long>::max() && _n < std::numeric_limits<long>::max() && _A.size() < std::numeric_limits<long>::max(),
```https://git.hemio.de/xerus/xerus/-/issues/260deprecate Python 2.72019-06-18T16:46:30+02:00Philipp Trunschkedeprecate Python 2.7Python 2.7 will not be maintained past 2020.
We should consider stopping to maintain bindings and tests for old python versions.Python 2.7 will not be maintained past 2020.
We should consider stopping to maintain bindings and tests for old python versions.https://git.hemio.de/xerus/xerus/-/issues/259`HTNetwork::move core` does not work for networks of degree 12019-06-17T14:21:52+02:00Philipp Trunschke`HTNetwork::move core` does not work for networks of degree 1Version 4.0RoteKekseRoteKeksehttps://git.hemio.de/xerus/xerus/-/issues/258test pickling of random tensor networks2019-06-16T22:32:46+02:00Philipp Trunschketest pickling of random tensor networkshttps://git.hemio.de/xerus/xerus/-/issues/255misc functions for string_views2019-05-15T21:07:59+02:00Fuchsi*misc functions for string_views- `from_string`
- `explode`- `from_string`
- `explode`https://git.hemio.de/xerus/xerus/-/issues/252Getting "munmap_chunk(): invalid pointer" in test when compiled with mkl and ...2019-07-03T10:34:18+02:00lljbashGetting "munmap_chunk(): invalid pointer" in test when compiled with mkl and "Intel MKL ERROR: Parameter 10 was incorrect on entry to DGESDD" when computing SVD```
###############################################################################
# Unit Tests #
# Xerus version: v3.0.1-315-g47ed838 ...```
###############################################################################
# Unit Tests #
# Xerus version: v3.0.1-315-g47ed838 #
###############################################################################
-------------------------------------------------------------------------------
| ALS
|
| decomposition_als starting: *** Error in `./XerusTest': munmap_chunk(): invalid pointer: 0x00000000014d7000 ***
make: *** [test] Aborted
```
```
OS: ubuntu 14.04
mkl versoin: 2018
compiler: gcc-8 / icpc
```
linked as what Intel® Math Kernel Library Link Line Advisor suggests. Same on the master branch.
My program works well in the master branch in spite of this. However, on the development branch it gives me
```
Intel MKL ERROR: Parameter 10 was incorrect on entry to DGESDD.
terminate called after throwing an instance of 'xerus::misc::generic_error'
what(): src/xerus/blasLapackWrapper.cpp:227: error invoked:
info == 0 failed msg: work array size query of dgesdd returned -10
callstack:
[0x00007f12f47cc253 .text] /home/***/xerus/src/xerus/blasLapackWrapper.cpp:227 (inside xerus::blasWrapper::dgesdd_get_workarray_size(int, int))
[0x00007f12f47d0833 .text] /home/***/xerus/src/xerus/blasLapackWrapper.cpp:254 (inside xerus::blasWrapper::svd_destructive(double*, double*, double*, double*, unsigned long, unsigned long))
[0x00007f12f47d118b .text] /home/***/xerus/src/xerus/blasLapackWrapper.cpp:217 (inside xerus::blasWrapper::svd(double*, double*, double*, double const*, unsigned long, unsigned long))
[0x00007f12f487c42b .text] /home/***/xerus/src/xerus/tensor.cpp:1474 (inside xerus::calculate_svd(xerus::Tensor&, xerus::Tensor&, xerus::Tensor&, xerus::Tensor, unsigned long, unsigned long, double))
/* more */
exception thrown in function: dgesdd_get_workarray_size (src/xerus/blasLapackWrapper.cpp : 227)
```
which I believe is caused by 43371e43.https://git.hemio.de/xerus/xerus/-/issues/251Bug with fenics and mkl2019-04-10T15:29:08+02:00Philipp TrunschkeBug with fenics and mkl```
OS: openSUSE Leap 42.3
MKL Info:
Major version: 2019
Minor version: 0
Update version: 1
Product status: Product
Build: 20180928
Platform: Intel(R) 64 architectur...```
OS: openSUSE Leap 42.3
MKL Info:
Major version: 2019
Minor version: 0
Update version: 1
Product status: Product
Build: 20180928
Platform: Intel(R) 64 architecture
Processor optimization: Intel(R) Advanced Vector Extensions (Intel(R) AVX) enabled processors
================================================================
```
[Working example is attached.](/uploads/657409540901107570a60a2d1a340483/xerus___dolfin___libmkl___buggy.py)Version 4.0https://git.hemio.de/xerus/xerus/-/issues/244dropping support for GCC 4.8 and below2019-03-23T18:25:11+01:00Fuchsi*dropping support for GCC 4.8 and belowanother point of discussion:
- with commit 8d55ef3e I broke compatibility with GCC 4.8.1 and below (which will once again show an internal segfault during compilation) for better readability esp. of typedefs for function pointers. (this ...another point of discussion:
- with commit 8d55ef3e I broke compatibility with GCC 4.8.1 and below (which will once again show an internal segfault during compilation) for better readability esp. of typedefs for function pointers. (this could be circumvented by reverting the two using declarations inside the Tensor class)
- the warnings about deprecated function will only work with GCC >= 4.9
- GCC 4.9 was released 5 years ago next month. even debian oldstable uses it as the default - so the need to support even older compilers seems to be rather low imho.Version 4.0https://git.hemio.de/xerus/xerus/-/issues/243The runtime of unittests2019-04-05T01:21:15+02:00Sebastian WolfThe runtime of unittestsAs there were some complains about the runtime of the unit-tests by @example, we should probably discuss how to deal with those.
Personally I am fine with a runtime of ~5min, but this of course depends on hardware and style of working....As there were some complains about the runtime of the unit-tests by @example, we should probably discuss how to deal with those.
Personally I am fine with a runtime of ~5min, but this of course depends on hardware and style of working. Also using e.g. Valgrind increase the runtime to currently ~30min. Still I don't think we should remove working test-cases on which people spend time to implement just because they take time to run. So I would suggest to split the unit-tests in a "quick" and a "long" category such that people without time and/or without fast hardware can run a reduced subset of the tests (e.g. all unit test which typically require less than 0.5s)?Version Xhttps://git.hemio.de/xerus/xerus/-/issues/241indentation cleanup2019-03-24T04:17:06+01:00Fuchsi*indentation cleanupwe had consistently used tabs instead of spaces for indentation. It seems, that everyone using spaces wants them to act as tabs anyways and sets up the IDE to treat them as such. (eg. you never want to indent 3 instead of 4 spaces, so pr...we had consistently used tabs instead of spaces for indentation. It seems, that everyone using spaces wants them to act as tabs anyways and sets up the IDE to treat them as such. (eg. you never want to indent 3 instead of 4 spaces, so pressing backspace once you expect to remove all 4 spaces)
It seems this was (deliberately...) destroyed by commits like 1ce2f25a . I vote towards reverting this (and similar) commits.
If there is a good argument for spaces over tabs we can also have a vote over what should be used or similar, but i think we should have a uniform style in the code.
@trunschk @Baum @RoteKekseVersion 4.0https://git.hemio.de/xerus/xerus/-/issues/239Changelog update2019-03-20T12:24:01+01:00RoteKekseChangelog updateVersion 4.0https://git.hemio.de/xerus/xerus/-/issues/238Revisit Conda Build2019-06-19T09:35:22+02:00RoteKekseRevisit Conda BuildVersion 4.1RoteKekseRoteKeksehttps://git.hemio.de/xerus/xerus/-/issues/236Audit Docker2019-06-19T09:35:34+02:00RoteKekseAudit DockerVersion 4.1RoteKekseRoteKeksehttps://git.hemio.de/xerus/xerus/-/issues/233UQADF Documentation2019-03-20T11:44:37+01:00RoteKekseUQADF DocumentationVersion 4.0Philipp TrunschkePhilipp Trunschke