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.
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.