# Fortran IO giving customers grief

This is annoying. Intel’s compilers do unbuffered IO by default (as in out of the box). Which means if you have code like this:
 #define BIG 1000000000 real*8 X(BIG) do i=1,BIG write (unit=10,*) X(i) enddo
then you are going to suffer terrible performance, as Fortran (Intel’s compiled version) will do a flush at the end of each write. Which means, for a high performance network file system, you are going be hitting it with many ~25 byte writes. Rather than a larger buffer, which still might not be great … but at least it won’t cause as much pain.
I know we can switch it to buffered mode. I know we can tweak and tune the IO at the source level in general, but often not in specific cases.
I’d like to get a nice drop in library that did IO intelligently. Ugh.
This isn’t Intel’s fault, this is a design decision on their part, and we can pretty easily work around some aspects of it. But we need a way to do this in general.

### 3 thoughts on “Fortran IO giving customers grief”

1. All you need to do is set \$| to 0, er, oh wait, that’s Perl.. 😉

2. @Chris
heh …

3. “This isn???t Intel???s fault, this is a design decision on their part.” To me, this means that it is precisely Intel’s fault.
i have been impressed with Intel as a hardware producer, but, over the years, worse than unimpressed with them as a software producer.
-SATD.