ToCanonical fails in Mathematica 10 with version 1.1.0 of xTensor

432 views
Skip to first unread message

mcnees

unread,
Jul 14, 2014, 11:17:39 AM7/14/14
to xa...@googlegroups.com
In Mathematica 10, the "ToCanonical" command seems to fail with the errors:

   TranslatePerm::invalid: InversePerm[$Failed] is not a valid permutation.
   Throw::nocatch: Uncaught Throw[Null] returned to top level. >>

I am attaching a minimal example where I define a manifold, define tensors with or without symmetries, and try to apply ToCanonical to the tensors. I will continue to look into this, but I'm posting it here since others seem to be much faster than me when it comes to tracking down these sorts of problems. Also, I know Mathematica 10 is brand new, and there are bound to be incompatibilities.

(This is on a Mac. I don't think the specific configuration is relevant.)

Best,
Bob


MinimalExample.nb

Leo Stein

unread,
Jul 14, 2014, 11:33:44 AM7/14/14
to mcnees, xAct Tensor Computer Algebra
Hi Bob,
I can confirm that this is happening, and I found that it is a problem with MathLink. Temporarily you can turn it off and use the Mathematica implementation of all the group theory algorithms by setting the Option MathLink to False, e.g.
  SetOptions[CanonicalPerm,MathLink->False]
This must be set for CanonicalPerm, SchreierSims and Orbit. It's actually easier to just lie to xPerm and tell it that it failed to make the MathLink connection via
  $xpermQ = False.

As for the underlying cause, somebody with more knowledge about MathLink needs to investigate.

Best
Leo


--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alfonso García-Parrado Gómez-Lobo

unread,
Jul 15, 2014, 3:58:23 AM7/15/14
to Leo Stein, mcnees, xAct Tensor Computer Algebra
Hi,

I am running Mathematica 10 under Linux and I did not experience any
problem when I ran bob's notebook. We already know that the problem
happens with a Mac (Leo, you also did your test with a Mac, didn't
you?). Did anyone running Mathematica 10 under Windows have a similar
problem ? Thank you.

Alfonso.

Thomas Bäckdahl

unread,
Jul 15, 2014, 10:41:49 AM7/15/14
to xa...@googlegroups.com
Hi!

Can someone with a Mac and Mathematica 10 try to recompile the external
xperm executable and see if that solves the problem?
You can find a description on basically how to do it on a linux like
system in a reply to the google groups thread with the heading
"problems running xact in linux" from Jose 2010-11-04.

Regards
Thomas

Leo Stein

unread,
Jul 15, 2014, 11:37:37 AM7/15/14
to Thomas Bäckdahl, xAct Tensor Computer Algebra
Dear all,

Alfonso: yes, sorry, I forgot to mention that. I am running on Mac OS X 10.9.4.

Thomas: I have tried to compile with Mathematica's mcc, which is just a wrapper for the system compiler. On Mac OS X the system compiler is now clang, not gcc. I'm not sure if the default has changed at some point in the past, but clang complains when trying to compile xperm.c:

./xperm.c:1774:7: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
                int L[n];       /* We assume that elements of L cannot
and three similar errors about ALPHA.s, ALPHA.d, ALPHA.o;
./xperm.c:1798:52: error: function definition is not allowed here
        void TAB(int *L, int Ll, int *s1, int *d1, int n) {
 
./xperm.c:2011:7: warning: implicit declaration of function 'F1' is invalid in C99 [-Wimplicit-function-declaration]
                F1(ALPHA[c].L, ALPHA[c].Ll, g, IMAGES, &IMAGESl, n);
 and two similar errors about the functions F2 and consistency.

Can anybody else on Mac OS X with Mma 10 compile?
I can try to fix these errors, but no guarantees ...

Best
Leo


         it, send an email to xact+unsubscribe@googlegroups.com.

         For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+unsubscribe@googlegroups.com.

Jose

unread,
Jul 15, 2014, 11:55:11 AM7/15/14
to xa...@googlegroups.com
Hi everybody,

There will be soon an updated version of xAct, but I was waiting to see whether there are more problems reported.

This is a recompiled version of xperm.mac for v10:


Please, let me know if this solves the issue.

Cheers,
Jose.

Leo Stein

unread,
Jul 15, 2014, 12:13:50 PM7/15/14
to Jose, xAct Tensor Computer Algebra
Hi Jose,

Thanks so much for re-compiling. This executable works for me.

You have to remember to chmod the file to have the executable bit set in order for MathLink to work:
  leo@lightcone:~/path/to/xAct/xPerm/mathlink (master)> mv ~/Downloads/xperm.mac .
  leo@lightcone:~/path/to/xAct/xPerm/mathlink (master)> chmod +x xperm.mac

Best
Leo

--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.

Leo Stein

unread,
Jul 15, 2014, 12:16:36 PM7/15/14
to Jose, xAct Tensor Computer Algebra
PS I almost forgot ... the previous version of xperm.mac I had was for architecture i386, and this one is x86_64 (64-bit only). I don't know if this will affect anybody.

Werner Hoelzl

unread,
Jul 15, 2014, 12:42:39 PM7/15/14
to xa...@googlegroups.com, leo....@gmail.com, mcn...@gmail.com
Hi,

I tried to compile xperm.tm on Scientific Linux 6.5 (RHEL clone):

$ mcc xperm.tm -o xperm.linux.64-bit

/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4.so: undefined reference to `uuid_parse'
/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4.so: undefined reference to `uuid_generate'
/usr/local/Wolfram/Mathematica/10.0/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4.so: undefined reference to `uuid_unparse_upper'
collect2: ld returned 1 exit status

Werner.

mcnees

unread,
Jul 15, 2014, 4:16:30 PM7/15/14
to xa...@googlegroups.com
Hi Jose,

Thanks for the updated executable. I ran into the same problems as Leo when I tried to compile it.

Best,
Bob

Francesco Sannino

unread,
Aug 21, 2014, 8:10:20 PM8/21/14
to xa...@googlegroups.com
Hi Jose, 

I installed today xAct and I had the same problem with ToCanonical. Do you know when the new version will be available for Mac + Mathematica 10? 

Thanks,
Francesco

Thomas Bäckdahl

unread,
Aug 22, 2014, 4:13:46 AM8/22/14
to xa...@googlegroups.com
Hi Francesco

Did you try the file

http://www.xact.es/xPerm/mathlink/xperm.mac

this should replace the file in xAct\xPerm\mathlink.

If this did not work, please provide us with more information on what is happening.

We are working on a new release of xAct that fixes this problem along with a number of other things, but as am not in charge of that I can not say when we will have it finished. Perhaps we will even get a new version of the xperm executable that resolves an old issue that all expressions are not canonicalized in the best possible way.
However, if there are urgent issues -- please let us know.
I know of an issue with SymManipulator -- a name conflict with SubsetQ that is now defined in Mathematica 10. This is easy to fix so if someone needs the fix -- please let me know.

Regards
Thomas
--

Martin Einhorn

unread,
Oct 3, 2014, 8:07:04 PM10/3/14
to xa...@googlegroups.com, mcn...@gmail.com
Thanks for this post.  I've also run into this problem.

-Marty

Thomas Bäckdahl

unread,
Oct 4, 2014, 1:38:27 AM10/4/14
to xa...@googlegroups.com
Hi Marty,

are you using the latest xAct release 1.1.1 from 28 September?

If you are, and still get this problem, please tell us if you are using a mac, linux or windows machine, and check that the xAct/xPerm/mathlink files where updated.

Regards
Thomas

Ghazal G

unread,
Oct 23, 2014, 4:43:47 PM10/23/14
to xa...@googlegroups.com
Was this problem finally resolved? I have just installed this packages and am running to this problem. I tried the latest version of xAct and I did try replacing xperm.mac and didn't help. 
Reply all
Reply to author
Forward
0 new messages