How disable warning printing

Asked by eduardo rodriguez

Hello,

I am running FEniCS dolfin in python2.6.
When I set the program to work in paralell with eight processors using this sentence:
parameters["num_threads"]=8
while running the program in each iteration it appears three times the follow warning:

** Warning: Form::coloring does not properly consider form type.

I have read that this is not a problem and only means that the paralell computing needs improvements in the base code, the problem is that I am running a very large optimization problem which at the end generates more than 3 million times the warning above, since I have to write the output in a file it will be very beneficial if I may be able to remove this warning line.

Also I get this line each time I project something (I think) if it is possible it will be beneficial as well get rid of this sentence

Solving linear system of size 2297 x 2297 (PETSc Krylov solver).

If more code is needed to make the example understandable do not hesitate in ask for it

Sincerely yours
Eduardo

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
eduardo rodriguez
Solved:
Last query:
Last reply:
Revision history for this message
Patrick Farrell (pefarrell) said :
#1

You could

python my_script.py | grep -v 'Form::coloring' | grep -v 'Solving linear system'

Or you could try set_log_level(ERROR).

Revision history for this message
eduardo rodriguez (edu-ampu4) said :
#2

Thanks Patrick, it worked perfectly

I didn't know you also answer the questions here

Regards.