MATLAB integration failed

Dear Lumerical,

I just upgraded to MATLAB r2019a and I cannot execute commands in Matlab from Lumerical anymore.
I followed all the steps in, Matlab integration status is green,the ActiveX test worked fine, and I also performed !matlab /regserver.
In Lumerical, I type “matlab(‘1’);”, for example. I see the Matlab command line opening up in the windows taskbar, but then it disappears, and I get the error:

Can not open a connection to MATLAB. You must have a supported version of MATLAB installed to use this feature. Please see the manual for details

I also checked the other two posts on your forum,

Matlab with Lumerical software
Error in Exporting Data to latest Matlab version

which are not helpful. Can you advise?


Hey @norbert.schoenenberg,

I will gladly look into this for you, but could you first confirm that your license for MATLAB r2019a is configured properly? If you open the r2019a application by itself does it launch correctly or ask for licensing information. Please let me know how it goes, and if you still have trouble I will follow up with the development team to see if there are known issues with this version.


Hi @trobertson,

Thanks for the quick response. Sure, it works fine, the license is activated and working in order. The version is (R2019a) if that makes a difference.

Hey @norbert.schoenenberg,

I could use a bit more information actually to figure this problem out. Do you have other versions of MATLAB installed on this machine? Are they licensed properly as well? What release and version of Lumerical are you using?


Sure. We have the previous version of Matlab still installed, R2015b, which worked fine with Lumerical (incidentally, if I change the Matlab folder in Lumerical to the 2015b version, and do !matlab /regserver again, then the integration works fine). But we don’t want to keep both licenses (unnecessary extra cost) and we require some of the new features developed after 2015b for other purposes.
The Lumerical version is 8.21.1781, release 2019a. Both run on Windows 10 64bit.

Hey @norbert.schoenenberg,

I may have found a workaround, but I would be curious to see if it works for you. On the top tool bar you will see a Resources button. Click on that.

Resources -> Eignesolver tab - Edit (button on the right) -> Resource advanced options -> Job launching preset

Change the option from Microsoft MPI, to Intel MPI. It may require admin privileges. I’ve tested this with a couple builds, and it worked properly. Please let me know how it goes.


Hi @trobertson,

In “Job launching preset” I have local computer, remote: MPICH2, remote: Microsoft MPI, remote: Intel MPI, and “custom”. When I choose either the Intel or Microsoft MPI, the resources tests fail with “CPI test failed: unknown MPI error”. So I always use MPICH2.
This hasn’t given me any problems so far, so I haven’t looked into it (i.e., into why I can’t work with Microsoft or Intel MPIs).

Hey @norbert.schoenenberg,

To clarify, you can now run using MATLAB 2019a and Lumerical 2019b. Please share any error messages that you are getting. There is a known issue with Microsoft MPI, but INtel should work.


Hi @trobertson,

No, that is incorrect. Intel MPI did not work at all with my previous FDTD version.
I just upgraded to Lumerical 2019b r1 8.22.1976. My MATLAB 2019 version is: (R2019a).

I now follow these steps:

  1. FDTD -> Help -> MATLAB integration status -> I choose the 2019a/bin/win64 folder, where libeng.dll is. It says it uses the MATLAB.AutoServer.9.6 automation server.
  2. Windows cmd.exe (in admin mode) -> same MATLAB folder as above -> I type “matlab /regserver”
  3. I now notice that a matlab command window pops up, and the first line reads:

Warning: Directory permission denied: C:\Program Files\Lumerical\FDTD\api\matlab

Let me mention that this was not the case before I upgraded to the latest Lumerical version.

  1. FDTD -> Simulation -> Resource configuration -> Job launching preset = “Remote: MPICH2”.
  2. FDTD -> I type in the command line:


A MATLAB command window opens and disappears quickly, and I get the error:

Error: prompt line 1: Can not open a connection to MATLAB. You must have a supported version of MATLAB installed to use this feature. Please see the manual for details

  1. Per your suggestion, I change the configuration to Intel MPI, but get the exact same result.


Hey @norbert.schoenenberg,

Sorry for the late reply. Could you send a screenshot of the MATLAB integration status with the new version of MATLAB. It may be that your environment path and sys path are not the same?



As for the Job launching preset - you can use Local Computer if you are not running any jobs remotely to another machine. Simply set the THREADS to the desired number of cores/processes you want to run your simulation.

The issue might be due to the multiple MATLAB installs on this machine. The system path might be set to the old registered version of MATLAB and this is also the one the old version of our product sees.

The error you reported shows the location of the previous FDTD version.
Warning: Directory permission denied: C:\Program Files\Lumerical\FDTD\api\matlab`
Do you still have the old version of our product installed?

Can you try and remove the previous versions of our product?

  • please try to do a clean install of our products.
  • remove previous and current versions of Lumerical
  • remove the installation folders
  • remove the preference files
    How to perform a clean installation?

Then reboot the machine. Reinstall the latest version of Lumerical.

Hope this helps.


Thanks for the tips on trying to solve this issue.
We have now purchased one of your lab suite packages, with 3 floating licenses. I installed Lumerical 2019b r3 8.22.2025. I did not have any Lumerical products previously installed.
I also have MATLAB (R2019a) Update 1, and no other MATLAB versions installed.

After installing Lumerical, I preformed the following steps (according to

  1. Checked the feature status and located libeng.dll
  2. Registered the MATLAB automation from the command prompt
  3. Checked it from MATLAB using:

h = actxserver(‘Matlab.Application’)

  1. Tried calling MATLAB through Lumerical by typing “matlab(“plot(1:10)”);”.

Simulation->Resources is set to “Local computer” and all tests pass.

And as in the case described above, the MATLAB window launches, quickly disappears, and I get the same error -

Error: prompt line 1: Can not open a connection to MATLAB. You must have a supported version of MATLAB installed to use this feature. Please see the manual for details

This is really frustrating. Also, on my computer I do not have older MATLAB versions available so I cannot work with Lumerical at all. What should I do?


I have just upgraded to Lumerical 2019b R4 8.22.2060, but the problem persists. The annoying thing is there is no information in the errors you output. Is there a log file somewhere with more information?

Our team are still working on the MATLAB 2019 versions issues. Currently, our API does not work with this version.
For the moment, the workaround is to use MATLAB 2017 version for windows.
We will provide and update once we have resolved this issue. Thank you for your patience.


Hello @lyap,

Is MATLAB 2019b now supported with the new Lumerical 2020r1?


As of the moment, we have Matlab 2019a supported with Lumerical 2020a R1.
Please try the latest version 2020a R2 if this works with your version of Matlab? I will check with our team if there are any reported issues with Matlab 2019b & Lumerical 2020a R2. Thank you.