Running matlab 2007b

October 10, 2013

Problems with Fedora 19

Yes, I am still running our perpetually licensed 2007b copy of matlab, typically alongside the latest copy via the university site license.

Some issues cropped up as of Fedora 19, and they look like bugs in the bash shell. What I have had to do is to edit one of the matlab scripts to get things to run.

The symptoms of this problem are that when I give either of the commands:

service matlab-lm restart
systemctl restart  matlab-lm.service
It fails to start the license manager (of course attempting to simply start matlab without the license manager also fails).

On my system, I have the matlab files in directory /u1/Mathworks_2007b_64 and I have /u1/Mathworks set up as a symbolic link to this directory. This is so I can (or could) change to new matlab versions as they came along and still keep my old versions handy, "just in case".

My work-around involves the file /u1/Mathworks/etc/lmboot. For some reason the following test is always failing when it should be true:

#---#	if [ -f $LM_RUN_DIR/$LM_MARKER.vd1 ]; then
After looking at the logic of the script, it appears this is some kind of belt and suspenders style checking that a file (or link -- I forget) that the script just created actually got created. I simply commented it out and now things work just fine. I won't describe the process required to find and debug this.

Even after doing this there is another problem. The systemctl script reports that starting the license manager is still failing - but it isn't. It is actually running fine and I can fire up matlab.

Systemd and my license manager script

Now that Fedora (and perhaps other linux distributions) are using systemd, it is necessary to migrate my mathlab script from the init.d scheme to the new scheme. What I did was to create a file in /usr/lib/systemd/system that I call matlab-lm.service. It serves to start the license manager on boot, but restarting it or shutting it down must be done by hand. And of course there is more to it than just dropping this new file into /usr/lib/systemd/system, you must also then issue the command:
systemctl enable matlab-lm.service

Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org