Canonicalisation

61 views
Skip to first unread message

joergf

unread,
Aug 2, 2008, 5:08:38 AM8/2/08
to xAct Tensor Computer Algebra
Hi,

I am having some problems with the canonicalisation: I seem to
continuously run into the `invalid permutation' error. I attach an
example:

ToCanonical[Antisymmetrize[CD[-d][σ[-e, a]CD[b][ξ[c]]], {a, b,
c}]delta[d, -a] delta[e, -b], xPermVerbose -> True, MathLink -> True]

MathLinkCanonicalPerm:: \
\[InvisibleSpace]xAct`xPerm`Private`MLCanonicalPerm[{4, 1, 5, 2, 3, 6,
7}, 7, 1, {1, 2, 3, 4, 5}, {1, 2, 4, 3, 5, 6, 7}, {1}, {4}, {2, 3, 4,
5}, {1}, {}, {}]

TranslatePerm::invalid:
InversePerm[xAct`xPerm`Private`MLCanonicalPerm[{4, 1, \
5, 2, 3, 6, 7}, 7, 1, {1, 2, 3, 4, 5}, {1, 2, 4, 3, 5, 6, 7}, {1},
{4}, {2, \
3, 4, 5}, {1}, {}, \[LeftSkeleton]1\[RightSkeleton]]] is not a valid \
permutation.

Anyone have any ideas?

Cheers, Joerg

JMM

unread,
Aug 2, 2008, 11:52:43 AM8/2/08
to xAct Tensor Computer Algebra
Hi Joerg,

Most probably you have a problem in the MathLink connection to the
external C executable. You are calling this executable through the
private function MLCanonicalPerm, and I've checked that its input is
syntactically correct. It actually should return the permutation
Images[{2, 1, 3, 4, 5}]. However, the MLCanonicalPerm does not get
evaluated, and that means that the MathLink connection is broken, I
think.

To help you solving this we need additional information:

- Which operating system are you using?
- Mathematica version
- xPerm version (evaluate xAct`xPerm`$Version )
- The output of these two variables (after loading xAct):
$xpermQ (which will tell us whether xAct thinks there was a
successful connection or not)
$xpermExecutable (the executable to which xAct is trying to
link to)

The MathLink connection is usually smooth in Linux, but not always in
Windows or Mac. Sometimes the executable needs to be recompiled for
particular versions of the operating system. We can help you doing
that. See the page http://metric.iem.csic.es/Martin-Garcia/xAct/xPerm.html
for further comments on this.

Cheers,
Jose Maria.

joergf

unread,
Aug 2, 2008, 9:32:51 PM8/2/08
to xAct Tensor Computer Algebra
Hi Jose Maria,

thanks for the quick reply.

> Most probably you have a problem in the MathLink connection to the
> external C executable. You are calling this executable through the
> private function MLCanonicalPerm, and I've checked that its input is
> syntactically correct. It actually should return the permutation
> Images[{2, 1, 3, 4, 5}]. However, the MLCanonicalPerm does not get
> evaluated, and that means that the MathLink connection is broken, I
> think.
>
> To help you solving this we need additional information:
>
> - Which operating system are you using?
I am using Mac OS X 10.5
> - Mathematica version
5.2
> - xPerm version (evaluate xAct`xPerm`$Version )
1.0.1
It actually says that the connection to the external mac executable
was established.

> - The output of these two variables (after loading xAct):
>        $xpermQ  (which will tell us whether xAct thinks there was a
> successful connection or not)
True
>        $xpermExecutable (the executable to which xAct is trying to
> link to)
>
"/Library/Mathematica/Applications/xAct/xPerm/mathlink/xperm.mac"


Your remarks made me look at the executable. Even though Mathematica
seems to think that everything is okay, it really is not. The
executable is for the PowerPC while I need the Intel (or a universal)
executable. I tried to recompile the file with the instructions that
you gave me but then the preprocessor ran into an undefined symbol in
the mathlink.h header file because the appropriate symbol for intel
macs is not defined. I tried to find a newer version of mathlink.h on
the net but was unsuccessful. Maybe there is another way to produce
the appropriate file.

Would it help to upgrade to Mathematica 6.0?

Thanks for your help,
Joerg

JMM

unread,
Aug 2, 2008, 10:25:33 PM8/2/08
to xAct Tensor Computer Algebra
Hi again,

On Aug 2, 8:32 pm, joergf <joerg.frauendie...@gmail.com> wrote:

> I am using Mac OS X 10.5> - Mathematica version 5.2
> > - xPerm version (evaluate xAct`xPerm`$Version )
>
> 1.0.1
> It actually says that the connection to the external mac executable
> was established.

Yes, I have found this behaviour other times. Mathematica thinks the
connection has been established, but then it doesn't work.

> > - The output of these two variables (after loading xAct):
> > $xpermQ (which will tell us whether xAct thinks there was a
> > successful connection or not)
> True

This is the same information than the "Connection established" line at
the beginning.

> Your remarks made me look at the executable. Even though Mathematica
> seems to think that everything is okay, it really is not. The
> executable is for the PowerPC while I need the Intel (or a universal)
> executable.

Have you tried the executable compiled by Barry Wardell? See
discussion "xPerm MathLink on Mac OSX" on this group.
A Mathematica developer has also compiled a universal executable for
four different architectures, but also using Mathematica 6.0. I've
just uploaded it to the xPerm webpage. I don't know whether that will
work with your Mathematica 5.2. I would try to replace the standard
xperm.mac executable with any of those.

> Would it help to upgrade to Mathematica 6.0?

Those newer executables would work then, but I would like to have a
solution which also works under Mathematica 5.2. I'll ask the
Mathematica developers on Monday.

Cheers, Jose Maria.

joergf

unread,
Aug 3, 2008, 5:48:34 AM8/3/08
to xAct Tensor Computer Algebra
Hi Jose Maria,

> Have you tried the executable compiled by Barry Wardell? See
> discussion "xPerm MathLink on Mac OSX" on this group.
> A Mathematica developer has also compiled a universal executable for
> four different architectures, but also using Mathematica 6.0. I've
> just uploaded it to the xPerm webpage. I don't know whether that will
> work with your Mathematica 5.2. I would try to replace the standard
> xperm.mac executable with any of those.


I tried them. The universal executable did not work but the one from
Barry Wardell did. So this has solved my problem but maybe it is still
a general problem with the platform not being supported in mathlink.h?

Thanks very much for your quick replies,
Joerg

JMM

unread,
Aug 3, 2008, 11:38:00 AM8/3/08
to xAct Tensor Computer Algebra

> I tried them. The universal executable did not work but the one from
> Barry Wardell did. So this has solved my problem

Great news!

> but maybe it is still
> a general problem with the platform not being supported in mathlink.h?

Newer versions of MathLink support more platforms. Perhaps MathLink in
version 5.2 didn't support yours. I don't know. Note that Barry's
executable is using 6.0. There was a similar problem with Windows: it
was impossible to link to the external xperm.win executable via
MathLink before Mathematica 6.0, because the cygwin port of gcc wasn't
supported.

Cheers,
Jose Maria.
Reply all
Reply to author
Forward
0 new messages