Comments (22)
Please post the output of MATLink`Developer`GetInfo[]
. Everything works fine for me on macoS.
from matlink.
MATLink
Developer`GetInfo[]
MATLink 1.1 for Windows (Fri 15 Aug 2014)
12.1.0 for Microsoft Windows (64-bit) (March 14, 2020)
Force 32-bit engine: False
System PATH:
C:\Program Files\Wolfram Research\Mathematica\12.1\SystemFiles\Libraries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\12.1\SystemFiles\Libraries\Windows
C:\Program Files\Wolfram Research\Mathematica\12.1\SystemFiles\Kernel\Binaries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\12.1
C:\Program Files\Wolfram Research\Mathematica\12.1\SystemFiles\FrontEnd\Binaries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\12.1\SystemFiles\Kernel\Binaries\Windows-x86-64
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0
C:\Windows\System32\OpenSSH
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Program Files\NVIDIA Corporation\NVIDIA NGX
C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\WiFi\bin
C:\Program Files\Common Files\Intel\WirelessCommon
C:\Program Files (x86)\Wolfram Research\WolframScript
C:\Program Files\MATLAB\R2020a\runtime\win64
C:\Program Files\MATLAB\R2020a\bin
C:\Users\Hamood\AppData\Local\Microsoft\WindowsApps
C:\Program Files\MATLAB\R2020a\bin\win64
COM server information:
CLSID: {368C18D2-53D8-433A-AD3B-FCF8F16CBE3F}
Program ID: Matlab.Application (Version 9.8)
Command: C:\Program Files\MATLAB\R2020a\bin\win64\MATLAB.exe /MLAutomation
`
from matlink.
Are there any error popup windows? Please check behind all open windows (notebooks, etc.)
On macOS and Linux, there is no problem with MATLAB 2020a.
Unfortunately, it will be a while before I can test with these versions on Windows. I do not normally use Windows and gaining access is difficult because of the lockdown.
from matlink.
from matlink.
Did you fully restart Mathematica after configuring MATLink? Don't just quit the kernel. Restart the entire program.
Please do this, try again, and let me know if there are any error messages. Again, look for dialog windows hidden behind other windows.
from matlink.
I have restarted Mathematica many times. Could you kindly explain what is meant by "configuring" MATLink? the same error message "OpenMATLAB: Could not open a connection to MATLAB." is returned by the Kernel. No dialog box. I am pretty sure about that.
from matlink.
It was independently confirmed to me that MATLink works on Windows with MATLAB R2020a and Mathematica 12.1.0. The problem seems to be specific to your system.
To try to figure this out, please fully restart Mathematica again, then evaluate the following commands in turn (each one precisely once):
Needs["MATLink`"]
ConnectEngine[]
OpenMATLAB[]
MATLink`Developer`GetInfo[]
MATLink`Developer`ShowLog[]
SystemInformation["Small"]
$Line
After the 2nd line, a new program (mengine) should appear in your taskbar. Please confirm if this is the case.
After the 3rd line, there should be signs that MATLAB is launching (unfortunately I do not recall what this looks like on Windows, but I expect a taskbar button may appear momentarily). Do see see such signs?
When done evaluating these, please save the notebook and attach it to your response here on GitHub.
from matlink.
Yes after the second line a new program appears in the taskbar, (just blank space no icon).
AFter the 3rd line MATLAB does start with I think mengine fails to start (although its icon appears)) but the 3rd line evaluation terminates in the same error message as before. I am attaching the notebook.
MATLink error.zip
from matlink.
Dear Szhorvat,
I had MATLAB installed on two machines with one academic license. I removed from my other machine. Now OpenMATLAB[] generates the following error dialog box
"mengine.exe - Entry Point Not Found
The procedure entry point gzdirect could not be located in the dynamic link library C:\Program Files\MATLAB\2020a\bin\win64\libxml2.dll"
Please look into this matter. Thank you in advnace.
from matlink.
Can you verify that MATLAB works when started alone?
Can you post the GetInfo output again, please? I expect it changed now. A likely reason is that there is a mismatch between the MATLAB that is added to the system PATH and the one registered to be used with the MATLAB Engine.
from matlink.
Dear Szhorvat, MATLAB works fine when it is started alone.
Here is the GetInfo output:
MATLink error 20 May.zip
from matlink.
Just to be clear, you did see the error message about libxml2.dll when you prepared the notebook attached above?
from matlink.
no not this time... it is not coming this time. Its confusing to me, sometimes the dialogue box with error comes and now it is not coming.
from matlink.
the mengine window is showing "(not responding)"
from matlink.
there is update 2 for MATLAB 2020a. should I install it?
from matlink.
Yes, it is a good idea to always install updates. Personally, I was not able to test R2020a yet on Windows. I have limited access due to the lockdown.
from matlink.
However, most likely, there is a conflicting DLL on your computer that is causing the problem. But it's unclear which one (and where) it is.
from matlink.
ok, thank you very much Dr. Szhorvat for your interest in my problem. I hope the lockdown finishes soon. I was thinking, can I trust you with giving you remote desktop access to find out what the problem is? Will that resolve the problem? Or if you are not comfortable with that maybe we can share screen and you can direct me?
from matlink.
Can you try the following?
First, fully restart Mathematica. Then evaluate this as the first line:
SetEnvironment["PATH"->"C:\\Program Files\\MATLAB\\R2020a\\runtime\\win64;C:\\Program Files\\MATLAB\\R2020a\\bin\\win64;C:\\Program Files\\MATLAB\\R2020a\\bin;C:\\Program Files\\Wolfram Research\\Mathematica\\12.1\\SystemFiles\\Libraries\\Windows-x86-64;C:\\Program Files\\Wolfram Research\\Mathematica\\12.1\\SystemFiles\\Libraries\\Windows;C:\\Program Files\\Wolfram Research\\Mathematica\\12.1\\SystemFiles\\Kernel\\Binaries\\Windows-x86-64;C:\\Program Files\\Wolfram Research\\Mathematica\\12.1;C:\\Program Files\\Wolfram Research\\Mathematica\\12.1\\SystemFiles\\FrontEnd\\Binaries\\Windows-x86-64;C:\\Program Files\\Wolfram Research\\Mathematica\\12.1\\SystemFiles\\Kernel\\Binaries\\Windows-x86-64;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files (x86)\\Wolfram Research\\WolframScript\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Users\\Hamood\\AppData\\Local\\Microsoft\\WindowsApps"]
This simply reorders the entries in your path for the session.
Then try
Needs["MATLink`"]
OpenMATLAB[]
again.
from matlink.
It worked! perfectly fine. Cannot thank you enough Dr. Szhorvat.
Could you please explain what was the problem?
from matlink.
I believe that means that one of the DLLs that ships with MATLAB, and is required by mengine.exe, also exists as a second and incompatible copy on your system. This DLL gets loaded instead of the correct one, and then causes trouble.
If you wanted to, you could find out where that incompatible DLL is by gradually moving the MATLAB-specific directories further and further back on the PATH and seeing at what point things break. The conflicting DLL is not in C:\windows... then you could just move the MATLAB directories on your system path for a more permanent solution. Maybe moving it before the c:\windows... stuff is not the best idea.
Frankly, dealing with this really stretches my knowledge ... Any suggestions on how to properly deal with this "DLL hell" situation correctly.
from matlink.
from matlink.
Related Issues (20)
- Investigate using new C++ MATLAB Engine API HOT 1
- OpenMATLAB works, but I don't see matlab anywhere? HOT 1
- mengine.exe unable to start correctly HOT 3
- endless running
- The coding of Chinese HOT 2
- Unable to install MATLink in windows10 HOT 5
- Not able to get multiple output variables from MATLAB functions in Mathematica using MATLink HOT 1
- Cannot connect to MATLink HOT 5
- matlink HOT 11
- Mengine(2bwb8_shm) keeps hanging and cannot conncted to MATLAB HOT 4
- matlink HOT 1
- Compilation with Mathematica 13.0.0 and MATLAB R2018a in Ubuntu 20.04.4 HOT 2
- Problem in installation
- Excuse me, my matlab version is R2020b, and mathrmatica is 13.0, MEvaluate,MGet works to simulate the matlab code in mathematica,. However, the MSet doesn't work to send mathematica variable to matlab HOT 5
- Simulink in MATLink HOT 1
- Cannot make Matlink 1.1 work with Matlab2021b/Mathematica 13.1 HOT 6
- Mset does not work properly HOT 4
- jpeg error analysis and it application in jpeg image forensics
- Apple Silicon MacBook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matlink.