https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91030
--- Comment #11 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to David Edelsohn from comment #10)
> With EXT4: difference is 2x
> With SHM: difference is 4.5x
> With GPFS: difference is 10x
>
> Is libgfortran doing something unusual with the creation of files?
Not really, but there is one difference.
Stracing with -fconvert=native gives
open("out.dat", O_RDWR|O_CREAT|O_CLOEXEC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2000000008, ...}) = 0
write(3, "\0\0\0\0", 4) = 4
write(3,
"\0\0\0\0\0\0\360?\0\0\0\0\0\0\360?\0\0\0\0\0\0\360?\0\0\0\0\0\0\360?"...,
2000000000) = 2000000000
lseek(3, 0, SEEK_SET) = 0
write(3, "\0\2245w", 4) = 4
lseek(3, 2000000004, SEEK_SET) = 2000000004
write(3, "\0\2245w", 4) = 4
ftruncate(3, 2000000008) = 0
close(3) = 0
and using -fconvert=swap
open("out.dat", O_RDWR|O_CREAT|O_CLOEXEC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2000000008, ...}) = 0
write(3,
"\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0"...,
7684) = 7684
write(3,
"?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0"...,
8192) = 8192
write(3,
"?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0"...,
8192) = 8192
[...]
write(3,
"?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0"...,
8192) = 8192
write(3,
"?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0"...,
8192) = 8192
write(3,
"?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0?\360\0\0\0\0\0\0"...,
5632) = 5632
lseek(3, 0, SEEK_SET) = 0
write(3, "w5\224\0", 4) = 4
lseek(3, 2000000004, SEEK_SET) = 2000000004
write(3, "w5\224\0", 4) = 4
ftruncate(3, 2000000008) = 0
close(3) = 0
Would this make such a large difference?