Closed Bbllaaddee closed 7 months ago
That is a memory alignment issue. Define FASTOR_DONT_ALIGN
and rerun your example. The macro does not impact performance and was designed specifically for this purpose.
Thanks!
Should it be put in wiki or somewhere, what do you think? Might be useful to have a page of macros user can define and what they do
There is a better solution for this that should come pretty soon. Meanwhile I'll have this documented as it's essentially a bug.
Thanks for reporting
Is there already a solution for this issue? Currently, working with TensorMaps can be tedious due to those SEGFAULTs.
Yes, the feature is now finally implemented via 652972f. The new implemented feature helps us distinguish between aligned and unaligned data during TensorMap construction and hence avoid segfaults. This is a new feature so if any new issue arises as a result, please report. I am closing this one.
Thank you for your patience!
TLDR: segfault without
-march=native
ong++
Hello, it's me again!
I was working with my program, while suddenly it stopped working with strange
Segmentation fault
. I thought that this was the problem on my part with something like trying to access illegal memory address. So, after some primitive tests, I invokedvalgrind
, and saw, that the error comes from Fastor for some odd reason.Here is the simple program that imitates what I do:
This program compiles with any options. I usually compile with
g++ ... -march=native ...
. But in this case it was turned off, and that (!) was the origin of the error.So, if I compile it with arch specified, all goes well. Without it, it gives segfault.
I can see the proper error with the following compilation flags:
g++ -std=c++17 -Og -g main.cpp
. Output ofvalgrind ./a.out
:Tested with
g++-9
,g++-10
andclang++-10
.