public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "awrichar at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60956] New: error reading (and writing) large text files in gfortran Date: Thu, 24 Apr 2014 20:16:00 -0000 [thread overview] Message-ID: <bug-60956-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60956 Bug ID: 60956 Summary: error reading (and writing) large text files in gfortran Product: gcc Version: 4.7.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: awrichar at gmail dot com Created attachment 32678 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32678&action=edit demonstrates gfortran failed read/write of large text files I'm getting some buggy behavior when working with very large data files (complex, n=120^4) in gfortran 4.7.3. I get "End of record" errors when reading, and recently, "Cannot allocate memory" when writing. Originally, I was able to successfuly write the large files, but when I try to read them, gfortran issues the error: >> test_complex_sort.f90 (unit = 100, file = 'sigma_hat_1.txt') >> Fortran runtime error: End of file If I explicitly loop through each element of the array during the READ instead, gfortran has no issues. (Also if I use the Portland Group compiler and assign the array all at once, there are no issues.) If I reduce the variable size to (120^4)/12, it runs, but (120^4)/10 fails. I've written a test case (see attached), but this fails to WRITE the large file, saying: >> At line 19 of file test_complex_io.f90 (unit = 100, file = 'dummy.txt') >> Fortran runtime error: Cannot allocate memory The line in question (19) is simply >> WRITE(100, *) u and runs fine for cases (n.LT.10**8). (All cases run fine when compiling with the Portland Group Fortran compiler.) Lastly, if I generate the 4GB text file using PG Fortran, then comment out lines 18-20 in the attached file and complie with gfortran, I get a seg-fault during the READ for the n=10^8 case. These errors occurs on a computer with dual Xeon E-2690v2 processors and 256GB (not a typo) of RAM, under Ubuntu 13.04 with gfortran 4.7.3. (NOTE: When using the PG Fortran compiler, the attached code uses ~3.2GB of memory, and writes a 4GB text file for the largest test case.) Has anyone else experienced similar issues? Is this reproducible for anyone else, or in newer gfortran versions? I haven't found any recent bugs reports that seem similar, but I easily could have overlooked something. --Andy
next reply other threads:[~2014-04-24 20:16 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-04-24 20:16 awrichar at gmail dot com [this message] 2015-02-06 4:48 ` [Bug fortran/60956] " jvdelisle at gcc dot gnu.org 2015-02-06 6:51 ` [Bug fortran/60956] [4.8/4.9/5 Regression] " tkoenig at gcc dot gnu.org 2015-02-06 11:07 ` burnus at gcc dot gnu.org 2015-02-06 14:22 ` jvdelisle at gcc dot gnu.org 2015-02-06 15:00 ` jvdelisle at gcc dot gnu.org 2015-02-07 2:20 ` jvdelisle at gcc dot gnu.org 2015-02-07 15:13 ` jvdelisle at gcc dot gnu.org 2015-02-07 15:24 ` jakub at gcc dot gnu.org 2015-03-23 1:32 ` jvdelisle at gcc dot gnu.org 2015-03-23 4:55 ` jvdelisle at gcc dot gnu.org 2015-03-23 5:47 ` jvdelisle at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-60956-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).