Re: [eigen] Bug report on Tensor |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Bug report on Tensor*From*: Mathieu Dutour <mathieu.dutour@xxxxxxxxx>*Date*: Thu, 28 Jan 2016 09:22:14 +0100*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rt8hgqk+3LW+EzfnRWxk7B73SolA80ijPcoV+HcX260=; b=m3s1o56as/INTWZBdNQz+HZcyhRKTx6SZ6YZvQOU3PY5zmtuNf70XFgCXA+0y7iFf0 +E2kmKgQV30YK7R0JgWIUTJ880r/0stKKi/GBdXTUa1ivQrfEzORKu/wJCCwxoFZ+LRi nm/zfZzZ5ST+v8yoLqwv+6s9v/tswOCFmkSKwF80rrSVhQBv+sYXaUirWfc1TH7E9gMM 3MADvJayLEO98k85y0s453oxO4djy6WWv64Hs7ClzxnZfHjr25lVHd5x1ZJSzEzNRI+1 r+4VQW+Yt0yIpbCZJu6a7cPNy3DeSPiXB01AXQYJj2OiqKCxBJDV0H7tsJkOZvPzb01S Qpyw==

Thank you.

That was it, now it runs !

Mathieu

On Thu, Jan 28, 2016 at 2:12 AM, Benoit Steiner <benoit.steiner.goog@xxxxxxxxx> wrote:

The assertion that caused the crash is in fact unnecessary. I deleted it and added a test to make sure that you can you the assignment operator on empty tensors. Let me know if the fix works for you, its available in commit https://bitbucket.org/eigen/eigen/commits/53c33c0e87d4db617eaf2b1f0e040c6bafd95089--On Wed, Jan 27, 2016 at 11:51 AM, Mathieu Dutour <mathieu.dutour@xxxxxxxxx> wrote:Hi all,I had a problem with the Eigen::Tensor<double,3>.The segmentation fault happens exactly when I ammoving data from one function to another.That is I have astruct RecVar {... some double... some std::string... some int... some Eigen::MatrixEigen::Tensor<double,3> Tens3;};When returning the value, we have Tens3 which is unset.Error that happens isMERGE_field: /home/mathieu/opt/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:108: void Eigen::Tensor\Storage<T, Eigen::DSizes<IndexType, NumIndices_>, Options_>::resize(Eigen::TensorStorage<T, Eigen::DSizes<IndexType, NumIndices_>, Options_>::Index, Eigen::array<IndexType, NumIndices_>&) [with T = double; int Options_ = 0; IndexType = long int; int NumIndices_ = 3; Eigen::TensorStorage<T, Eigen::DSizes<IndexType, NumIndices_>, Options_>::Index = long int; Eigen::array<IndexType, NumIndices_> = std::array<long int, 3ul>]: Assertion `size >= 1' failed.The backtrack with gdb gives me the error as#0 0x00000038eb232625 in raise () from /lib64/libc.so.6#1 0x00000038eb233e05 in abort () from /lib64/libc.so.6#2 0x00000038eb22b74e in __assert_fail_base () from /lib64/libc.so.6#3 0x00000038eb22b810 in __assert_fail () from /lib64/libc.so.6#4 0x000000000046841e in Eigen::Tensor<double, 3, 0, long>::operator=(Eigen::Tensor<double, 3, 0, long> const&) () at /home/mathieu/opt/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:108#5 0x0000000000468605 in RecVar::operator=(RecVar&&) () at Basic_Ocean_types.h:12So, it seems a move operator makes assumptions which are not correct,though I am not sure. The move operator is the one provided by the compilerto RecVar which is a POD.All hints on how to solve it would be appreciated. In particular I am interestedin writing some operator /= for the tensor class just like we have for the matrixclass.Error happens with gcc 5.1.0 and with gcc 5.3.0. I know it is unsupported,still any help would be much appreciated.Mathieu

**References**:**[eigen] Bug report on Tensor***From:*Mathieu Dutour

**Re: [eigen] Bug report on Tensor***From:*Benoit Steiner

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Bug report on Tensor** - Next by Date:
**Re: [eigen] Eigen warning.** - Previous by thread:
**Re: [eigen] Bug report on Tensor** - Next by thread:
**[eigen] modifying the colPivotQR function**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |