'The code execution cannot proceed because ML64i3.dll was not found'

315 views
Skip to first unread message

tom.z...@gmail.com

unread,
Aug 22, 2022, 8:59:55 AM8/22/22
to xAct Tensor Computer Algebra
Hi all,

I've recently updated my version on Mathematica on Windows from version 10 or so to version 13.1. Upon looking to use an old xact/xpand notebook and trying to evaluate

> Needs["xAct`xPand`"];

there appeared an 'xperm.wind64' System Error stating 'The code execution cannot proceed because ML64I3.dll was not found. Reinstalling the program may fix this problem'.

So I then updated to version 1.2.0 of xAct but the same problem seems to persist. 
I see from previous discussions in the group that this problem cropped up with Mathematica 12 and was perhaps fixed in an earlier update to xAct. Is it possible that the newer version of Mathematica has created a new way for a problem to occur?

Any help greatly appreciate!
Thanks,
Tom

Thomas Bäckdahl

unread,
Aug 22, 2022, 9:53:25 AM8/22/22
to xa...@googlegroups.com
Hi!

This is a really annoying problem with Mathematica. They change the version of the MathLink protocol fairly often.
Earlier this was OK because they still sent the old dll files with the new versions of Mathematica. Now, they don't.

The easiest fix is if you can find the old ml64i3.dll file in the old version of Mathematica. For instance in version 12.1, it can be found at:
C:\Program Files\Wolfram Research\Mathematica\12.1\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\SystemAdditions\ml64i3.dll

It can be placed in the corresponding folder for your new version.
If that does not work, I suppose that I will have to recompile xPerm with the new version of the protocol.
However, that would disqualify older versions of Mathematica.

Unfortunately, I can not send the dll file here because gmail does not allow dll files to be send via email due to security issues. The same holds for the compiled xperm.win64 file.

Perhaps Jose could add the dll file to the main release if Wolfram allows that?

With mingw installed, it is also possible to build your own version of xperm.win64.
For reference, the following is the latest bat file I used for compilation:
"
@Echo off
set mingwVer=8.1.0
set mmaVer=13.0
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 and linking...   

%GccBinDir%\gcc -mwindows -O3  xpermtm.c -include "stdint.h" -Wl,-static -I%mldev64Dir% -L%CD% -l%mllibName%n -o xperm.win64


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

However, it is unclear if it will work without modification on your system. The source code for xperm is located in your xAct installation under xAct\xPerm\mathlink.

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/2647843d-300d-4d92-9fd2-88efd1c7dfb5n%40googlegroups.com.

tom.z...@gmail.com

unread,
Aug 22, 2022, 12:14:05 PM8/22/22
to xAct Tensor Computer Algebra
Hi Thomas,

Thank you very much for the reply! I was able to find a copy of ml64i3.dll and the problem seems to persist both if I put it in the ..\SystemAdditions 
folder for the new version of Mathematica or if I put it in the 'mathlink' folder of xPerm.

Just to check, is this problem restricted to Windows? I have an old Macbook so could try and install Mathematica and Xact on that.

Thank you once again,
Tom

Thomas Bäckdahl

unread,
Sep 1, 2022, 2:14:55 AM9/1/22
to xa...@googlegroups.com
Hi!

I find your problem strange. If the system asked for ml64i3.dll and you have supplied it, it should work.
Now, I looked at the versions of xperm.win64 on xact.es and found that all download files contain the latest version using ml64i4.dll, not ml64i3.dll. They have size 31 863 bytes and creation date 2021-02-21.

So my suggestion is that you search through your computer and see if you have several versions of xperm.win64 or the entire xact installation. In particular it is important that you search through the locations listed in the Mathemtica variable $Path.

Regards
Thomas

tom.z...@gmail.com

unread,
Sep 1, 2022, 4:40:01 AM9/1/22
to xAct Tensor Computer Algebra
Hi Thomas,

Thank you so much! 

So indeed it turned out that I had installed the newest version of xAct in ' C:\Program Files\Wolfram Research\Mathematica\<version>\AddOns\Applications\'  whilst an older version lurked in ' C:\Users\<user>\AppData\Roaming\Mathematica\Applications\'.  
I got rid of all versions, installed the newest version in the 'Roaming' folder above and added ML64i3.dll to the 'mathlink' folder in xPerm.
Now all seems to work fine. 

Thanks once again for finding the solution!

best,
Tom
Reply all
Reply to author
Forward
0 new messages