On 2008-10-29 22:15-0000 Andrew Ross wrote: > > Various people have used valgrind (myself included) for checking out > issues with plplot. It is a very useful tool. > > I've added support for a --debug option to plplot-test.sh. By default this > will run all the examples through valgrind and save the output in a log > file, one file per example. This will make automatically testing the > examples using valgrind much simpler. You can also add a command to the > --debug option, e.g. > plplot-test.sh --debug="valgrind --trace-fds=yes" > if you want to use different command line options / a different > debugging command. > > Currently only the C, C++, f77 and f95 scripts support this option. I'm > not sure whether it is worth adding support for interpreted languages or > other languages like java which do internal garbage collection. The > changes would be relatively trivial if required. > > I've already spotted and fixed a couple of issues. The memory leaks for > the gd driver (probably to do with libfreetype rather than plplot) are > still outstanding.
I had to fix one shell-scripting problem (DEBUG_CMD was being set to "." in error, revision 8984), but after that ctest ran fine and so did "./plplot-test.sh --debug --front-end=c --device=svg" (in the install tree). That gave an absolutely clean valgrind result for -dev svg for every example. Your automation idea is good since it would have been a pain to run all of those valgrind examples by hand. > > Note that this can take a long time to run. Yep, time of the above command gave real 7m29.610s user 7m25.608s sys 0m2.068s on my 2.4GHz box. > particularly for example 20 > which has become quite slow due to the size of the images. We might want > to think about a smaller image as an example. Example 20 does take a long time regardless of context so by default perhaps we should use a smaller image and only on special occasions (such as generating the website) use a special option to use the current full-size image. I do like lena just the way she is on our website. :-) > > Finally, there is currently no way to use this option with ctest. I > can't see an easy way without creating lots of extra tests which you > wouldn't want to run all the time for speed, or making it an option set > when you run cmake. Yes, with times like above for a specific front-end and device it is not something you want to do automatically with ctest for all our different combinations of front-ends and devices. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
