Modify

Opened 4 years ago

Last modified 3 years ago

#1791 assigned enhancement

Allow aligning the interior of grid functions in looping macros

Reported by: Erik Schnetter Owned by: Erik Schnetter
Priority: minor Milestone:
Component: Cactus Version: development version
Keywords: Cc:

Description

Currently, when grid functions are aligned, Cactus expects their origin to be aligned. These changes update the looping macros to allow aligning the interior of grid functions instead.
Whether and how grid functions are aligned is still determined by the driver -- this only makes it possible to still use the looping macros in this case.

Implemented in <https://bitbucket.org/cactuscode/cactus/pull-request/16/allow-aligning-the-interior-of-grid/diff> and <https://bitbucket.org/cactuscode/cactustest/pull-request/1/allow-aligning-the-interior-of-grid/diff>.

Attachments (0)

Change History (6)

comment:1 Changed 4 years ago by Erik Schnetter

Status: newreview

comment:2 Changed 3 years ago by Roland Haas

Looks fine to me. In fact I like the new way of making sure the final offset is smaller than the stride

-        (bsnl ('    const int cctki0_ioff = ' . (sep '', rpt '[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' & (cctki0_istr-1);')),
+        (bsnl ('    const int cctki0_ioff0 = ' . (sep '', rpt '[I==1?(cctki0_imin:+cctki0_[C-1]ash*([C]]') . (sep '', rpt ')') . ' + cctki0_imod;')),
+        # TODO: Omit this when grid arrays are aligned
+        (bsnl '    const int cctki0_ioff = cctki0_ioff0 % cctki0_istr;'),

better than the previous one since it allows for strides that are not powers of 2 (though I doubt we'll ever encounter those).

One thing that had a me a bit confused is the name "_mod" used to designate the offset argument (and not a modulus).

Please apply.

comment:3 Changed 3 years ago by Roland Haas

Status: reviewreviewed_ok

comment:4 Changed 3 years ago by Frank Löffler

Resolution: fixed
Status: reviewed_okclosed

Merged.

comment:5 Changed 3 years ago by Frank Löffler

Resolution: fixed
Status: closedreopened

I had to revert f712bc6 (my bad for not trying the change beforehand) and believing the review.

The problem is that TestLoopCXXVectorized uses an un-pushed (?) macro CCTK_LOOP3STRMOD_ALL, and thus, fails to build.

https://bitbucket.org/cactuscode/cactustest/commits/all
https://build.barrywardell.net/job/EinsteinToolkit/815/console

comment:6 Changed 3 years ago by Frank Löffler

Owner: set to Erik Schnetter
Status: reopenedassigned

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Erik Schnetter.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from Erik Schnetter to the specified user.
The owner will be changed from Erik Schnetter to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.