From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id A6D643858D35 for ; Fri, 25 Feb 2022 20:53:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6D643858D35 Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id 2AB002051045; Fri, 25 Feb 2022 21:53:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DhoyOs4kF-ob; Fri, 25 Feb 2022 21:53:25 +0100 (CET) Received: from srvex4.campus.gsi.de (unknown [10.10.4.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by lxmtout1.gsi.de (Postfix) with ESMTPS id 0E4E62051043; Fri, 25 Feb 2022 21:53:25 +0100 (CET) Received: from srvex1.Campus.gsi.de (10.10.4.11) by srvex4.campus.gsi.de (10.10.4.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.18; Fri, 25 Feb 2022 21:53:24 +0100 Received: from srvex1.Campus.gsi.de ([fe80::d6d:62f8:8c5f:1743]) by srvex1.campus.gsi.de ([fe80::d6d:62f8:8c5f:1743%21]) with mapi id 15.01.2375.018; Fri, 25 Feb 2022 21:53:24 +0100 From: "Bertini, Denis Dr." To: Harald Anlauf CC: Tobias Burnus , "fortran@gcc.gnu.org" Subject: Re: Problem setting buffer size for gfortran ( v 11.2) Thread-Topic: Problem setting buffer size for gfortran ( v 11.2) Thread-Index: AQHYKoiPSth44TRYAkqX8UYUeWdL8aykvYDb Date: Fri, 25 Feb 2022 20:53:24 +0000 Message-ID: References: <2916ad84-bfbe-757b-290e-61d9c5805367@gmx.de> <99fe8038e55242b1bc4e7792ff0d7777@gsi.de> <45776b22-8587-597c-c2d1-93df2c8cfdbb@codesourcery.com> <5a95ec72581b4c8fb59e81fdb93e4991@gsi.de> , <9546ace7-cab6-9115-e83a-2a4eecab191f@gmx.de> In-Reply-To: <9546ace7-cab6-9115-e83a-2a4eecab191f@gmx.de> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [140.181.3.12] MIME-Version: 1.0 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, HTML_MESSAGE, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2022 20:53:28 -0000 Hi Harald, Yes i tried other values. It seems that the value set in the foreseen environment variable is just ignored. And always a buffer size of 8kiB is used, which is the default values for formatted I/O harcoded in libgfortran. The only way to change this value is editing and recompiling the libgfortra= n. Best. Denis ________________________________ From: Harald Anlauf Sent: Friday, February 25, 2022 9:44:53 PM To: Bertini, Denis Dr. Cc: Tobias Burnus; fortran@gcc.gnu.org Subject: Re: Problem setting buffer size for gfortran ( v 11.2) Hi Denis, > export GFORTRAN_UNFORMATTED_BUFFER_SIZE=3D10000 > export GFORTRAN_FORMATTED_BUFFER_SIZE=3D10000 > export GFORTRAN_UNBUFFERED_ALL=3Dn > > From the output log indeed i got the correct env. variable as i set: > > > GFORTRAN_FORMATTED_BUFFER_SIZE=3D10000 > > > But from strace output i got always > > >>>>>>>>>>>>>>>>>>>>>>> > > write(3, "\0\0\0\0\0\0\10@\0\0\0\340\314\314\10@\0\0\0\240\231\231\t@\0\0= \0`ff\n@"..., 8192) =3D 8192 > write(3, "\0\0\0@33\v@\0\0\0\0\0\0\f@\0\0\0\340\314\314\f@\0\0\0\240\231\= 231\r@"..., 8192) =3D 8192 > write(3, "\0\0\0`ff\16@\0\0\0@33\17@\0\0\0\0\0\0\20@\0\0\0`ff\20@"..., 81= 92) =3D 8192 > write(3, "\0\0\0\340\314\314\20@\0\0\0@33\21@\0\0\0\240\231\231\21@\0\0\0= \0\0\0\22@"..., 8192) =3D 8192 > write(3, "\0\0\0`ff\22@\0\0\0\340\314\314\22@\0\0\0@33\23@\0\0\0\240\231\= 231\23@"..., 8192) =3D 8192 > write(3, "\0\0\0\0\0\0\24@\0\0\0`ff\24@\0\0\0\340\314\314\24@\0\0\0@33\25= @"..., 8192) =3D 8192 > ..... >>>>>>>>>>>>>>>>>>> > Showing the fixed that still a 8kiB buffer size is effectively ude in I/= O... did you ever think of trying other values than 10000? On my Linux laptop, buffering is done in multiples of 2k. If I set GFORTRAN_UNFORMATTED_BUFFER_SIZE=3D14000, I get writes in sizes of 12288. Which is likely more efficient than asking for exactly 14000. Cheers, Harald