Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Stop TaskManager console message

More
4 years 7 months ago #1843 by hvwahl
Hi everyone,

is there any way I can stop the printing of the message
Code:
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
More
4 years 7 months 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.
More
4 years 7 months 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:
Code:
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
More
4 years 7 months ago #1846 by matthiash
Hi Henry and Guosheng,

Thank you all for the investigation. I changed the code in NGSolve such that
Code:
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
Time to create page: 0.104 seconds