NanoComp / mpb

MIT Photonic-Bands: computation of photonic band structures in periodic media
GNU General Public License v2.0
165 stars 89 forks source link

Add verbosity flag for MPB #119

Closed RobinD42 closed 4 years ago

RobinD42 commented 4 years ago

Fixes #116

Note that since there is also mpb code (python wrappers and such) in the Meep lib then there will be another PR there that is part of this change.

stevengj commented 4 years ago

The Travis failure on MacOS seems to be new?

Not sure what is going on, since it seems like a convergence problem, but this PR shouldn't have changed anything except for output… maybe the compiler or library versions changed?

RobinD42 commented 4 years ago

I'm looking into the test failure now.

RobinD42 commented 4 years ago

The tests pass for me on my OSX machine, so it may be that something has changed on Travis.

oskooi commented 4 years ago

The problem was indeed with Travis. After restarting just the failing macOS test, it's passing now.

thchr commented 4 years ago

This seems to have added some I-think-unintended spam to the ordinary operation of MPB from the command line (see e.g. the CI logs: https://travis-ci.org/github/NanoComp/mpb/jobs/729108444#L4730)

I've indicated what I think the issue is above; if either @RobinD42 or @stevengj can confirm this is the right fix, I can submit a PR.

RobinD42 commented 4 years ago

Yes, there is still some adjustments that need to be made when checking the verbosity level. To keep things simpler when migrating to this new scheme I just checked for 2 everywhere. Previously most things were unconditional, or were based on a boolean flag, so the first pass was intended mainly to switch to the new verbosity flags, with the fine-tuning to happen later.

Any help or suggestions for that fine-tuning is welcome.

stevengj commented 4 years ago

Please feel free to submit a PR to make the default less verbose.