[petsc-users] detailed documentation for benchmarkExample.py

Storm Weiner stormweiner at berkeley.edu
Fri Jun 15 17:30:47 CDT 2018


Hey there,

I'm trying to use the benchmark example script but I don't understand the
usage.

For reference, I am talking about the script located at
*petsc/src/benchmarks/benchmarkExample.py*

I execute using the suggested example parameters at the bottom of the
script


*>> ./src/benchmarks/benchmarkExample.py --events IntegBatchCPU
IntegBatchGPU IntegGPUOnly --num 52 DMComplex --refine 0.0625 0.00625
0.000625 0.0000625 --blockExp 4 --order=1 CPU='dm_view show_residual=0
compute_function batch' GPU='dm_view show_residual=0 compute_function batch
gpu gpu_batches=8'*


















*Namespace(batch=False, comp=4, daemon=False, events=['VecMDot',
'VecMAXPY', 'KSPGMRESOrthog', 'MatMult', 'VecCUSPCopyTo',
'VecCUSPCopyFrom', 'MatCUSPCopyTo'], gpulang='OpenCL', library='SNES',
module='summary', num=50, runs=["CPU='pc_type=none", 'mat_no_inode',
'dm_vec_type=seq', "dm_mat_type=seqaij'", "GPU='pc_type=none",
'mat_no_inode', 'dm_vec_type=seqcusp', 'dm_mat_type=seqaijcusp',
"cusp_synchronize'"], size=['10', '20', '50', '100'],
stage='Main_Stage')Executing:
/g/g19/weiner6/petsc/arch-mvapich-fftw3/lib/snes/ex50 -preload off
-log_summary summary.dat -log_summary_python summary.py -'pc_type none
-da_grid_x 10 -da_grid_y 10/bin/sh: -c: line 0: unexpected EOF while
looking for matching `''/bin/sh: -c: line 1: syntax error: unexpected end
of fileTraceback (most recent call last):  File "./benchmarkExample.py",
line 453, in <module>    run_DMDA(ex, name, opts, args, sizes, times,
events, log=log)  File "./benchmarkExample.py", line 356, in run_DMDA
processSummary('summary', args.stage, args.events, times[name],
events[name])  File "./benchmarkExample.py", line 123, in processSummary
m = __import__(moduleName)ImportError: No module named summary*



There are two issues here.

1) the script attempts to run *petsc/arch-mvapich-fftw3/lib/snes/ex50*
when it should attempt to run
*petsc/src/<library>/examples/tutorials/ex<num>* as indicated in the help
menu. In fact, there is no *petsc/<arch>/lib/snes* directory.

2) The *"No module named summary"* error causes the python script to crash.

What is going on here? How should I be using this script?  Is there any
documentation to describe the usage?  I find the help menu to be a bit too
sparse and the source code too dense to follow closely.


More specifically, I want to use this profiling script for more than just
the standard petsc examples.  If I understand the source correctly, the
simplest way to accomplish that is to create a new directory tree
*petsc/src/dummy_lib/examples/tutorials
*and populate it with *ex<num> *compiled executables.  I would then access
these by running benchmarkExample.py with the *--library dummy_lib*
argument.  Is this a reasonable way to benchmark arbitrary petsc programs?


Thanks for your time,
Storm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180615/0f72b338/attachment.html>


More information about the petsc-users mailing list