We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 45322

13.3 SysGen - Why does SysGen/Matlab hang or take a long time to launch?


Please see this link from Mathworks which discusses this issue:

Apparently, Mathworks periodically cleans up old support articles, so to avoid a broken link the article is included below.



Why does MATLAB get stuck in the "Initializing" or "Busy" state or take a long time to start?

Problem Description:

MATLAB opens but the status states 'Initializing' or 'Busy' for a long time. MATLAB takes a long time to launch with or without a remote license manager.



There are a few reasons why MATLAB can hang at initializing.

Licensing issues:

Option 1

If MATLAB starts, but remains in the "Initializing" state, MATLAB may be searching for additional licenses on your system.

This may be caused by an environment variable named LM_LICENSE_FILE. This variable tells MATLAB and other flexlm applications where to find the license file. MATLAB may also hang if you have a network license for some features and you disconnect from the network.

NOTE: There may also be an MLM_LICENSE_FILE variable as the root of this issue. This variable works only for MATLAB.

To fix this problem, you can do the following:


1) Right-click on the "My Computer" icon and go to "Properties". (You may also do this by going to the Control Panel and double clicking "System."

2) Go to the "Advanced" tab and click on "Environment Variables"

3) Under the bottom window, System variables, look for a variable named LM_LICENSE_FILE

4) If there is an LM_LICENSE_FILE variable already set, skip to step 5. If there is not, create an LM_LICENSE_FILE variable by clicking "New" and typing "LM_LICENSE_FILE" in the Variable name box.

5) Set the LM_LICENSE_FILE variable to the absolute path of the license file for MATLAB. If you are not sure where that file is located, see the related solution: "Where are the license files for MATLAB located?" linked below. If there is more than one license file, put a semi-colon (;) after the first path, then type the path to the next license file. Click "OK" to save.

6) Launch MATLAB again.

Unix, Linux, or Mac

Check to see if there is an environment variable set. Where this is located depends on the shell you are using. Look in your home folder. This file may be called: .cshrc (c-shell), .profile (bash), or .bashrc (bash)

You can also create an environment variable for that shell session from the command line using export or setenv (depending on your shell), but the above file needs to be edited for a permanent change.

For example:

export MLM_LICENSE_FILE /usr/bin/matlab/license.dat

Option 2

Alternatively, if you use only one license to access MATLAB and toolboxes, you can specify the license file in the MATLAB shortcut or from the command line when launching MATLAB. To do so, follow these steps:


1) Right-click on a shortcut to MATLAB and select "Properties"

2) In the "Target" field, enter the following:

"$MATLAB\bin\win32\MATLAB.exe" -c "<Full Path to the MATLAB license file including file name>

Where $MATLAB is the root MATLAB directory and <Path to the MATLAB license file> is the absolute path to your license file. If you are not sure where this is located, see the related solution: "Where are the license files for MATLAB located?" linked below.

3) Click "OK".

4) Launch MATLAB from the shortcut.


This method also works for System Generator shortcut: in the target field please append the -c <license path> to the existent command:

C:\Xilinx\Vivado\2013.2\bin\sysgen.bat -c "C:\Program Files\MATLAB\R2012b\license.lic"

For Linux, Unix, or Mac

Use a -c switch to point directly at the license file when launching.

If the MATLAB installer has created symbolic links, run

matlab -c <Full Path to the MATLAB license file including file name>

If symbolic links were not created, run from $MATLAB/bin/

./matlab -c <Full Path to the MATLAB license file including file name>

Where $MATLAB is the root MATLAB directory and <Path to the MATLAB license file> is the absolute path to your license file, likely in your $MATLAB/licenses directory.

Non-licensing issues:

Solution 1:

Recreate MATLAB preferences by doing the following:

On Windows

(Make sure you have enabled viewing of hidden files and folders first)
1) Quit MATLAB. Ensure that MATLAB is no longer running.

2) Browse to the folder c:\Documents and Settings\ <your username>\Application Data\MathWorks\MATLAB\ OR c:\users\<username>\AppData\Roaming

3) Rename the directory named after the version of MATLAB you are using to have _old at the end. If there is a folder with "_licenses" in the name, DO NOT rename that folder.

4) Once this has been removed, restart MATLAB. This directory will be recreated the next time you start MATLAB.

On Linux, Unix, or Mac

1) Quit MATLAB. Ensure that MATLAB is no longer running.

2) Rename the ".matlab/" directory in the users home directory, to ".matlab_old/".

3) Restart MATLAB.

If that does not resolve the issue, there is a known issue with MATLAB 7.0 (R14) on Windows and the graphics libraries supplied with certain graphics cards, which do not use memory efficiently, and cause MATLAB 7.0 (R14) to use virtual memory more frequently than would be expected. In this case, disabling the hardware graphics acceleration features of the card may improve the performance of MATLAB 7.0 (R14). To do so, follow the steps below.

1) Close MATLAB.

2) Right-click on the Windows desktop, and select "Properties".

3) In the Display Properties window that opens, select the "Settings" tab, and then click on the "Advanced" button.

4) In the window which opens, select the "Troubleshoot" tab.

5) Set the "Hardware acceleration" slider all the way to the left, to "None".

6) Click "OK" in this window, and then click OK again in the Display Properties window.

7) Restart MATLAB.

Solution 2:

In some instances, customers have reported that the anti-virus application which was working in the background, was slowing down MATLAB. For these customers, disabling the active scan option for at least the MATLAB directories improved performance substantially.

Solution 3:

If you have MATLAB R2007a, there is a bug that prevents MATLAB from starting. For more information about that bug, see the bug report here:


If none of these solutions resolved your performance concerns, or if you have a concern with the performance of a specific feature, contact Technical Support using the following URL:


AR# 45322
Date 08/26/2013
Status Active
Type General Article
Page Bookmarked