[petsc-dev] Opening XML performance log files in browsers
Lisandro Dalcin
dalcinl at gmail.com
Wed Jun 13 15:59:50 CDT 2018
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: petsc-performance-view
Type: application/octet-stream
Size: 3324 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180613/7c733d88/attachment.obj>
More information about the petsc-dev
mailing list