public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem setting  buffer size for gfortran ( v 11.2)
@ 2022-02-23 16:10 Bertini, Denis Dr.
  2022-02-23 18:26 ` Harald Anlauf
  0 siblings, 1 reply; 20+ messages in thread
From: Bertini, Denis Dr. @ 2022-02-23 16:10 UTC (permalink / raw)
  To: fortran

Hi
Investigating some sporadical performance drop when using Fortran IO on our Lustre
shared file system, we realized that the buffer size used as default by the gnu fortran
compiler is 8 kiB only.
We wanted to change this default and according to the documentation, one has just to set
the environment variables:

 GFORTRAN_UNFORMATTED_BUFFER_SIZE
 GFORTRAN_FORMATTED_BUFFER_SIZE=
 GFORTRAN_UNBUFFERED_ALL=n

to increase the buffer size  during runtime.

Unfortunately isetting these variables  does not  change the default buffer size.
I tried with gfortran 8, 10, and the new 11.2.
Looking a the code, i found in
 io/unix.c
 that the default is set to the following value,

static const int FORMATTED_BUFFER_SIZE_DEFAULT = 8192;
static const int UNFORMATTED_BUFFER_SIZE_DEFAULT = 128*1024;

Of course, changing the default value and recompiling works and change accordingly the buffer size
It should nevertheless be possible to change these values without recompiling.
Is there something one should be aware of when setting these variables?

Best regards,
Denis

---------
Denis Bertini
Abteilung: CIT
Ort: SB3 2.265a

Tel: +49 6159 71 2240
Fax: +49 6159 71 2986
E-Mail: d.bertini@gsi.de

GSI Helmholtzzentrum für Schwerionenforschung GmbH
Planckstraße 1, 64291 Darmstadt, Germany, www.gsi.de

Commercial Register / Handelsregister: Amtsgericht Darmstadt, HRB 1528
Managing Directors / Geschäftsführung:
Professor Dr. Paolo Giubellino, Dr. Ulrich Breuer, Jörg Blaurock
Chairman of the GSI Supervisory Board / Vorsitzender des GSI-Aufsichtsrats:
Ministerialdirigent Dr. Volkmar Dietz

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-02-26 15:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 16:10 Problem setting buffer size for gfortran ( v 11.2) Bertini, Denis Dr.
2022-02-23 18:26 ` Harald Anlauf
2022-02-23 18:26   ` Harald Anlauf
2022-02-23 20:28   ` Bertini, Denis Dr.
2022-02-23 20:57     ` Harald Anlauf
2022-02-23 20:57       ` Harald Anlauf
2022-02-23 20:59     ` Bertini, Denis Dr.
     [not found]       ` <trinity-9bf94afe-e773-4366-b0b2-ae398de80664-1645651097363@3c-app-gmx-bs49>
2022-02-23 21:23         ` Bertini, Denis Dr.
2022-02-23 21:38           ` Harald Anlauf
2022-02-24  7:57             ` Bertini, Denis Dr.
2022-02-24  8:13               ` Tobias Burnus
2022-02-24  8:15                 ` Bertini, Denis Dr.
2022-02-24  8:20                   ` Tobias Burnus
2022-02-25 17:28                     ` Bertini, Denis Dr.
     [not found]                       ` <trinity-59001f50-077d-424e-a648-24645944dd0c-1645813711633@3c-app-gmx-bap28>
2022-02-25 20:01                         ` Bertini, Denis Dr.
2022-02-25 20:44                           ` Harald Anlauf
2022-02-25 20:44                             ` Harald Anlauf
2022-02-25 20:53                             ` Bertini, Denis Dr.
2022-02-26  9:20                               ` Thomas Koenig
2022-02-26 15:37                                 ` Bertini, Denis Dr.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).