<html><body>Od: Peter Blaha <pblaha@theochem.tuwien.ac.at><br><aside>
Komu: A Mailing list for WIEN2k users <wien@zeus.theochem.tuwien.ac.at><br>
Datum: 31. 10. 2017 15:27:42<br>
Předmět: Re: [Wien] problems with gfortran when unit 6 is associated to file
</aside><br><blockquote data-email="pblaha@theochem.tuwien.ac.at">I can reproduce this.<br><br>Apparently, some "clever informatics-guy" has changed the default <br>behaviour, namely that<br><br>write(*,...    prints to stdout<br><br>while<br><br>write(6,...    prints to the connected file, and ONLY if it has not been <br>connected explicitly via an OPEN statement, it would print to stdout.<br><br>Now, in gfortran one has changed that to "*" = "6"  (why this limitation ??)<br><br>We have been using this different behaviour of unit=* or 5 and 6 (for <br>read and write) in several places, when we want to alert a user of a <br>certain fact (like "inversion is (not) present).<br><br>I'll change in SRC_symmetry all "write(6," to "write(66,", which should <br>fix this problem (and also modify x_lapw for the corresponding def file).<br><br>There might be similar problems in other parts. Let me know if you find one.<br><br>Regards</blockquote><p> </p><p>Thanks for looking into this.<br></p><p>I did not detect any more problems so far, however since this type of problems can be easily undetected (eg. this can result in extra lines  in output files and the unlucky programs trying to parse the files later could be in troubles, but not necessarily visibly crashing...so the problems can stay hidden), IMO it would be better to stop using the unit 6 for file output all over the place. If this is too much work  I can volunteer to prepare some patches (on top of 17.1) to change the output files from unit 6 to 66 (or some other) all over the place. This should be quite easy grep&sed exercise. I'm using gfortran systems extensively so this is quite important for me. Might be a good idea to get rid of the usage of unit 5 for reading input files as well (in general fortran guides recommend using unit numbers above 9 for file input/output).</p><p>Best regards</p><p>Pavel<br></p></body></html>