Fortran Turn off writing to screen in Fortran 90

AI Thread Summary
A user inquires about a command to suppress all write(*,*) statements in a Fortran program to enhance performance during long runs. They seek a solution that avoids modifying each write statement with conditional checks. A suggestion is made to redirect standard output to /dev/null on Unix-based systems. The user then asks for a similar solution for Windows systems. The discussion highlights the need for efficient output management in lengthy computational tasks.
MichielM
Messages
22
Reaction score
0
Hi,
Is there a command available that makes the compiler ignore all write(*,*) statements?!
The thing is, I'm working on a code which will eventually run for several hours (perhaps days) to complete a single run. At the moment I'm testing so I write a lot of data to the screen in order to 'follow the program', but once I start do production runs the screen writing will probably take valuable time so then I want to turn it off.

Of course I can write if..then statements around each write(*,*) such that I can use a variable to switch writing on or off, but I was wondering if there might be a compiler command to suppress write(*,*) statements?!

Thanks in advance
 
Technology news on Phys.org
If you're using a Unix-based system, you can redirect standard output to /dev/null:

% myprogram > /dev/null
 
nice, thanks!

And if I use a windows system? (I have linux at home, but my university uses windows)
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Replies
8
Views
4K
Replies
16
Views
2K
Replies
2
Views
1K
Replies
11
Views
11K
Replies
8
Views
2K
Replies
6
Views
3K
Replies
8
Views
4K
Back
Top