public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
@ 2006-01-25 7:30 ` jvdelisle at gcc dot gnu dot org
2006-01-25 9:32 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-01-25 7:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2006-01-25 07:30 -------
I don't see this problem any more. Was this fixed? Is the default record
length an issue any more? Can we close this PR? I wonder if the fix to P25835
fixed this? If so I propose we close this unless it is related to the new PR
Janne is working on, large records with little writes, 25949.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
2006-01-25 7:30 ` [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays jvdelisle at gcc dot gnu dot org
@ 2006-01-25 9:32 ` fxcoudert at gcc dot gnu dot org
2006-04-15 7:15 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-01-25 9:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2006-01-25 09:32 -------
(In reply to comment #6)
> I don't see this problem any more. Was this fixed? Is the default record
> length an issue any more? Can we close this PR? I wonder if the fix to P25835
> fixed this? If so I propose we close this unless it is related to the new PR
> Janne is working on, large records with little writes, 25949.
As I said in comment #5, the limit was just pushed higher, but big writes on
preconnected units still fail:
$ gfortran a.f90 && ./a.out > bigfile
At line 3 of file a.f90
Fortran runtime error: End of record
$ cat a.f90
real :: array(100000000)
array(:) = 0
write(*,*) array
end
$ ll bigfile
-rw-r--r-- 1 coudert users 1.0G Jan 25 10:28 bigfile
$ gfortran -v
Using built-in specs.
Target: i386-linux
Configured with: ../gcc/configure --prefix=/tmp/gfortran-20060124/irun
--enable-languages=c,fortran --host=i386-linux
--with-gmp=/tmp/gfortran-20060124/gfortran_libs
Thread model: posix
gcc version 4.2.0 20060124 (experimental)
You can look at the patch cited in comment #5 for where the problem lies. And
this is not really related to Janne's PR, I guess. It's specific to
preconnected units.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
2006-01-25 7:30 ` [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays jvdelisle at gcc dot gnu dot org
2006-01-25 9:32 ` fxcoudert at gcc dot gnu dot org
@ 2006-04-15 7:15 ` jvdelisle at gcc dot gnu dot org
2006-04-20 23:20 ` patchapp at dberlin dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-04-15 7:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2006-04-15 07:15 -------
I have the beginnings of a patch going. It covers formatted write to stdout.
Seems to work OK. I just need to extend the concept to the other cases.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-12-28 06:36:18 |2006-04-15 07:15:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-04-15 7:15 ` jvdelisle at gcc dot gnu dot org
@ 2006-04-20 23:20 ` patchapp at dberlin dot org
2006-04-23 2:05 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: patchapp at dberlin dot org @ 2006-04-20 23:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from patchapp at dberlin dot org 2006-04-20 23:20 -------
Subject: Bug number PR20257
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00785.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-04-20 23:20 ` patchapp at dberlin dot org
@ 2006-04-23 2:05 ` jvdelisle at gcc dot gnu dot org
2006-04-29 4:27 ` jvdelisle at gcc dot gnu dot org
2006-04-29 5:47 ` jvdelisle at gcc dot gnu dot org
6 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-04-23 2:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2006-04-23 02:05 -------
Subject: Bug 20257
Author: jvdelisle
Date: Sun Apr 23 02:04:58 2006
New Revision: 113190
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113190
Log:
2006-04-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/20257
* io/io.h: Add prototypes for get_internal_unit and free_internal_unit.
* io/unit.c (get_internal_unit): Initialize unit number, not zero.
(free_internal_unit): New function to consolidate freeing memory.
(get_unit): Initialize internal_unit_desc to NULL when unit is
external.
* io/unix.c (mem_close): Check for not NULL before freeing memory.
* io/transfer.c (read_block): Reset bytes_left and skip error if unit
is preconnected and default record length is reached.
(read_block_direct): Ditto.
(write_block): Ditto.
(write_buf): Ditto.
(data_transfer_init): Only flush if not internal unit.
(finalize_transfer): Ditto and delete code to free memory used by
internal units.
(st_read_done): Use new function - free_internal_unit.
(st_write_done): Use new function - free_internal unit.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/io.h
trunk/libgfortran/io/transfer.c
trunk/libgfortran/io/unit.c
trunk/libgfortran/io/unix.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-04-23 2:05 ` jvdelisle at gcc dot gnu dot org
@ 2006-04-29 4:27 ` jvdelisle at gcc dot gnu dot org
2006-04-29 5:47 ` jvdelisle at gcc dot gnu dot org
6 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-04-29 4:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2006-04-29 04:27 -------
Subject: Bug 20257
Author: jvdelisle
Date: Sat Apr 29 04:27:09 2006
New Revision: 113373
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113373
Log:
2006-04-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/20257
* io/io.h: Add prototypes for get_internal_unit and free_internal_unit.
* io/unit.c (get_internal_unit): Initialize unit number, not zero.
(free_internal_unit): New function to consolidate freeing memory.
(get_unit): Initialize internal_unit_desc to NULL when unit is
external.
* io/unix.c (mem_close): Check for not NULL before freeing memory.
* io/transfer.c (read_block): Reset bytes_left and skip error if unit
is preconnected and default record length is reached.
(read_block_direct): Ditto.
(write_block): Ditto.
(write_buf): Ditto.
(data_transfer_init): Only flush if not internal unit.
(finalize_transfer): Ditto and delete code to free memory used by
internal units.
(st_read_done): Use new function - free_internal_unit.
(st_write_done): Use new function - free_internal unit.
Modified:
branches/gcc-4_1-branch/libgfortran/ChangeLog
branches/gcc-4_1-branch/libgfortran/io/io.h
branches/gcc-4_1-branch/libgfortran/io/transfer.c
branches/gcc-4_1-branch/libgfortran/io/unit.c
branches/gcc-4_1-branch/libgfortran/io/unix.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-04-29 4:27 ` jvdelisle at gcc dot gnu dot org
@ 2006-04-29 5:47 ` jvdelisle at gcc dot gnu dot org
6 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-04-29 5:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2006-04-29 05:47 -------
Fixed on Trunk and now 4.1 branch
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
2005-03-01 2:50 [Bug fortran/20257] New: " kamaraju at gmail dot com
` (4 preceding siblings ...)
2005-03-18 7:11 ` fxcoudert at gcc dot gnu dot org
@ 2005-09-25 20:29 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-25 20:29 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Last reconfirmed|2005-06-17 15:14:59 |2005-09-25 20:28:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
2005-03-01 2:50 [Bug fortran/20257] New: " kamaraju at gmail dot com
` (3 preceding siblings ...)
2005-03-03 13:08 ` coudert at clipper dot ens dot fr
@ 2005-03-18 7:11 ` fxcoudert at gcc dot gnu dot org
2005-09-25 20:29 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-03-18 7:11 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC|coudert at clipper dot ens |fxcoudert at gcc dot gnu dot
|dot fr |org
Last reconfirmed|2005-03-01 13:59:17 |2005-03-18 07:11:28
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
2005-03-01 2:50 [Bug fortran/20257] New: " kamaraju at gmail dot com
` (2 preceding siblings ...)
2005-03-03 10:34 ` coudert at clipper dot ens dot fr
@ 2005-03-03 13:08 ` coudert at clipper dot ens dot fr
2005-03-18 7:11 ` fxcoudert at gcc dot gnu dot org
2005-09-25 20:29 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-03-03 13:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From coudert at clipper dot ens dot fr 2005-03-03 13:08 -------
Complete patch is here: http://gcc.gnu.org/ml/fortran/2005-03/msg00024.html
Note: this just makes the limit higher (1 Gb), but there still is a limit on the
size of things you can write to preconnected units.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
2005-03-01 2:50 [Bug fortran/20257] New: " kamaraju at gmail dot com
2005-03-01 13:59 ` [Bug libfortran/20257] " pinskia at gcc dot gnu dot org
2005-03-02 9:35 ` coudert at clipper dot ens dot fr
@ 2005-03-03 10:34 ` coudert at clipper dot ens dot fr
2005-03-03 13:08 ` coudert at clipper dot ens dot fr
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-03-03 10:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From coudert at clipper dot ens dot fr 2005-03-03 10:34 -------
Partial fix proposed here: http://gcc.gnu.org/ml/fortran/2005-03/msg00023.html
This fixes the bug when writing to files, but there still is the case of
preconnected units (stdout, stderr). This will need a little more thinking.
Reduced test case for preconnected units:
real :: array(10000)
array(:) = 0
write(*,*) array
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
2005-03-01 2:50 [Bug fortran/20257] New: " kamaraju at gmail dot com
2005-03-01 13:59 ` [Bug libfortran/20257] " pinskia at gcc dot gnu dot org
@ 2005-03-02 9:35 ` coudert at clipper dot ens dot fr
2005-03-03 10:34 ` coudert at clipper dot ens dot fr
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-03-02 9:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From coudert at clipper dot ens dot fr 2005-03-02 09:34 -------
It happens for all kind of output (formatted (direct or sequential) or
unformatted), and is due to gfortran setting an arbitrary maximal length of
10000 chars (this is in current_unit->recl). Since this code doesn't specify a
recl, we use the default:
io.h:#define DEFAULT_RECL 10000
I don't see a reason for setting so low a value. I will ask later today on the
gfortran mailing-list about the reasons behind this choice. Hope we can fix this
quickly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays
2005-03-01 2:50 [Bug fortran/20257] New: " kamaraju at gmail dot com
@ 2005-03-01 13:59 ` pinskia at gcc dot gnu dot org
2005-03-02 9:35 ` coudert at clipper dot ens dot fr
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-01 13:59 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Status|UNCONFIRMED |NEW
Component|fortran |libfortran
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-03-01 13:59:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20257
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-04-29 5:47 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-20257-10182@http.gcc.gnu.org/bugzilla/>
2006-01-25 7:30 ` [Bug libfortran/20257] Fortran runtime error: End of record occurs when writing large arrays jvdelisle at gcc dot gnu dot org
2006-01-25 9:32 ` fxcoudert at gcc dot gnu dot org
2006-04-15 7:15 ` jvdelisle at gcc dot gnu dot org
2006-04-20 23:20 ` patchapp at dberlin dot org
2006-04-23 2:05 ` jvdelisle at gcc dot gnu dot org
2006-04-29 4:27 ` jvdelisle at gcc dot gnu dot org
2006-04-29 5:47 ` jvdelisle at gcc dot gnu dot org
2005-03-01 2:50 [Bug fortran/20257] New: " kamaraju at gmail dot com
2005-03-01 13:59 ` [Bug libfortran/20257] " pinskia at gcc dot gnu dot org
2005-03-02 9:35 ` coudert at clipper dot ens dot fr
2005-03-03 10:34 ` coudert at clipper dot ens dot fr
2005-03-03 13:08 ` coudert at clipper dot ens dot fr
2005-03-18 7:11 ` fxcoudert at gcc dot gnu dot org
2005-09-25 20:29 ` pinskia at gcc dot gnu dot org
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).