How can i mute PETSc?

How can I mute the messages coming from PETSc such as " — system solved with PETSc (in …)"?

Can I use verbosity to only print my cout massages to the console?

-v 0 on your command line or verbosity = 0 in your .edp script.
These messages don’t come from PETSc by the way, but from the PETSc <> FreeFEM interface, just to be precise :smile:

With verbosity=0 I don’t get any output.

That’s what you asked for, right?

I want to see my cout messages only :smile:

If you don’t see your cout, that means that your cout are guarded by if(verbosity). Simple example:

$ cat test.edp
verbosity = 0;
cout << "foo" << endl;
if(verbosity > 0)
    cout << "bar1" << endl;
verbosity = 1;
if(verbosity > 0)
    cout << "bar2" << endl;
$ FreeFem++ test.edp

I think I found the problem but not the solution:


real t=clock();
int n=0;

	if(clock()-t > 1){
		cout << n <<endl;

From this delayed loop (eg. from solving systems) the messages are only printed ones the program has finished.

This has nothing to do with the verbosity of PETSc.