Giter Club home page Giter Club logo

Comments (1)

spasmann avatar spasmann commented on September 23, 2024

To use the function timer add the argument --use_timer=True to your terminal command. Ex: python input.py --use_timer=True or python input.py --use_timer=True --mode=numba.

The timing functionality uses wrappers, located in decorators.py, to place timing calls before and after a function call. The wrapper must go into objmode() to use call MPI.Wtime() for any numba-fied function. This places significant overhead on small functions that are called many times.

As jpmorgan98 listed. There are two TODO items:

  1. The timing calls are not configured for multiple processors. So each processor will record its own times but there is no compilation at the end.
  2. There is significant discrepancy between the decorator and native runtime reports when in numba mode. See the example outputs below

Below are example outputs from the Slab Absorbium example with N=1e5. The first image is from a pure Python run, notice the discrepancy between the native runtime report and decorator runtime report is 1.0 seconds for a 244 second run.

Picture1

Here is an output of the same problem in Numba mode. In this case, the discrepancy is 92.8 seconds. The decorator seems to be ignoring compilation time? But I'm not sure how that's possible.

image

from mcdc.

Related Issues (20)

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.