Scaling Test Execution with MATLAB Parallel Server
Learn how to use MATLAB Parallel Server™ to scale test execution with Simulink Test™.
Hello, everyone. This is Travis Near, along with Rong Mi on Simulink Test, and today we will show you how you can improve your testing time by distributing model simulations of your test scenarios. Simulink Test has supported parallel test executions since 2016A using the Parallel Computing Toolbox. With the Parallel Computing Toolbox, the number of MATLAB instances is limited to the number of cores of your machine. To overcome this limitation, in release 2020B, Simulink Test has extended support for MATLAB Parallel Server, where the MATLAB instances are run on clusters and clouds.
Thank you, Travis. In this demo here, I will go through the steps involved in using a cloud cluster on Amazon Web Services. Then using Simulink capacitor for Parallel tester execution. In order to create a cloud cluster, we can click the Parallel button first, and then click create and manage your clusters. In this dialog, we can select the create a cloud cluster. So here, I have already requested data machines, and each machine has two workers. So, totally, I have 16 workers right now.
So, in this Amazon AWS console page we can see this cluster has been created, and all eight machines are up and running. Each machine is associated with a different IP address. Let's come back to MATLAB, we go to the current report. Here, we can confirm, we have 16 workers now. So in test manager here, we can see I have created many test cases. In each test case, we are using this demo model. It is calculating the real speed. And also in this demo model, I change the stop time to 10,000 seconds.
So, we want to run the test in Parallel. We click the parallel button, and then we select the 70 test cases. And then we click the Run. After we hit the Run button, Simulink Test transfers the models to the workers, then runs the simulations. As we have 16 MATLAB instances running in Parallel, 16 simulations start execution at once. And then after they finish, we get the results back to Simulink Test. We can see these simulations are being executed on remote machines with these IP addresses. After the first 16 are done executing, the next 16 automatically start, and this goes on until all 70 simulations are completed. So, let's expand the test case results, and also we can see the simulation details in this simulation metadata section.
Thank you, Rong. Let's look at the execution performance numbers by comparing the serial execution to Parallel Computing Toolbox with six workers and with MATLAB Parallel Server with 16 workers. The x-axis shows the number of tests, and the y-axis shows execution time in minutes. With Serial simulation, 800 tests takes about 138 minutes. With the Parallel Computing Toolbox, the execution time takes about 26 minutes, which is 5.2 times faster than Serial. And with MATLAB Parallel Server, the execution time is 13.6 times faster than Serial, and 2.6 times faster than Parallel Computing Toolbox. These numbers are with 16 workers running in parallel, and you would see additional improvements with an increase to the number of workers using MATLAB Parallel Server.
So, we have shown how Simulink Test can improve your testing time by distributing simulations of test scenarios to MATLAB Parallel Server. Please try connecting your cluster or cloud to Simulink Test to scale your testing. Thank you.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
- América Latina (Español)
- Canada (English)
- United States (English)
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- United Kingdom (English)
- Australia (English)
- India (English)
- New Zealand (English)
- 日本Japanese (日本語)
- 한국Korean (한국어)