[Users] cctk_ash versus cctk_lsh

Erik Schnetter schnetter at cct.lsu.edu
Tue Oct 21 09:38:41 CDT 2014


Yosef


At the moment the linear index 0 corresponds to the 3D index (0,0,0).
This may change in the future, though. The idea is to have the first
interior grid point at an aligned location instead of the first ghost
point, and it is not clear yet whether this requires padding at the
origin, or whether one can simply adjust the GF pointer to do so. This
depends on how clever compiler optimizers are.

-erik

On Tue, Oct 21, 2014 at 10:24 AM, Yosef Zlochower <yosef at astro.rit.edu> wrote:
>
>
> On 10/21/2014 10:22 AM, Erik Schnetter wrote:
>>
>> Yosef
>>
>> Yes, I accidentally pointed you to a previous implementation that
>> should have been deleted. cacheinfo.cc is the right file to modify.
>>
>> I assume that you are seeing problems because there is some code that
>> still looks at lsh instead of at lsh, probably some boundary condition
>> related code. We will need to debug.
>
>
> Thanks for the help. I'll continue to debug.
>
> One other question. Can I assume that index 0 of a GF
> corresponds to CCTK_GFINDEX3D(cctkGH, 0, 0, 0)?
>
>
>
>>
>> -erik
>>
>>
>> On Tue, Oct 21, 2014 at 10:02 AM, Yosef Zlochower <yosef at astro.rit.edu>
>> wrote:
>>>
>>> On 10/21/2014 09:39 AM, Erik Schnetter wrote:
>>>>
>>>>
>>>> Yes, if VECTORISE_ALIGNED_ARRAYS=no (which is the default), then ash
>>>> will be identical to lsh.
>>>>
>>>> No, there is currently no way to enforce this, although this would be
>>>> very good to have for debugging.
>>>>
>>>> The respective code is in CarpetLib's gdata.cc, bracketed by #if
>>>> VECTORISE && VECTORISE_ALIGNED_ARRAYS. To test, you could artificially
>>>> add 1 to shape[0] after the line that modifies shape[0].
>>>>
>>>
>>> The above code in gdata.cc seems to be commented out by an #if 0
>>>
>>>
>>>
>>> I tried modifying cacheinfo.cc as follows
>>>
>>> diff --git a/Carpet/CarpetLib/src/cacheinfo.cc
>>> b/Carpet/CarpetLib/src/cacheinfo.
>>> index c6b33b1..8a68859 100644
>>> --- a/Carpet/CarpetLib/src/cacheinfo.cc
>>> +++ b/Carpet/CarpetLib/src/cacheinfo.cc
>>> @@ -121,8 +121,9 @@ pad_shape(vect<int,D> const& shape)
>>>       }   // if pad_to_cachelines
>>>   #endif
>>>
>>> -    padded_shape[d] = npoints;
>>> -    accumulated_npoints *= npoints;
>>> +#define TEST_PAD 1
>>> +    padded_shape[d] = npoints + TEST_PAD*(d==0);
>>> +    accumulated_npoints *= npoints + TEST_PAD*(d==0);
>>>     }
>>>     assert(prod(padded_shape) == accumulated_npoints);
>>>
>>> This seemed to add padding, but I'm still trying to debug why
>>> the result of the test is that for timesteps 1, I get the
>>> same results as for no padding, but on timestep 2, I get that
>>> every other point in the buffer zone is modified by a small
>>> amount (but larger than roundoff), while at iteration
>>> 4 nans appear on the symmetry boundary.
>>>
>>>
>>>
>>>> -erik
>>>>
>>>> On Tue, Oct 21, 2014 at 8:59 AM, Yosef Zlochower <yosef at astro.rit.edu>
>>>> wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>>      Is it the case that cctk_ash[i] = cctk_lsh[i] (i=0..3)
>>>>> if  VECTORISE_ALIGNED_ARRAYS= no? I want to update and
>>>>> test  a code that assumed the GF sizes were
>>>>> given by cctk_lsh. Is there a way to force
>>>>> cctk_ash to be larger than cctk_lsh in order
>>>>> to test the update.
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
>>>>> Dr. Yosef Zlochower
>>>>> Center for Computational Relativity and Gravitation
>>>>> Associate Professor
>>>>> School of Mathematical Sciences
>>>>> Rochester Institute of Technology
>>>>> 85 Lomb Memorial Drive
>>>>> Rochester, NY 14623
>>>>>
>>>>> Office:74-2067
>>>>> Phone: +1 585-475-6103
>>>>>
>>>>> yosef at astro.rit.edu
>>>>>
>>>>> CONFIDENTIALITY NOTE: The information transmitted, including
>>>>> attachments, is intended only for the person(s) or entity to which it
>>>>> is addressed and may contain confidential and/or privileged material.
>>>>> Any review, retransmission, dissemination or other use of, or taking
>>>>> of any action in reliance upon this information by persons or entities
>>>>> other than the intended recipient is prohibited. If you received this
>>>>> in error, please contact the sender and destroy any copies of this
>>>>> information.
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at einsteintoolkit.org
>>>>> http://lists.einsteintoolkit.org/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dr. Yosef Zlochower
>>> Center for Computational Relativity and Gravitation
>>> Associate Professor
>>> School of Mathematical Sciences
>>> Rochester Institute of Technology
>>> 85 Lomb Memorial Drive
>>> Rochester, NY 14623
>>>
>>> Office:74-2067
>>> Phone: +1 585-475-6103
>>>
>>> yosef at astro.rit.edu
>>>
>>> CONFIDENTIALITY NOTE: The information transmitted, including
>>> attachments, is intended only for the person(s) or entity to which it
>>> is addressed and may contain confidential and/or privileged material.
>>> Any review, retransmission, dissemination or other use of, or taking
>>> of any action in reliance upon this information by persons or entities
>>> other than the intended recipient is prohibited. If you received this
>>> in error, please contact the sender and destroy any copies of this
>>> information.
>>
>>
>>
>>
>
>
> --
> Dr. Yosef Zlochower
> Center for Computational Relativity and Gravitation
> Associate Professor
> School of Mathematical Sciences
> Rochester Institute of Technology
> 85 Lomb Memorial Drive
> Rochester, NY 14623
>
> Office:74-2067
> Phone: +1 585-475-6103
>
> yosef at astro.rit.edu
>
> CONFIDENTIALITY NOTE: The information transmitted, including
> attachments, is intended only for the person(s) or entity to which it
> is addressed and may contain confidential and/or privileged material.
> Any review, retransmission, dissemination or other use of, or taking
> of any action in reliance upon this information by persons or entities
> other than the intended recipient is prohibited. If you received this
> in error, please contact the sender and destroy any copies of this
> information.



-- 
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/


More information about the Users mailing list