We have three different scenarios where we run the same parameter sweep code in three different computing environments, a single desktop workstation, a cluster of 200 cores, and a cluster of 1,000 cores. The following video clip will clearly demonstrate performance improvements obtained using parallel computing in MATLAB, specifically with parfor. Later on, we'll talk about how you can extend that level of control to resources on compute clusters by using MATLAB parallel server. For example, parallel constructs like parfor let control which portions of your workflow are distributed to multiple cores. Put another way, Parallel Computing Toolbox box enables direct control of your parallel resources. Therefore, parallel computing tools enable you to receive benefits beyond these limitations. However, not every MATLAB function is able to be multi-threaded and any acceleration is limited to your local workstation. A growing number of core MATLAB functions take advantage of underlying multi-threaded library support and other toolboxes leverage those benefits when they use core MATLAB functions. It's important to note that even without Parallel Computing Toolbox, MATLAB provides implicit multicore support with its built in multi threading. You can do this using a separate product called MATLAB Coder. Finally, you may also obtain speed UPS by replacing parts of your MATLAB code with an automatically generated MATLAB executable, known as a MEX function.
The MATLAB code analyzer can help advise you with this in addition to bringing issues and errors in your code to your attention. Once you've located your areas of investment, you can use effective programming techniques like preallocation and vectorization to accelerate the execution of your MATLAB code. Improving those areas gives you the biggest performance boost for your efforts. Perhaps the most critical tool to support this process is the profiler, which can help you find bottlenecks by telling you where your code is spending most of its execution time. Before modifying your code, you need to determine where to focus your efforts. Let's highlight some steps you can take to optimize your code. Whether you're planning to leverage multicore processors, compute clusters, or GPUs, it is important to optimize your code so that you can receive even better performance improvements when you introduce parallel tools for additional computing power. In addition, access to cluster and cloud environments has been increasing, providing the ability to use computational resources beyond what is available on a typical workstation. Multicore processors are the norm, and GPU devices capable of computation are becoming commonplace. This workshop will guide you through the steps and tips to doing the same, and keep in mind that parallel competing hardware is becoming increasingly widespread and available. Here are some examples of real performance gains experienced by MATLAB customers who used MATLAB parallel computing tools to speed up their work. Parallel computing in MATLAB and Simulink enables engineers, scientists, and researchers in any sector or industry to leverage the compute resources readily available to them without needing to be experts in parallel computing. In addition, as technology evolves, expectations have increased for faster and more efficient results. Parallel computing is an important topic because the problems that engineers and researchers face are growing larger and becoming more complex.
Hi, everyone, and welcome to this workshop on parallel computing with MATLAB and Simulink.