I am currently trying to setup the windows real-time kernel in Matlab r2013b, but the command rtwintgt -setup is giving me an error. I have read the following link and confirmed that I do have admin access and my license includes Real-Time Windows Target. rtwintgt install
My error is as follows:
``
rtwintgt -setup
There is a different version of the Real-Time Windows Target kernel installed.
Do you want to update to the current version? [y] : y
> Error using rtwintgt>ErrorDialog (line 363) Installer error: "Failed
> to copy the kernel to Windows system folder. The process cannot access
> the file because it is being used by another process.".
>
> Error in rtwintgt>RunInstaller (line 280) ErrorDialog(prompt,
> message('rtwin:installer:installererror', errmsg));
>
> Error in rtwintgt>rtwt_setup (line 119) result = RunInstaller(prompt,
> 'install');
>
> Error in rtwintgt (line 68) retval = feval(subfn, prompt);
From the line, "The process cannot access the file because it is being used by another process," I can understand that there is another program interrupting the file retrieval, but I do not know what program. I have tried ending as many tasks as I could and have restarted my computer . Any help would be much appreciated, as I am trying to get this to work for a project.
I had the same problem and I managed to find a solution.
The errors were most likely caused by a previously installed/uninstalled version of MATLAB which is different from your currently installed version.
According to the MathWorks website, uninstalling the MATLAB environment does not uninstall the Simulink Desktop Real-Time kernel.
Open your MATLAB command window and type "rtwho".
If you see two different Real-Time versions, there lies the problem.
To solve the problem,
Uninstall the Real-Time kernel version associated with the previous/uninstalled MATLAB environment by typing "sldrtkernel -uninstall" in the command window. If it doesn't work in the MATLAB command window like I experienced, type it in the Windows Run Dialog.
If uninstalled successfully, you should see the message "The Simulink Desktop Real-Time kernel uninstalled successfully."
Go back to the MATLAB command window and install the kernel using the command "sldrtkernel -install".
You should get the message, "You are going to install the Simulink Desktop Real-Time kernel.
Do you want to proceed? [y] :"
Type "y" to continue the installation, and on successful completion, you should get the message, "The Simulink Desktop Real-Time kernel has been successfully installed."
This should solve the problem.
N/B: You can enter the "rtwho" command in the MATLAB command window afterwards to confirm that there is only one Real-Time version.
I hope this helps.
See this link for more:
https://www.mathworks.com/help/sldrt/ug/real-time-windows-target-kernel.html
Related
I have MATLAB R2013a and been trying to install the Simulink support package for Arduino hardware but I keep getting the following error:
"Error installing third party package Arduino software: Invalid zip file "C:\MATLAB\SupportPackages\R2013a\downloads\arduino-1.0-windows.zip"."
and then the installation stops.
There is already an answer by Shaima Al Hebsi on MATLAB Answers:
Install the Hardware support from the Add-ons button in Matlab and wait for the error. Once you get the error cancel and exit the installation.
Get Arduino 1.0 (the only version which made it work) from http://www.arduino.cc/en/Main/OldSoftwareReleases when you download it you will get it as a zip file having the same name which was shown in the error message arduino-1.0-windows.zip
Now go to the directory shown in the error message: C:\MATLAB\SupportPackages\R2013a\downloads\arduino-1.0-windows.zip
and replace the existing corrupted arduino-1.0-windows.zip with the new one downloaded recently
Disconnect internet connection and again go to Matlab add-ons and try again to install arduino hardware support package It should work this time.
I do research in oil simulation, I normally use a simulator called Eclipse from a company called Schlumberger and I was able to use it from my scripts from Matlab using the following command.
% file name 'ICFM.DATA';
system(['eclrun',' eclipse ', C:Path\ICFM.DATA]); % Command to run ECLIPSE
Now I had installed a new Free simulator (OPM.org) in linux and I am using Octave for programming. but I am unable to find out how to run simulator from Octave.
The simulator can be run simply by writing
flow ICFM.DATA
and the results using a command
ecl_summary ICFM.DATA
I want to be able to run and get the results from with in Octave but I have not being able as in Matlab.
Any suggestions? someone?
Assuming both the flow and ecl_summary commands are on your system path (i.e. the "linux" path, not in octave), then it should simply be a matter of:
system('flow /my/path/to/ICFM.DATA');
system('ecl_summary /my/path/to/ICFM.DATA');
(where you should change /my/path/to with whatever path your data file is in).
I found that I am able to run the simulation using the syntaxes
unix('flow ICFM.DATA')
This is in Matlab R2017b for Ubuntu 16.04
Initially I got an error as the output was reporting:
....'GLIBCXX_3.4.21' not found
All the problem was due to a Matlab issue that was solved using the answer on
https://askubuntu.com/questions/719028/version-glibcxx-3-4-21-not-found
which was to type:
LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libstdc++.so.6" matlab
on the terminal.
After setting up the program ,I meet a fatal error on Startup matlab .As following :
Failed to start the Java Virtual machine - JNI error: -3
I want to know where is error and how to solve it .Please help me ,Thanks !
PS: My OS is windows 7 (32bit) ,and jdk 1.8(32bit) is set up successfully (Certainly PATH and CLASSPATH is set OK).
When you launch the application, does that error display in a dialog box, or within the MATLAB console? Does MATLAB launch if you use the '-nojvm' flag (in your shortcut path or from within a Command Prompt window)? If not, does it launch if you use a '-nodisplay' flag?
Definitely make sure you don't have a 'matlab_java' environment variable set, and if you are able to launch MATLAB, you should run the following commands:
>> rehash toolboxcache;
>> restoredefaultpath;
>> savepath;
After running the commands, restart MATLAB. When MATLAB launches, do you still see the error?
If you aren't able to get MATLAB to run, can you look within your %temp% directory for an error log? I don't recall the specific naming convention, but you should be able to find it based on it's timestamp.
Hope this helps, and if it doesn't, try calling the MathWorks Installation and Licensing team. As long as you have a real license, they'll help you.
Disclaimer: I'm a former member of the recommended team above, but have no current affiliation with MathWorks.
MATLAB 2014a (8.3) Runtime Compiler (MCR) Errors when trying to launch deployed (using
deploy tool) application in Ubuntu 13.04.
Right after installation of MCR if one runs the deployed application following error appears:
error while loading shared libraries: libmwlaunchermain.so: cannot open shared object file: No such file or directory.
Since I have already found a solution to this problem wasting a day, I just want to share it:
This seems to be a problem of MATLAB MCR installation script designed for Linux by MathWorks. Furthermore, it is a result of a known Ubuntu bug. To fix it, add your MCR to the $PATH as shown below:
First make sure to add the missing files to the right folder, in terminal:
sudo cp /usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/runtime/glnxa64/* /usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/bin/glnxa64
Add the proper library folder to your .profile, such that this change will stay after logout
ubuntu: gedit .profile
In the end of the file add following lines:
#MATLAB MCR
export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/bin/glnxa64
export XAPPLRESDIR=/usr/local/MATLAB/MATLAB_Compiler_Runtime/v83/X11/app-defaults
export PATH=$PATH:$LD_LIBRARY_PATH
export PATH=$PATH:$XAPPLRESDIR
Invoke following code in the terminal to make sure that Ubuntu bug doesn't re-write your variable:
echo STARTUP=\"/usr/bin/env LD_LIBRARY_PATH=\${LD_LIBRARY_PATH} \${STARTUP}\" | sudo tee /etc/X11/Xsession.d/90preserve_ld_library_path
Reboot
If this solution doesn't work, try to reinstall MATLAB MCR 8.3 from the MathWorks website and repeat the steps.
In my case (Matlab R2016b = v91), the binary generated by Matlab was accompanied by a shell script which sets up the LD_LIBRARY_PATH for me. If I just run
./run_scriptname.sh
it complains about the missing <deployedMCRroot>. So running the script with
./run_scriptname.sh /home/user/MatlabMCR/v91
it worked out of the box.
For me, it was not obvious that the path shown above is the <deployedMCRroot> because I chose /home/user/MatlabMCR as installation directory. And with the wrong path specified, it led to the same error message.
I have problems running a program compiled with MCC that uses parfor. The non-compiled .m version works (no bug). When I run the compiled version, I get
"distcomp.remoteparfor" is undefined. I believe I exactly have the error described in
the following link.
http://www.mathworks.com/support/solutions/en/data/1-PAHWE/index.html?product=CO&solution=1-PAHWE
However, since MCR is not installed on my machine (got Matlab and MCC),
I am wondering what the pathes $APPNAME_mcr/java/jar/toolbox and
$MCR/MATLAB Component Runtime/v70/java/jar/toolbox correspond to. I found
the distcomp.jar file in C:\Program Files\MATLAB\R2011b\java\jar\toolbox, but I don't know where to put it since see any path corresponding to $MCR/MATLAB Component Runtime/v70/java/jar/toolbox since MCR is not installed.
Thanks a lot!
Fred
No need to install the MCR if you are simply trying to run the application on the same machine that has MATLAB. The question to ask is, HOW are you launching the compiled application? From a DOS command window? From within MATLAB using the SYSTEM command?
If you are launching the application from a DOS / UNIX command line, then the important thing to keep in mind is that the MATLAB binaries need to be on your system path i.e. just make sure:
$MATLABROOT\bin\$ARCH
is on your system path. Where $MATLABROOT is the matlab installation folder, and $ARCH is your system architecture. For example:
c:\work\matlab\bin\win64
on my machine since my installation folder which contains MATLAB is:
c:\work
and i am on a win64 machine.
The problem is solved. The solution is to make the program
a function instead of a script :
http://www.mathworks.com/matlabcentral/answers/22825-parfor-errors-when-file-is-compiled