SIMULIA uses MemoryScape to find & fix bugs quickly in 3D simulation software

SIMULIA, the Dassault Systemes brand for realistic simulation, provides design simulation software that enables manufacturing companies to evaluate product performance, reduce physical prototypes and drive innovation. Their scalable portfolio includes the CATIA Analysis applications, the Abaqus product suite for Unified Finite Element Analysis, multiphysics solutions for insight into challenging engineering problems, and SIMULIA SLM for managing simulation data, processes and intellectual property. The Challenge Tremendous attention and resources are dedicated to ensuring the high quality of SIMULIA products. Nevertheless, during development a few “mysterious” problems may creep in. They occur very rarely (once in about every 100 or even 1000 runs), but when they do occur, they defy all human efforts to capture them. These few problems could also potentially draw tremendous resources. In most cases, it was found that the mysterious and elusive problems were being caused by subtle memory problems that would flee at a moment’s notice. After many frustrating attempts to diagnose these issues, it became clear that SIMULIA developers needed a better way to gain insight into what was happening with memory. Thus the search for a proper tool began. SIMULIA was looking for something that would allow them to intercept such problems from the start, to capture their cause, and to fix them at their origin. The Solution SIMULIA ultimately chose to employ the MemoryScape memory debugger from TotalView Technologies. MemoryScape is an easy-to-use, graphical, interactive memory debugger that helps developers, build engineers, and QA testers identify, inspect and resolve difficult memory problems in C, C++ and FORTRAN, including complex multi-process and multi-threaded programs. Designed to be an integrated part of the software development process, MemoryScape allows development teams to watch for memory leaks and monitor memory usage while an application is running. It enables developers to monitor heap memory, view memory usage, locate memory leaks, track memory events and show corrupted memory. Developers can also save and compare memory states and compile sophisticated memory reports. MemoryScape is non-intrusive, so developers can find memory problems without recompiling, and without waiting all day for even the smallest test to run. Since the company began using MemoryScape, developers have been able to find memory problems easily and fix them very quickly — with little effort. “MemoryScape accelerates our ability to identify where and why problems occur in our software,” said Nick Monyatovsky, software engineer at SIMULIA. “When a problem occurs, MemoryScape’s GUI provides a very clear view of the source of the problem, and its scripting interface allows us to automate the bug detection process and use it preventively. Now, we run MemoryScape continuously, around the clock. It has been very effective in uncovering the hidden latent errors in our code. It finds problems that defy the regular testing methods, and it allows us to fix them proactively.” Background Historically, the task of finding and fixing such memory bugs has been a time-consuming and complex task for SIMULIA developers; finding and then understanding these bugs would take a considerable amount of effort and was very expensive because it involved a great deal of human time and attention. The problems would occur in fully optimized builds when run on loaded machines, where there is strong contention for memory between processes, and would also usually occur in very long running jobs that often take days. Additionally, in many cases there would be no core-dump. Even in the cases where there was a core-dump, it would point to the result of the corruption, not the source of it. The source may often be quite a distance away from the point of the crash. On the initial scan, MemoryScape found about 12 problems — and in every instance, it was a memory bug. MemoryScape has provided SIMULIA developers with a very effective, inexpensive way to find memory problems without spending a lot of time on the process. The data provided by MemoryScape’s reporting mechanism provides details for developers to immediately see where a problem lies. When MemoryScape triggers an error, it saves a memory snapshot. This snapshot later gives a developer a very good picture of the place of the error, the memory contents, and the context of execution at that time. How the MemoryScape Memory Debugger Helps The feature of MemoryScape that SIMULIA developers have found to be the most valuable in their development process is the fact that the tool is scriptable and therefore can be run automatically. When the debugger finds a problem, it gives developers the information to see it right away and the fix is easy after that. This has led to tremendous cost and time savings at SIMULIA. SIMULIA developers have also found MemoryScape to be faster in comparison to other checkers on the market that are much more troublesome to work with, are much slower, and require expensive instrumentation. “MemoryScape is fast enough that we use it to cover a lot of ground. It has provided us with a very efficient way of improving our QA substantially,” Monyatovsky added. Developers also like the feature of visualizing and analyzing memory leaks, and classifying them by source file. This information is invaluable, and is very hard to obtain by using anything else. Another major strength of MemoryScape is its ability to execute and understand parallel MPI jobs, a key area of SIMULIA’s focus right now. Tools that operate in this environment are very important to the company’s developers.