[Users] McLachlan code generation working in current stable ET release?

Bernard Kelly physicsbeany at gmail.com
Wed Feb 24 15:46:57 CST 2021


Aha! Thanks Roland. I'm composing a ticket on the Kranc GitHub now.

Bernard

On Wed, 24 Feb 2021 at 15:25, Roland Haas <rhaas at illinois.edu> wrote:

> Hello Bernard, all,
>
> the failure is due to a change in ValueQ:
>
> https://reference.wolfram.com/language/ref/ValueQ.html
>
> which was updated in 12.2 (see "Details") and old behaviour would be
> restored by using ValueQ[_, Method->"Legacy"] but I have no clue of
> what that would mean.
>
> The failure goes away if one patches Kranc (though the issue may exist
> in other places as well, ValueQ seems pretty basic functionality to me):
>
> diff --git a/Tools/CodeGen/TensorTools.m b/Tools/CodeGen/TensorTools.m
> index 9e53a0a..1f17b35 100644
> --- a/Tools/CodeGen/TensorTools.m
> +++ b/Tools/CodeGen/TensorTools.m
> @@ -301,7 +301,7 @@ DefineTensor[T_] :=
>        Module[
>          {c},
>          c = tensorCharacter[{is}];
> -        If[!ValueQ[TensorCharacter[T]],
> +        If[!ValueQ[TensorCharacter[T], Method -> "Legacy"],
>             TensorCharacter[T] = c,
>             (* else *)
>             If[!charactersMatch[c,TensorCharacter[T]],
>
> Best to report this on the Kranc issue tracker
> https://github.com/ianhinder/Kranc/issues I'd say.
>
> Note that "Method -> Legacy" probably *breaks* on older MMA versions
> (where the option may not yet exist) so is not a fix we can apply to
> Kranc in that case.
>
> Yours,
> Roland
>
> > Hello Bernard,
> >
> > yes, fails for me with MMA 12.2.0 as well:
> >
> > $ make McLachlan_BSSN.out
> > rm -rf ML_BSSN ML_BSSN_Helper
> > env ML_CODE=BSSN ./runmath.sh McLachlan_BSSN.m McLachlan_BSSN
> > Using Kranc installation at ../../../repos/Kranc/Bin/..
> > Mathematica 12.2.0 Kernel for Linux x86 (64-bit)
> > Copyright 1988-2020 Wolfram Research, Inc.
> > Profiling disabled
> >
> > MapThread::mptd: Object TensorTools`Private`TensorCharacter[dir] at
> position {2, 2} in MapThread[NumberQ[#1] || NumberQ[#2] || #1 === #2 & ,
> {{u}, TensorTools`Private`TensorCharacter[dir]}] has only 0 of required 1
> dimensions.
> >
> > MapThread::mptd: Object TensorTools`Private`TensorCharacter[epsdiss] at
> position {2, 2} in MapThread[NumberQ[#1] || NumberQ[#2] || #1 === #2 & ,
> {{u}, TensorTools`Private`TensorCharacter[epsdiss]}] has only 0 of required
> 1 dimensions.
> >
> > Riffle::list: List expected at position 1 in
> Riffle[TensorTools`Private`TensorCharacter[gt], ,].
> >
> > StringJoin::string: String expected at position 1 in
> StringJoin[Riffle[TensorTools`Private`TensorCharacter[gt], ,]].
> >
> > StringJoin::string: String expected at position 2 in Tensor indices in
> gt[la,lb] do not match those used previously:
> gt[<>Riffle[TensorTools`Private`TensorCharacter[gt], ,]<>].
> > Error:
> > StringJoin["Tensor indices in gt[la,lb] do not match those used
> previously: gt[", Riffle[TensorTools`Private`TensorCharacter[gt], ","], "]"]
> > make: *** [Makefile:17: McLachlan_BSSN.out] Error 1
> >
> > Yours,
> > Roland
> >
> > > Hello Bernard,
> > >
> > > > Hi. I'm trying to regenerate the McLachlan ML_BSSN thorn by running
> the
> > > > Mathematica-based scripts on my Macbook. The process is failing, and
> I'd
> > > > like to know if it's an issue with my Mathematica installation or the
> > > > McLachlan code?
> > > Being the person who last regenerated McLachlan for the last ET
> > > release: I just gave this a try with 12.0.0 on Linux and there at least
> > >
> > > env ML_CODE=BSSN ./runmath.sh McLachlan_BSSN.m McLachlan_BSSN
> > >
> > > works.
> > >
> > > I will update to 12.2.1 and see what happens. If that fails then at
> > > least we know that we can check Wolframs docs do see what they
> > > functionality they removed to make this fail.
> > >
> > > Yours,
> > > Roland
> > >
> >
> >
>
>
> --
> 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 .
>


-- 
------------------------------------------------------------------
Bernard Kelly -- CRESST Assistant Research Scientist, NASA/GSFC
Gravitational Astrophysics Laboratory --- Code 663

Phone: +1 (301) 286-7243 *** Fax: +1 (301) 286-2226
Web: http://science.gsfc.nasa.gov/sed/bio/bernard.j.kelly
ORCID: orcid.org/0000-0002-3326-4454
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20210224/d9c8ba97/attachment-0001.html 


More information about the Users mailing list