xPerm problem Windows Mathematica 12.2

565 views
Skip to first unread message

Thomas Bäckdahl

unread,
Dec 20, 2020, 5:32:48 AM12/20/20
to xa...@googlegroups.com
Hi!

Unfortunately the xPerm executable fails on Mathematica 12.2 under Windows.

If you are upgrading from version 12.1 a temporary fix is to take the file
C:\Program Files\Wolfram
Research\Mathematica\12.1\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\SystemAdditions\ml64i3.dll
from the old installation and place somewhere where the new version can
find it. One place would be
C:\Users\WhateverYourUsernameIs\AppData\Roaming\Mathematica\Applications\xAct\xPerm\mathlink

I don't know what is the best long terms solution. Recompiling the
executable or adding the dll file to the distribution.

Regards
Thomas

Calvin Chen

unread,
Dec 26, 2020, 12:21:45 PM12/26/20
to xAct Tensor Computer Algebra
Hi!

I think I am having the same issue, but your temporary fix didn't work for me - I only have version 12.0 and couldn't find those files. Is there any chance you could help me?

Specifically, when I load the package, I get an error message saying "The code execution cannot proceed because ML64i4.dll was not found" and mathematica gets stuck on "Connecting to external MinGW executable...". When I abort and re-run the line, it usually works. However, then running ToCanonical always gives me an error, so from other posts in this group, I'm guessing it has to do with xPerm and MathLink?

Any advice would be greatly appreciated!

Best,

Calvin

Thomas Bäckdahl

unread,
Dec 27, 2020, 6:41:43 AM12/27/20
to xa...@googlegroups.com
Hi!

It is a bit strange that it looks for ml64i4.dll instead of ml64i3.dll, but they do the same thing and on Mathematica 12.0 both should be available.

Can you type
$Path
in Mathematica and tell us the result?
With a complete Mathematica installation you should be able to find at least one of ml64i4.dll or ml64i3.dll in one of the listed folders in $Path or a sub-folder.

I think that the latest version of xperm.win64 built 2014-09-24 from the xact.es cite should link to ml64i3.dll.

I hope that Jose can add the dll file to the distribution to make xAct less version dependent.

Regards
Thomas
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/xact/73081329-5ee2-440c-85f5-e39a6c6becf4n%40googlegroups.com.

Thomas Bäckdahl

unread,
Jan 20, 2021, 6:27:41 AM1/20/21
to xa...@googlegroups.com
Hi!

I finally figured out how to compile the external xPerm executable under Windows 10 and Mathematica 12.2.
Wolfram changed a number of things in the MathLink compiler addition files since the last compilation, so it became a little bit more difficult.

If you would like to try it yourself, which I hope you don't need to, you can try the following.
1) Download and install the mingw-64 compiler. I used the x86_64, win32, seh, rt_v6, rev0 settings during installation, but you can probably try other settings.
2) Make a make_xperm.bat file with the content with appropriate version numbers and directories
"
@Echo off
set mingwVer=8.1.0
set mmaVer=12.2
set GccBinDir="C:\Program Files\mingw-w64\x86_64-%mingwVer%-win32-seh-rt_v6-rev0\mingw64\bin"
set mldev64Dir="C:\Program Files\Wolfram Research\Mathematica\%mmaVer%\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\CompilerAdditions"
set ml64Ver=4
set mllibName=ml64i%ml64Ver%

If Not Exist %mllibName%n.lib (Echo %mllibName%n.lib not found. Creating it... && %GccBinDir%\gendef %mldev64Dir%\..\SystemAdditions\%mllibName%.dll && %GccBinDir%\dlltool.exe --as-flags=--64 -m i386:x86-64 -k --input-def %mllibName%.def --output-lib %mllibName%n.lib&& del %mllibName%.def)

Echo Running mprep...
%mldev64Dir%\mprep -o xpermtm.c xperm.tm

Echo Compiling...
%GccBinDir%\gcc -c -O3 -static-libgcc -include "stdint.h" -I%mldev64Dir% xpermtm.c

Echo Linking...
%GccBinDir%\gcc -mwindows -O3 -I%mldev64Dir% xpermtm.o -L%CD% -l%mllibName%n -o xperm.win64

Echo Removing temporary files...
del xpermtm.o
del xpermtm.c

"
3) Place the file in the same folder as xperm.c i.e. \xAct\xPerm\mathlink, and execute the bat file.

The new compiled executables should be available from xact.es soon, so most users should not need to compile them, but I wanted to post this for future reference.

Regards
Thomas

Emmanuel T

unread,
Feb 20, 2021, 4:50:00 PM2/20/21
to xAct Tensor Computer Algebra
Hi Thomas,

when I tried executing the bat file I get the following errors on terminal:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
C:\Program Files\Wolfram Research\Mathematica\12.2\AddOns\Applications\xAct\xPerm\mathlink>make_xperm.bat
ml64i3n.lib not found. Creating it...
*** [C:\Program Files\Wolfram Research\Mathematica\12.2\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\CompilerAdditions\..\SystemAdditions\ml64i3.dll] failed to open()
C:\Program Files\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\bin\dlltool.exe: Can't open def file: ml64i3.def
Running mprep...
Compiling...
gcc: error: xpermtm.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
Linking...
gcc: error: xpermtm.o: No such file or directory
gcc: error: Files\Wolfram: No such file or directory
gcc: error: Research\Mathematica\12.2\AddOns\Applications\xAct\xPerm\mathlink: No such file or directory
Removing temporary files...
No se pudo encontrar C:\Program Files\Wolfram Research\Mathematica\12.2\AddOns\Applications\xAct\xPerm\mathlink\xpermtm.o
No se pudo encontrar C:\Program Files\Wolfram Research\Mathematica\12.2\AddOns\Applications\xAct\xPerm\mathlink\xpermtm.c
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

It seems like there should be folders called  xpermtm.c and  xpermtm.o, but there just aren't there.

Regards,

Emmanuel

Thomas Bäckdahl

unread,
Feb 23, 2021, 2:33:34 AM2/23/21
to xa...@googlegroups.com
Hi!

The instructions for compiling xperm were mainly meant for really advanced users that wants to modify xperm etc. One needs to place the bat file in the right folder, modify the paths and install the right compiler etc. No ordinary user should need to do this.

Now finally an updated compiled version can be downloaded from the xact.es web site. http://xact.es/download/xAct_1.1.4.zip
Please let us know if you get problems with that.

Regards
Thomas
Reply all
Reply to author
Forward
0 new messages