Valgrind: Difference between revisions
Created page with '[http://valgrind.org/ Valgrind] is a tool that can detect memory leaks and invalid attempts to access memory, or perform actions that depend on the contents of uninitialised memo…' |
No edit summary |
||
| Line 4: | Line 4: | ||
<source lang=sh> | <source lang=sh> | ||
# enter your working directory | |||
cd ~/ascend | |||
# build the test suite, plus libascend (dependency) | |||
scons -j2 test | scons -j2 test | ||
# you might also need to build the solvers as another step | |||
scons -j2 solvers | |||
# set up your runtime environment | |||
export ASCENDLIBRARY=~/ascend/models | export ASCENDLIBRARY=~/ascend/models | ||
export LD_LIBRARY_PATH=~/ascend:/usr/lib/coin:/usr/lib/coin/ThirdParty | export LD_LIBRARY_PATH=~/ascend:/usr/lib/coin:/usr/lib/coin/ThirdParty | ||
# run the test suite through valgrind in 'memcheck' mode: | |||
valgrind --suppressions=tools/valgrind/suppressions --tool=memcheck --leak-check=full --show-reachable=yes test/test TESTNAME | valgrind --suppressions=tools/valgrind/suppressions --tool=memcheck --leak-check=full --show-reachable=yes test/test TESTNAME | ||
</source> | </source> | ||
Revision as of 06:43, 15 February 2011
Valgrind is a tool that can detect memory leaks and invalid attempts to access memory, or perform actions that depend on the contents of uninitialised memory.
When running ASCEND through valgrind, the following approach is suggested:
Invalid language.
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
a4c, abap, abc, abnf, actionscript, ada, agda, alan, algol, ampl, amtrix, applescript, arc, arm, as400cl, ascend, asciidoc, asp, aspect, assembler, ats, autohotkey, autoit, avenue, awk, ballerina, bat, bbcode, bcpl, bibtex, biferno, bison, blitzbasic, bms, bnf, boo, c, carbon, ceylon, charmm, chill, chpl, clean, clearbasic, clipper, clojure, clp, cmake, cobol, coffeescript, coldfusion, conf, cpp2, critic, crk, crystal, cs_block_regex, csharp, css, d, dart, delphi, diff, dockerfile, dts, dylan, ebnf, ebnf2, eiffel, elixir, elm, email, erb, erlang, euphoria, exapunks, excel, express, factor, fame, fasm, felix, fish, fortran77, fortran90, frink, fsharp, fstab, fx, gambas, gdb, gdscript, go, graphviz, haml, hare, haskell, haxe, hcl, html, httpd, hugo, icon, idl, idlang, inc_luatex, informix, ini, innosetup, interlis, io, jam, jasmin, java, javascript, js_regex, json, jsp, jsx, julia, kotlin, ldif, less, lhs, lilypond, limbo, lindenscript, lisp, logtalk, lotos, lotus, lua, luban, makefile, maple, markdown, matlab, maya, mercury, meson, miranda, mod2, mod3, modelica, moon, ms, msl, mssql, mxml, n3, nasal, nbc, nemerle, netrexx, nginx, nice, nim, nix, nsis, nxc, oberon, objc, ocaml, octave, oorexx, org, os, oz, paradox, pas, pdf, perl, php, pike, pl1, plperl, plpython, pltcl, po, polygen, pony, pov, powershell, pro, progress, ps, psl, pure, purebasic, purescript, pyrex, python, q, qmake, qml, qu, r, rebol, rego, rexx, rnc, rpg, rpl, rst, ruby, rust, s, sam, sas, scad, scala, scilab, scss, shellscript, slim, small, smalltalk, sml, snmp, snobol, solidity, spec, spn, sql, squirrel, styl, svg, swift, sybase, tcl, tcsh, terraform, tex, toml, tsql, tsx, ttcn3, txt, typescript, upc, vala, vb, verilog, vhd, vimscript, vue, wat, whiley, wren, xml, xpp, yaiff, yaml, yaml_ansible, yang, zig, znn
where in the above, TESTNAME is replaced by a valid test case or test suite, use test/test -l and test/test -tSUITENAME to list available options.
The above approach requires that you have CUnit installed on your system, and that you have configured the 'scons' flags correctly so that it is detected on your system.