Integration with Matlab on Ubuntu

matlab
ubuntu
integration

#1

Hello all,

I am trying to run Lumerical through Matlab on Linux (Ubuntu 16.04 LTS) with no success.

In the extreme case appopen(‘fdtd’) crashes my Matlab session! I have added the correct paths for the interface, so Matlab knows where to look for the appopen function. The lumerical GUI for FDTD runs smoothly. The matlab crash report points to a segmentation fault from libinterop-api.so.1

############### part of matlab crash report ##############################################
[ 0] 0x00007fcd6b0dedc0 /opt/lumerical/fdtd/api/matlab/libinterop-api.so.1+00232896 appOpen+00000048
[ 1] 0x00007fcd6b319d4d /opt/lumerical/fdtd/api/matlab/libmatlab-interop.so.1+00007501 _ZN10SessionMgr10newSessionEPKcPKm+00000013
[ 2] 0x00007fcd6b51be99 /opt/lumerical/fdtd/api/matlab/appopen.mexa64+00003737 mexFunction+00000265
[ 3] 0x00007fce25a658b0 /usr/local/MATLAB/R2016a/bin/glnxa64/libmex.so+00149680 mexRunMexFile+00000064
#######################################################################################

Sometimes, I also have the 'Unable to launch the requested application" error.

Has anyone manage to interface Matlab with Lumerical on Linux?


#2

Hi @marcinmalinowski
In Lumerical’s knowledge base you can find many details. First post, from Lumerical to MATLAB and second post from MATLAB to Lumerical. You can read the steps for linux operating system. I think that the second post is for you " Matlab API integration ".
https://kb.lumerical.com/en/index.html?install_matlab_integration.html

Best Regards
Konstantinos


#3

Hello,
thank you, but I have been following these steps and as I said, matlab can find the path to lumerical:
the output of !echo is
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/lumerical/mode/bin:/opt/lumerical/fdtd/bin

and the output of path is

/opt/lumerical/fdtd/api/matlab
/opt/lumerical/mode/api/matlab

My problem is that appopen(‘fdtd’) either cannot open or crashes matlab.
Marcin


#4

Hi @marcinmalinowski
Could you please check the Lumerical version that is installed in your computer ?
MATLAB API integration requires Lumerical version 2016b or newer.


#5

Lumerical version 2017a release 8.17.1102
Matlab R2016a

so, on paper I should be fine


#6

Hi @lyap
@marcinmalinowski has follwed the steps from the knowledge base about " Matlab API integration " https://kb.lumerical.com/en/index.html?install_matlab_integration.html . Also, according to him the Lumerical version that is installed on his computer is “2017a release 8.17.1102”, but still there is a problem. Could you please check this post ? I don’t have linux installed on my computer. Could you please help us?


#7

Hi @marcinmalinowski,

Unfortunately, the MATLAB integration for Linux will only work on the supported Linux distribution, RHEL/CentOS 6 and above.

We are sorry for this inconvenience. For a list of supported systems, please refer to this link:
https://www.lumerical.com/tcad-products/system_requirements/


#8
  1. In that case is it possible to run Lumerical in the terminal and send and read commands to the LSF script interpreter?

  2. When it comes to Matlab integration it seems to me that both Matlab and python use the same C library for interfacing with lumerical, the former uses a MEX file and the latter uses a wrapper. I do not have the python API license, but I am able to open lumerical through python (and than I get no license error). So, that would imply that the error lies in the MEX file and it would just require compiling on Ubuntu.

  3. Do you happen to have documentation for the libinterop-api.so.1 c-library? If I have that I can write my own MEX file.


#9

Hi @marcinmalinowski,
Hope the Python API is working now?