- changed status to open
- removed comment
Align memory allocation in PUGH
the attached patch optionally uses thorn vectors to query the vector size and aligns memory allocation to this size. This is needed for aligned reads and writes generated eg by Kranc generated thorns when Vectors is present.
Without the thorn present at build time, no alignment is performed. Failure to align results in segmentation faults at runtime.
Keyword: PUGH
Comments (11)
-
reporter -
- removed comment
Something (Vectors?) should check whether the memory is aligned and give a sensible error message if it should be and isn't.
-
- removed comment
For this to work, something else (PUGH?) needs to specify whether it provides memory that is aligned.
Currently, only the thorn using vectors have the full information, and could check the addresses of the grid functions it accesses for vector load/store operations.
-
- changed status to open
- removed comment
Please apply.
-
reporter - changed status to resolved
- removed comment
Applied as rev 524 of PUGH.
-
This seems to have broken the builds, see https://build.barrywardell.net/job/EinsteinToolkit/686/console
-
reporter - removed comment
Was missing a file (Vectors.cc), which I just added (rev 525). Comes from trying to be extra careful and applying precisely the patch that was in the ET trac systems and rather than the previously set up subversion state :-(. Is there a way to do a "svn patch <somepatch.patch" so that subversion learns about new files in a patch.
-
- removed comment
Yes:
svn patch FILE
From the documentation:
svn patch will apply unidiff changes to existing files just like third party patch tools. It will also add newly created files to version control, and delete files and directories which are left empty after patching.
Requires svn version 1.7 though...
-
reporter - removed comment
Alright. This ticket was even still open. I also misspelled vectors.h as Vectors.h in the C++ file. This only ever compiled because of an OPTIONAL_IFACTIVE Vectors in configuration.ccl. Question: if all I need of Vectors is its include file (and its CCTK_VECLENGTH define) but do not actually call any function in Vectors (ie pure compile time usage of Vectors), do I still need to REQUIRE (or equivalent) the thorn at runtime? If not then the OPTIONAL_IFACTIVE can be removed.
-
reporter - changed status to resolved
- removed comment
Removed OPTIONAL_IFACTIVE in revision 527 of PUGH.
-
reporter - edited description
- changed status to closed
- Log in to comment
Tested on my workstation (core i7 uses avx and a vector size of 4) and on queenbee. The C++ code is only present since vectors.h contains C++ code (namespace access).