Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Redirecting Pardiso output messages into a file

valene
Beginner
466 Views
Dear All,

I'm plugging the Pardiso solver to a finite elements software. As my OS is Windows, I cannot juste redirect the printed output on the screen to a text file. Is there any option to redirect the output messages to a file ?

Thanks,

Valene
0 Kudos
4 Replies
Alexander_K_Intel2
466 Views
Hi,
Do you call your example with PARDISO from command prompt or from studio?
With best regards,
Alexander Kalinkin
0 Kudos
Gonzalo_F_
Beginner
466 Views

Hello,

I am just wondering if someone has an answer to the question above, posted by Valene. Is there a way to redirect the Pardiso output messages to a different stream? I wrote a C++ program that calls the pardiso solver. The usual trick to redirect cout to something like ostream os is to do:

cout.rdbuf( os.rdbuf()),

but that will not work with pardiso. The output still goes to stdout.

Thank you in advance,

Gonzalo

0 Kudos
mecej4
Honored Contributor III
466 Views
I took a couple of the Pardiso C examples distributed with MKL in the examples/solverc/source directory, opened an Intel-C command window, compiled and ran the program with standard output redirected to a file. Everything worked fine. "valene"'s statement
As my OS is Windows, I cannot just redirect the printed output on the screen to a text file.
is wrong, at least for a standard console mode application. Both stdout and stderr can be redirected to a file in a Windows command window.
Redirecting streams after your program has started is a little trickier, but do you need to take that route? Please present a complete example code showing what the problems are.
0 Kudos
valene
Beginner
466 Views

Hi,

Thank you for your reply. I'm sorry it wasn't very clear. What I wanted to say is that I used Pardiso in a dll linked to my code, which has his own output. Of course, as a stand alone application, I could redirect the stream to a file from a windows command window.

I was just comparing to other programs such as Mumps which has an argument to set the stream for the output. I thought maybe it was possible with Pardiso too, in an easy way. 

Thank you again for your reply. Don't bother too much for that.

0 Kudos
Reply