[petsc-dev] Opening XML performance log files in browsers
Smith, Barry F.
bsmith at mcs.anl.gov
Wed Jun 13 16:17:42 CDT 2018
Looks ok to me (I haven't tested it). You could make a pull request.
I was able to use the manual process on my Mac, with Safari, Firefox, and Chrome in the past.
Barry
> On Jun 13, 2018, at 3:59 PM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>
> Making it work with the official instructions is cumbersome and I
> could not mange to get it working. Running `python3 -m http.server` is
> far easier, but you still have to copy the XSL file to the working
> directory. So I got totally upset and wrote my own solution, because
> you know, complaints should come with new code or patches.
>
> Anyone interested, please download and chmod +x the attached Python
> script (should run with either Py 2 or Py 3).
>
> Any suggestions to improve it most welcome. Only tested on Mac with
> Homebrew Python 2 and 3 and Google Chrome. I'll test it tomorrow on
> Linux.
>
> Barry, please tell me if this look good enough to add to PETSc under
> $PESTC_DIR/lib/petsc/bin
>
> Note: This looks in $PETSC_DIR for the XSL file, if not found it is
> read and served on the fly from official git repo branch maint.
>
> Note: The default port "0" in the code means that the OS will pick a
> random free port. Seems the right thing to do for this particular use
> case. Not sure how well this plays with firewalls.
>
> $ ./petsc-performance-view
> usage: petsc-performance-view [-h] [-b ADDRESS] [-p PORT] LOGFILE
> petsc-performance-view: error: too few arguments
>
> $ ./petsc-performance-view -h
> usage: petsc-performance-view [-h] [-b ADDRESS] [-p PORT] LOGFILE
>
> Open a new browser window to visualize a PETSc XML log file.
>
> positional arguments:
> LOGFILE PETSc XML log filename
>
> optional arguments:
> -h, --help show this help message and exit
> -b ADDRESS, --bind ADDRESS
> Specify bind address
> -p PORT, --port PORT Specify port
>
> $ ./petsc-performance-view log.xml
> # should open browser with log.xml
> # and the script should exit immediately
> # to not seize your command line
>
>
> --
> Lisandro Dalcin
> ============
> Research Scientist
> Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
> Extreme Computing Research Center (ECRC)
> King Abdullah University of Science and Technology (KAUST)
> http://ecrc.kaust.edu.sa/
>
> 4700 King Abdullah University of Science and Technology
> al-Khawarizmi Bldg (Bldg 1), Office # 0109
> Thuwal 23955-6900, Kingdom of Saudi Arabia
> http://www.kaust.edu.sa
>
> Office Phone: +966 12 808-0459
> <petsc-performance-view>
More information about the petsc-dev
mailing list