Running MG5 in debug mode

Asked by Rikkert Frederix

When running ./bin/mg5 locally, the first line printed is *always*
"Running MG5 in debug mode"
Why is this? I can change the logging information by setting 'stdout_level = INFO' in the ~/.mg5/mg5_configuration, but I cannot seem to turn this debug mode off. Is there any disadvantage of using this debug mode, and, if so, how can I switch it off?
Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi Rikkert,

You are running in debug mode since you use a version of MG5 which comes from bzr and not from the download package.
Since bzr version of MG5 are for developer only (or beta version) the debug mode is the default.

If you want to stop the debug mode you can
1) remove the ./bin/create_release.py script ( don't do that if you use that bzr branch as a development version)
2) launch mg5 in the following way python -O ./bin/mg5

The difference between debug mode from the production mode /debug mode are:
1) the value of global variable __debug__ (part of the code are call only if __debug__ is on true)
2) all the assert XXXX statement are not evaluated in production mode (but they are in debug mode)
3) the logger level is by default at INFO (production mode) against DEBUG ( debug mode)

Running in MG5 production mode is (slightly) faster (since it didn't perform a serie of sanity check) but the error are less explicit.
(since the error is often not discover directly but later). Pointless to say that the difference of speed is in fact quite negligible.

Cheers,

Olivier

On Aug 9, 2012, at 4:45 AM, Rikkert Frederix <email address hidden> wrote:

> New question #205378 on MadGraph5:
> https://answers.launchpad.net/madgraph5/+question/205378
>
> When running ./bin/mg5 locally, the first line printed is *always*
> "Running MG5 in debug mode"
> Why is this? I can change the logging information by setting 'stdout_level = INFO' in the ~/.mg5/mg5_configuration, but I cannot seem to turn this debug mode off. Is there any disadvantage of using this debug mode, and, if so, how can I switch it off?
> Thanks.
>
> --
> You received this question notification because you are a member of
> MadTeam, which is an answer contact for MadGraph5.

Can you help with this problem?

Provide an answer of your own, or ask Rikkert Frederix for more information if necessary.

To post a message you must log in.