Stop TaskManager console message

1 week 1 day ago #1843 by hvwahl
Hi everyone,

is there any way I can stop the printing of the message
task-based parallelization (C++11 threads) using xx threads
to the console whenever TaskManager() gets called? Unfortunately, changing ngsglobals.msg_level does not help.

Best wishes,
Henry

Please Log in or Create an account to join the conversation.

1 week 1 day ago #1844 by Guosheng Fu
I thought that line is helpful...
But if you build ngsolve from source, you may simply comment out the line
78: std::cout << "task-based parallelization (C++11 threads) using "<< task_manager->GetNumThreads() << " threads" << std::endl;
in taskmanager.cpp in the source code and recompile.

Please Log in or Create an account to join the conversation.

1 week 1 day ago #1845 by hvwahl
Hi Guosheng,

thank you for the hint :) ! The line you suggested looked slightly different in the sources I have, but from that point I now found a way from the python end:
from pyngcore import SetLoggingLevel, LOG_LEVEL
SetLoggingLevel(LOG_LEVEL.Warn,"TaskManager")
Because I call the TaskManager only where its needed (twice in every iteration of my time loop), my own output is drowned in the console by this message.

Best wishes,
Henry

Please Log in or Create an account to join the conversation.

1 week 20 hours ago #1846 by matthiash
Hi Henry and Guosheng,

Thank you all for the investigation. I changed the code in NGSolve such that
ngsglobals.msg_level = level
also sets the logging level in ngcore accordingly, see commit
github.com/NGSolve/ngsolve/commit/431f0c...19258bcaee780a5f51b3

Setting the level to 3 or below mutes the message of the TaskManager.

I also issued a nightly build with this version which is already online.

Best,
Matthias
The following user(s) said Thank You: hvwahl

Please Log in or Create an account to join the conversation.

© 2019 Netgen/NGSolve