[Users] Code failure apparently due to changes in Reduction.c

Roland Haas rhaas at illinois.edu
Tue Aug 17 11:59:58 CDT 2021


Hello Yosef,

there's a couple different reduction interfaces and the handle you get
must match.

It depends a bit on the drive you are using.

Carpet only supports the "old style" reduction interface that uses:

CCTK_Reduce
CCTK_ReductionHandle

CCTK_ReduceLocalScalar
CCTK_ReductionArrayHandle
and:
CCTK_ReduceArray
CCTK_ReduceLocalArray1D

it does not support the new interface CCTK_LocalArrayReductionHandle at
all.

PUGH supports the new one and (I think) the old one as well. The new
one uses:

CTK_LocalArrayReductionHandle
CCTK_ReduceLocalArrays

See
https://www.einsteintoolkit.org/referencemanual/ReferenceManual.html#x1-1000A and search for A488.

So are you using this with PUGH or Carpet? With Carpet it must fail (not
supported at all), with PUGH it should work as long as you sue the
correct set of calls ie CCTK_LocalArrayReductionHandle +
CCTK_ReduceLocalArrays (for PUGH only).

Yours,
Roland

> Hi,
> 
>   A code that we are using seems to no longer work with Cactus. The 
> issue seems to be that the code called CCTK_LocalArrayReductionHandle. 
> The code, as checked out, produces errors because the appropriate handle 
> isn't found. If I modify the function as below,  I no longer get the 
> error message
> 
> 
> 
> int CCTK_LocalArrayReductionHandle(const char *reduction)
> {
>    int handle;
> 
> 
>    handle = Util_GetHandle(LocalArrayReductionOperators, reduction, NULL);
>    if (handle < 0)
>    {
>      CCTK_VWarn(1,__LINE__,__FILE__,"Cactus",
>                 "CCTK_LocalArrayReductionHandle: No handle: '%d' found 
> for reduction operator "
>                 "'%s'", handle, reduction);
>    }
> 
>    handle += ARRAY_OPERATOR_HANDLE_OFFSET; //// MY changes
> 
>    return handle;
> }
> 
> 
> Should we no longer use CCTK_LocalArrayReductionHandle?
> 



-- 
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu .

-- 
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20210817/b62d5feb/attachment.bin 


More information about the Users mailing list