Giter VIP home page Giter VIP logo

petscplot's Introduction

PETScPlot is a simple tool for plotting convergence rates and scalability from output logs of PETSc programs.

Dependencies:

python-2.5 or later: http://python.org
numpy: http://numpy.org
matplotlib: http://matplotlib.sourceforge.net

Usage:

[Read the doc strings, they are more likely to be up-to-date.  Also run
with -help.]

Run your program with -{ksp,snes}_{monitor,converged_reason} and
redirect the output into a file, perhaps for multiple problem sizes, or
on different machines.  If you want timing information, also use
-log_summary.

Note: Currently the problem size parsing is specific to
src/snes/examples/tutorials/ex48, it really needs to be made generic,
but that requires the user to write a small code snippet to parse their
header.

Then pass series of log files to petscplot, as in the following examples.

petscplot -t algorithmic foo{2,3,4,5,6}.log : bar{2,3,4,5,6}.log

  Plots average number of Krylov iterations per nonlinear iteration
  versus number of nodes, on a log-log scale.

petscplot --type=algorithmic foo{2,3,4,5,6}.log : bar{2,3,4,5,6}.log \
  --legend-labels='Foo Algorithm:Bar' --output=foobar.png

  Uses the given legend (instead of first filename in each series) and
  directs output to the PNG file.

petscplot -t snes -m poster gridsequenced.log -o foobar.eps

  Plots hybrid linear and nonlinear residuals for a grid-sequenced
  simulation, formatted for placement on a poster, in EPS format (short
  style options).

petscplot -t weak SERIES [ : SERIES ] ...

  Not implemented yet, but necessary data has been parsed.

petscplot -t strong [--stage STAGE] [--event EVENT] SERIES [ : SERIES ] ...

  Plots solve time versus number of procs on a log-log scale with the
  optimal slope=-1 line shown.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.