Giter VIP home page Giter VIP logo

Comments (12)

atgeirr avatar atgeirr commented on August 20, 2024

It is indeed only printed once per initIteration() call. I guess using the VERBOSE preprocessor symbol could do the trick, if you want to disable it completely (you could put the code inside #ifdef VERBOSE...#endif and just not define it in you configuration). Handling verbosity levels in a more comprehensive manner could be worth a discussion on its own -- it has certainly not been given much effort so far.

from opm-core.

laods avatar laods commented on August 20, 2024

It is indeed only printed once per initIteration() call.

Sorry, oversaw that the if-statement where outside the for-loop.

Handling verbosity levels in a more comprehensive manner could be worth a discussion on its own -- it has certainly not been given much effort so far.

I fully agree.

I will try the '#ifdef VERBOSE' statement. Should I make a PR out of it, or wait for a discussion?

from opm-core.

atgeirr avatar atgeirr commented on August 20, 2024

Sure, put it in. Just make sure it accomplishes what you want first...

from opm-core.

laods avatar laods commented on August 20, 2024

How do I define VERBOSE when building?

from opm-core.

atgeirr avatar atgeirr commented on August 20, 2024

I assumed this would be trivial, but after playing a little with add_definitions and (when that failed) CMAKE_CXX_FLAGS, I have to admit it's not. As a temporary workaround you can #define VERBOSE somewhere in your code, but I do not have the cmake skills to suggest a better solution.

Perhaps this can help: the answer from freitass may be workable, but unfortunately seems to require modifying the cmake files.

http://stackoverflow.com/questions/8564337/define-a-preprocessor-macro-through-the-command-line

from opm-core.

bska avatar bska commented on August 20, 2024

I assumed this [defining VERBOSE] would be trivial, but after playing a little with [some tools] I have to admit it's not

You may want to look into Markus' suggestion of setting COMPILE_DEFINITIONS or COMPILE_FLAGS through something like

SET_PROPERTY(TARGET <executable> APPEND PROPERTY COMPILE_DEFINITIONS <name>=<value>)

The suggestion in context is at OPM/opm-porsol#39.

from opm-core.

rolk avatar rolk commented on August 20, 2024

after playing a little with ... CMAKE_CXX_FLAGS, I have to admit it's not [trivial]

Why is cmake ... -DCMAKE_CXX_FLAGS="-DVERBOSE" not a solution?

from opm-core.

bska avatar bska commented on August 20, 2024

Why is cmake ... -DCMAKE_CXX_FLAGS="-DVERBOSE" not a solution?

Does that append to or overwrite any preexisting CMAKE_CXX_FLAGS setting?

from opm-core.

rolk avatar rolk commented on August 20, 2024

Why is cmake ... -DCMAKE_CXX_FLAGS="-DVERBOSE" not a solution?

Does that append to or overwrite any preexisting CMAKE_CXX_FLAGS setting?

Depends on when and where you set them (and why not set VERBOSE there too?)

from opm-core.

laods avatar laods commented on August 20, 2024

cmake ... -DCMAKE_CXX_FLAGS="-DVERBOSE" worked for me. Thanks

from opm-core.

bska avatar bska commented on August 20, 2024

cmake ... -DCMAKE_CXX_FLAGS="-DVERBOSE" worked for me. Thanks

Does that mean that this issue is resolved--at least for the time being?

from opm-core.

laods avatar laods commented on August 20, 2024

Does that mean that this issue is resolved--at least for the time being?

Well, I still havn't made a PR that don't output 's was clampeds ...' unless VERBOSE is defined. I am working on it, but will have to discuss with my colleagues how much output we prefer.

from opm-core.

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.