Dear all, How can I profile my firedrake script to known the allocation of the computational time? I tried python -m cProfile -o output.out my_script.py but the output file is not as expected (part of it is pasted below). Thank you, Floriane output.out: {(sG/Users/mmfg/firedrake/lib/python2.7/site-packages/sympy/core/numbers.pyi?t_eval_is_prime(iig???????>g?3??O?>{(sK/Users/mmfg/firedrake/lib/python2.7/site-packages/sympy/core/assumptions.pyi?t_ask(iig???????>g?3??O?>0(s2/Users/mmfg/firedrake/src/ufl/ufl/tensoralgebra.pyisCofactor(iig???????>g???????>{(s2/Users/mmfg/firedrake/src/ufl/ufl/tensoralgebra.pyi<module>(iig???????>g???????>0(sH/Users/mmfg/firedrake/lib/python2.7/site-packages/sympy/series/gruntz.pyivR(iig,C??6?gT?qs*9?{(sH/Users/mmfg/firedrake/lib/python2.7/site-packages/sympy/series/limits.pyiR(iig,C??6?gT?qs*9?0(sI/Users/mmfg/firedrake/lib/python2.7/site-packages/mpmath/ctx_mp_python.pyiHt _constant(iig?h㈵??>g?h㈵??>{(sI/Users/mmfg/firedrake/lib/python2.7/site-packages/mpmath/ctx_mp_python.pyiR(iig?h㈵??>g?h㈵??>0(s0/Users/mmfg/firedrake/src/PyOP2/pyop2/caching.pyi{t__new__(i/i6g1{?v?A?gV??6o???{(s-/Users/mmfg/firedrake/src/PyOP2/pyop2/base.pyi>tset(iigT?qs*?>g??̔???>(s-/Users/mmfg/firedrake/src/PyOP2/pyop2/base.pyi? __init__(iig?k$ ??gM0?k????(sB/Users/mmfg/firedrake/src/firedrake/firedrake/functionspaceimpl.pyi?texterior_facet_node_map(iig?h㈵??>g{?V???0?(s-/Users/mmfg/firedrake/src/PyOP2/pyop2/base.pyi8 ttoset(iig???????>g???????>(s9/Users/mmfg/firedrake/src/firedrake/firedrake/assemble.pyi?t _assemble(iig ?F??g"O???|??(sB/Users/mmfg/firedrake/src/firedrake/firedrake/functionspaceimpl.pyidof_dset(iig???????>gT?qs*?>(s5/Users/mmfg/firedrake/src/firedrake/firedrake/mesh.pyi?tlocal_facet_dat(iig?h㈵??>g?t><K??(s-/Users/mmfg/firedrake/src/PyOP2/pyop2/base.pyi?
On 19/10/17 10:35, Floriane Gidel [RPG] wrote:
Dear all,
How can I profile my firedrake script to known the allocation of the computational time?
I tried
python -m cProfile -o output.out my_script.py
but the output file is not as expected (part of it is pasted below).
This profile is a binary file which you can analyse in various ways. Here is a nice introduction: https://julien.danjou.info/blog/2015/guide-to-python-profiling-cprofile-conc... In addition to this, a high level view of the time breakdown can be obtained by running: python my_script.py -log_view This prints a summary of the timings for all the PETSc calls and the main (computationally expensive firedrake calls). If you send this, we can help to look at it. Chapter 13 of the PETSc manual (http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf) also gives good information on how to interpret this data. Cheers, Lawrence
Great, I'll look at this, thank you Lawrence. Floriane ________________________________ De : firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> de la part de Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> Envoyé : jeudi 19 octobre 2017 10:43:04 À : firedrake@imperial.ac.uk Objet : Re: [firedrake] Profiling On 19/10/17 10:35, Floriane Gidel [RPG] wrote:
Dear all,
How can I profile my firedrake script to known the allocation of the computational time?
I tried
python -m cProfile -o output.out my_script.py
but the output file is not as expected (part of it is pasted below).
This profile is a binary file which you can analyse in various ways. Here is a nice introduction: https://julien.danjou.info/blog/2015/guide-to-python-profiling-cprofile-conc... In addition to this, a high level view of the time breakdown can be obtained by running: python my_script.py -log_view This prints a summary of the timings for all the PETSc calls and the main (computationally expensive firedrake calls). If you send this, we can help to look at it. Chapter 13 of the PETSc manual (http://www.mcs.anl.gov/petsc/petsc-current/docs/manual.pdf) also gives good information on how to interpret this data. Cheers, Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (2)
- 
                
                Floriane Gidel [RPG]
- 
                
                Lawrence Mitchell