Git Product home page Git Product logo

Comments (3)

Thinkpiet avatar Thinkpiet commented on August 23, 2024 1

@rubenhorn There is already a way to get the MPI rank anywhere, without passing it everywhere or calling MPI_comm_rank excessively: coupling::indexing::IndexingService<dim>::getInstance().getRank().

Note that it will always return the rank relative to the PinT domain (i.e. temporal subdomain if the simulation is time parallel), not the rank in MPI_COMM_WORLD, but I guess that is actually desired here. (For writing output to the logging system from time parallel simulations, the 'time local' rank AND the PinT domain number should be printed, not the global rank)

from mamico.

rubenhorn avatar rubenhorn commented on August 23, 2024

In general there is a lot of std::cout << ... (1258 occurrences to be exact).
Perhaps we should (gradually) replace them with a logger that takes either verbosity level or tag as a parameter, a runtime parameter to filter before output and a default option in CMake.

from mamico.

rubenhorn avatar rubenhorn commented on August 23, 2024

The logging function should also automatically include configurable additional information:

  • The Unix timestamp of the output
  • The MPI rank (How… call MPI_comm_rank every time? Seems excessive)
  • The __FILE__ and __LINE__ of the log statement (Requires use of a macro, but I think it may be permissible if it is only used as a simple wrapper for the logging function)

from mamico.

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.