Hello,
I am attempting to change the buffering of my output to line buffering instead of full buffering. I need this because I keep having problems with machines restarting which makes me lose data because it is all sitting in a buffer. I am trying to use setvbuf3f to accomplish this. I can change stdout from line buffering to no buffering (as a test to see if the function ever works) but I cannot set the buffering on any of the unit numbers that I open myself, it always returns 1. I am using it as follows:
I have tried changing the buffer size but that doesn't seem to be the problem. What am I doing wrong? I am making the calls in a program that uses MPI, will that effect this function? I am using the PGI 6.1 compiler on an x64 Linux machine.
Thanks
I am attempting to change the buffering of my output to line buffering instead of full buffering. I need this because I keep having problems with machines restarting which makes me lose data because it is all sitting in a buffer. I am trying to use setvbuf3f to accomplish this. I can change stdout from line buffering to no buffering (as a test to see if the function ever works) but I cannot set the buffering on any of the unit numbers that I open myself, it always returns 1. I am using it as follows:
Code:
[COLOR=blue]OPEN[/color](21,[COLOR=red]FILE=[/color][COLOR=teal]'aNewFile.txt'[/color])
ierr = [COLOR=blue]setvbuf3f[/color](21,1,512)
[COLOR=blue]write[/color](21,*) [COLOR=teal]'Some data'[/color]
I have tried changing the buffer size but that doesn't seem to be the problem. What am I doing wrong? I am making the calls in a program that uses MPI, will that effect this function? I am using the PGI 6.1 compiler on an x64 Linux machine.
Thanks