Matlab standalone application with parallel toolbox (parfor loop in deployed applications) - parallel-processing

I use Matlab R2016a and guide.
I created an application that uses parfor loop. It works great in Matlab environement, but when deployed (standalone application) the time the parfo loop takes is the same as the foor loop; I mean there is no parallel compuiting in the depolyed application.
The documentation for deployement with parallel computing, for the latest versions of Matlab is there :
https://www.mathworks.com/help/compiler/use-the-parallel-computing-toolbox.html
I folowed all the procedure explained there (except for the clusterProfile it has .settings as extension in the oldest version instead of .mlsettings), but it did not work.
Please help, if you have any idea how to solve this.
Regards

I found the answer :
I just compiled using the absolute path of my prefdir commande :
mcc -a C:/Users/xxxxx/AppData/Roaming/MathWorks/MATLAB/R2016a/parallel.Settings -e myProgram.m;
use the commande prefdir, to guet the path.

Related

Making a portable version of Robotframework and RIDE, how to make it clean?

I want to adapt Robotframework and RIDE to be able to use them on a USB key. In order to achieve this, I planned to use a Portable Version of Python on which I would install all necessary modules using pip.
The main advantage of Portable Python is that it doesn't required any installation on the user's computer, they just have to use the Console executable provided by Portable Python to access Python and its modules. A simple insertion of the USB key, and the user would have access to the modules.
Let's say I install Portable Python on a USB key, located on E:\. Using E:\PortablePython\Console-Launcher.exe which uses command-lines code with all Python related files in the PATH, I manage to install all necessary packages for RobotFramework and RIDE with pip. For example, we can find the robot.exe in E:\PortablePython\App\Python\Scripts and the python exe is in E:\PortablePython\App\Python\python.exe like a usual installation of Python.
Everything works like a charm here, I can run my tests without any issue. The problems come when the key is moved. If I try to run ride on D:\:
D:\PortablePython>ride.py
Unable to create process using 'E:\PortablePython\App\Python\python.exe "D:\App\Python\Scripts\ride.py" '
It actually works if I write :
D:\PortablePython>D:\App\Python\python.exe D:\PortablePython\App\Python\Scripts\ride.py
But when I try to run tests within RIDE with the robot execution profile, a similar error appears in the console :
Fatal error in launcher: Unable to create process using '"E:\PortablePython\App\Python\python.exe" "D:\App\Python\Scripts\robot.exe" --version': Le fichier spÚcifiÚ est introuvable.
A workaround is to force the reinstallation of RobotFramework on the USB key to have it use D:\PortablePython\App\Python\python.exe instead of E:\PortablePython\App\Python\python.exe.
So here are my questions:
Is there any tweaks available on pip to have packages moveable in a way ? Using relatives paths instead of absolute paths maybe ?
Is it possible to have execution profiles in RIDE use the python exe on D:\ instead of the non-existing one on E:\ ?
Can virtual environments play a role in this case ?
RIDE uses the $HOME/.robotframework/ride or %APPDATA%\Robotframework\ride directories to create a database of keywords documentation (Help), and the settings.cfg. If you want to preserve this information, you should have a copy in the removable memory, and have some script to create a link to it.
This script may be a better solution to setup RIDE before it is launched. That way you can setup all the needed paths or environment variables, like, for example, PATH, PYTHONPATH.
If your code is Open Source, you can propose improvements to RIDE's portability, at https://github.com/HelioGuilherme66/RIDE
It seems I've been using an incomplete version of a Portable Python. I tried to use WinPython instead, which has a script making the installation moveable, and it solved all the issues I mentionned.
First I downloaded all the packages and libraries needed to do my tests, then I applied the make_winpython_movable.bat provided by WinPython. Everything works now when I move the files or the key.

While trying to open jmeter through .bat it displays error

I am Krishna Moorthy. I was trying to download and install jmeter in my 64 bit laptop with windows 10. It got downloaded and I have extracted the file.
Not able to find Java executable or version. Please check your Java installation.enter image description here
errorlevel=2
Press any key to continue . . .
I tried with the setting the path, copying "findstr" from windows32 from C.
But it still shows the same. Path in the environment variable is also properly setenter link description here
I am not able to understand this. do i need to uninstall and try it again? Already I have done it once.
Please help.
As per Apache JMeter main page:
The Apache JMeter™ application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance.
It means that you need a Java Runtime Environment in order to be able to run JMeter so make sure to download a 64-bit version of JRE for Windows version 8 or higher and once done you should be able to launch JMeter.
More information and detailed steps just in case: How to Get Started With JMeter: Part 1 - Installation & Test Plans

How to add an external lejos library into Processing project

I am trying to create a small program that will track and navigate my robot (NXT). System (PC) is using camera and reacTIVision in order to recognize fiducials (tags) that are placed on the top of the robots. I created the NXT code which is running in eclipse and it is fine.
On the other side, I want my PC code to run in processing so that at the later stage I can draw different things in processing and project them with the projector. So, when I started my PC code I had to import the lejos.pc.comm.* in order for the program to recognize classes such as NXTConnector, NXTInfo and so on. UNFORTUNATELY, when I run the program it says this library does not exist. I went to sketch in the top menu of processing and then import library but there was only NXTComm processing library which enables to control the Lego NXT robots. I went to see the examples and they are using other imports that my code is not using (I tried those imports).
THEN, I tried to manually download the lejos from website and take the whole extracted folder or .jar and put it into sketchbook-library. BUT it did not work.
I successfully imported other libraries into eclipse, but here it is difficult for me or I still do not fully understand how processing works.
I am using processing-2.2.1 on Ubuntu 16.04 LTS Intel® Core™ 64bit. I am using older version of processing (meaning 2.2.1) because reacTIVision had problems with newer version (3).
I am trying to solve this problem and it is taking a while at this point, so if anyone can help, I would really appreciate it.
LeJOS is a little more complicated than a regular Java library, so getting it to work in the Processing editor is going to be a little tricky.
Instead, I recommend using Processing as a Java library, then writing your code in Java using eclipse.
You can still draw using Processing just like always, but your classpath and stuff will be setup using eclipse.
You can find directions for setting up Processing in eclipse here, and then setting up LeJOS in eclipse should be pretty standard as well.

Can Ruby + Crate + Windows work?

I've got a project for work I'd like to do in Ruby that will have to run on Windows, but perturbing the filesystem for a Ruby install or RubyScript2Exe unpack isn't an option (this is supposed to be the harness for a testing system). Has anyone successfully used Crate to package up something on Windows? If so, what was your build environment like and can you pass on any other hints?
I've tried and worked in getting Crate work under Windows, but is a more complicated system than I would expect.
If extraction of code for your system is your problem. I recommend take a look to Exerb, and specially: exerb-mingw hosted on GitHub exerb-mingw
It will generate a single executable like Ocra or RubyScript2Exe, but with the difference that the source code will not be extracted and extensions will be dynamically loaded.
This works perfectly with RubyInstaller packages, and is being used with Pik (Ruby version manager for Windows).
Hope this helps.
You can embed a Ruby interpreter and script into a C program, which may be easier than trying to run Crate. Here are some helpful links that describe how to do this, and may provide enough sample code to use as a skeleton for what you are trying to build.

What is the simplest way to set up a BIRT report viewer for a xulrunner application?

I recently began using BIRT and have developed a report to use with my xulrunner application. What I haven't yet figured out is how I should deploy the viewer. It seems like BIRT mostly targets Java applications, so there are instructions for deploying on J2EE, JBoss, and other technologies -- with which I am not familiar (but I'm not developing in Java anyway).
Reviewing this article on deploying BIRT and reviewing the deployment details on BIRT's web site, I'm not sure where to go. I wasn't expecting to have to add some large Java dependency for the xulrunner application --is there no way I can drop an executable in with my xulrunner app, call it from my app, and pass it a report document? (Or something else that would be simpler than learning and using J2EE, JBoss, tomcat?)
It appears that there is a genReport.bat file in the run-time somewhere that can generate reports from the command line. This appears to be what I need, and this article describes it.
(11/2014) I'm going to add:
download Birt runtime from: http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-4_3_0-201306131152/birt-runtime-4_3_0.zip
extract somewhere and set a new Environment variable BIRT_HOME=path_to_where_you_extracted
remember to add your database library into \ReportEngine\lib , (ex: jtds.jar)
Open a console inside ReportEngine dir and run:
genReport.bat -f PDF -o PATH/GENERATED_REPORTS/REPORT.pdf -F "PATH/TO/REPORT.rptdesign"
And that's all what I needed to do

Resources