#1411: Align memory allocation in PUGH --------------------+------------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: major | Milestone: Component: Cactus | Version: development version Keywords: 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.
#1411: Align memory allocation in PUGH ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH ---------------------+------------------------------------------------------ Changes (by rhaas):
* status: new => review
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).
#1411: Align memory allocation in PUGH ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH ---------------------+------------------------------------------------------
Comment (by hinder):
Something (Vectors?) should check whether the memory is aligned and give a sensible error message if it should be and isn't.
#1411: Align memory allocation in PUGH ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: review Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH ---------------------+------------------------------------------------------
Comment (by eschnett):
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.
#1411: Align memory allocation in PUGH ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: reviewed_ok Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH ---------------------+------------------------------------------------------ Changes (by eschnett):
* status: review => reviewed_ok
Comment:
Please apply.
#1411: Align memory allocation in PUGH ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: closed Priority: major | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: PUGH ---------------------+------------------------------------------------------ Changes (by rhaas):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Applied as rev 524 of PUGH.
#1411: Align memory allocation in PUGH -----------------------+---------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: reopened Priority: critical | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH -----------------------+---------------------------------------------------- Changes (by knarf):
* priority: major => critical * status: closed => reopened * resolution: fixed =>
Comment:
This seems to have broken the builds, see https://build.barrywardell.net/job/EinsteinToolkit/686/console
#1411: Align memory allocation in PUGH -----------------------+---------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: reopened Priority: critical | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH -----------------------+----------------------------------------------------
Comment (by rhaas):
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.
#1411: Align memory allocation in PUGH -----------------------+---------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: reopened Priority: critical | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH -----------------------+----------------------------------------------------
Comment (by knarf):
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...
#1411: Align memory allocation in PUGH -----------------------+---------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: reopened Priority: critical | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: PUGH -----------------------+----------------------------------------------------
Comment (by rhaas):
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.
#1411: Align memory allocation in PUGH -----------------------+---------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: closed Priority: critical | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: PUGH -----------------------+---------------------------------------------------- Changes (by rhaas):
* status: reopened => closed * resolution: => fixed
Comment:
Removed OPTIONAL_IFACTIVE in revision 527 of PUGH.
trac@lists.einsteintoolkit.org