Git Product home page Git Product logo

Comments (22)

szhorvat avatar szhorvat commented on August 25, 2024

Please post the output of MATLink`Developer`GetInfo[]. Everything works fine for me on macoS.

from matlink.

hamoodrak avatar hamoodrak commented on August 25, 2024

MATLinkDeveloper`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.

szhorvat avatar szhorvat commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

from matlink.

szhorvat avatar szhorvat commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

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.

szhorvat avatar szhorvat commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

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.

szhorvat avatar szhorvat commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

Dear Szhorvat, MATLAB works fine when it is started alone.

Here is the GetInfo output:
MATLink error 20 May.zip

from matlink.

szhorvat avatar szhorvat commented on August 25, 2024

Just to be clear, you did see the error message about libxml2.dll when you prepared the notebook attached above?

from matlink.

hamoodrak avatar hamoodrak commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

the mengine window is showing "(not responding)"

from matlink.

hamoodrak avatar hamoodrak commented on August 25, 2024

there is update 2 for MATLAB 2020a. should I install it?

from matlink.

szhorvat avatar szhorvat commented on August 25, 2024

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.

szhorvat avatar szhorvat commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

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.

szhorvat avatar szhorvat commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

It worked! perfectly fine. Cannot thank you enough Dr. Szhorvat.
Could you please explain what was the problem?

from matlink.

szhorvat avatar szhorvat commented on August 25, 2024

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.

hamoodrak avatar hamoodrak commented on August 25, 2024

from matlink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.