Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compiler bug - stream formatted nonadvancing read makes up 0x2000 character

Jan_F_
Beginner
378 Views

Hello I'd like to report a possible bug in Intel Fortran compiler, I was using: Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 14.0.2.176 Build 20140130 but the same problem exhibits on Win64 and Linux. It seems that when a file is opened in stream formatted mode and read using non-advancing read, it makes up character at position 8192 (and multiples). Example program is attached, the output is bellow. Thanks for your help, Jan c:\honza\math\nag\npen_build>ifort fread_test_1fff.f90 Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 14.0.2.176 Build 20140130 Copyright (C) 1985-2014 Intel Corporation. All rights reserved. Microsoft (R) Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved. -out:fread_test_1fff.exe -subsystem:console fread_test_1fff.obj c:\honza\math\nag\npen_build>fread_test_1fff.exe Reading ifort1fff_test3.txt Section 0 ok, read 99 Section 1 ok, read 99 Section 2 ok, read 99 Section 3 ok, read 99 Section 4 ok, read 99 Section 5 ok, read 99 Section 6 ok, read 99 Section 7 ok, read 99 Section 8 ok, read 99 Section 9 ok, read 99 Section 10 ok, read 99 Section 11 ok, read 99 Section 12 ok, read 99 Section 13 ok, read 99 Section 14 ok, read 99 Section 15 ok, read 99 Section 16 ok, read 99 Section 17 ok, read 99 Section 18 ok, read 99 Section 19 ok, read 99 Section 20 ok, read 99 Section 21 ok, read 99 Section 22 ok, read 99 Section 23 ok, read 99 Section 24 ok, read 99 Section 25 ok, read 99 Section 26 ok, read 99 Section 27 ok, read 99 Section 28 ok, read 99 Section 29 ok, read 99 Section 30 ok, read 99 Section 31 ok, read 99 Section 32 ok, read 99 Section 33 ok, read 99 Section 34 ok, read 99 Section 35 ok, read 99 Section 36 ok, read 99 Section 37 ok, read 99 Section 38 ok, read 99 Section 39 ok, read 99 Section 40 ok, read 99 Section 41 ok, read 99 Section 42 ok, read 99 Section 43 ok, read 99 Section 44 ok, read 99 Section 45 ok, read 99 Section 46 ok, read 99 Section 47 ok, read 99 Section 48 ok, read 99 Section 49 ok, read 99 Section 50 ok, read 99 Section 51 ok, read 99 Section 52 ok, read 99 Section 53 ok, read 99 Section 54 ok, read 99 Section 55 ok, read 99 Section 56 ok, read 99 Section 57 ok, read 99 Section 58 ok, read 99 Section 59 ok, read 99 Section 60 ok, read 99 Section 61 ok, read 99 Section 62 ok, read 99 Section 63 ok, read 99 Section 64 ok, read 99 Section 65 ok, read 99 Section 66 ok, read 99 Section 67 ok, read 99 Section 68 ok, read 99 Section 69 ok, read 99 Section 70 ok, read 99 Section 71 ok, read 99 Section 72 ok, read 99 Section 73 ok, read 99 Section 74 ok, read 99 Section 75 ok, read 99 Section 76 ok, read 99 Section 77 ok, read 99 Section 78 ok, read 99 Section 79 ok, read 99 Section 80 ok, read 99 error at reading section starting at 8100 wrong character at 93 with iachar= 94 read : >aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaa^aaaaaaa< Section 82 ok, read 99

0 Kudos
6 Replies
Jan_F_
Beginner
378 Views

I'm sorry, preview looked OK but when I submitted the text, it got mangled.

Once more:

I'd like to report a possible bug in Intel Fortran compiler, I was using:

Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 14.0.2.176 Build 20140130

but the same problem exhibits on Win64 and Linux. It seems that when a file is opened in stream formatted mode and read using non-advancing read, it makes up character at position 8192 (and multiples). Example program is attached, the output is bellow.

Thanks for your help,

Jan

c:\honza\math\nag\npen_build>ifort ../npen/base/tests/fread_test_1fff.f90
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 1
4.0.2.176 Build 20140130
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:fread_test_1fff.exe
-subsystem:console
fread_test_1fff.obj

c:\honza\math\nag\npen_build>fread_test_1fff.exe
 Reading ifort1fff_test3.txt
 Section            0  ok, read           99
 Section            1  ok, read           99
 Section            2  ok, read           99
 Section            3  ok, read           99
 Section            4  ok, read           99
 Section            5  ok, read           99
 Section            6  ok, read           99
 Section            7  ok, read           99
 Section            8  ok, read           99
 Section            9  ok, read           99
 Section           10  ok, read           99
 Section           11  ok, read           99
 Section           12  ok, read           99
 Section           13  ok, read           99
 Section           14  ok, read           99
 Section           15  ok, read           99
 Section           16  ok, read           99
 Section           17  ok, read           99
 Section           18  ok, read           99
 Section           19  ok, read           99
 Section           20  ok, read           99
 Section           21  ok, read           99
 Section           22  ok, read           99
 Section           23  ok, read           99
 Section           24  ok, read           99
 Section           25  ok, read           99
 Section           26  ok, read           99
 Section           27  ok, read           99
 Section           28  ok, read           99
 Section           29  ok, read           99
 Section           30  ok, read           99
 Section           31  ok, read           99
 Section           32  ok, read           99
 Section           33  ok, read           99
 Section           34  ok, read           99
 Section           35  ok, read           99
 Section           36  ok, read           99
 Section           37  ok, read           99
 Section           38  ok, read           99
 Section           39  ok, read           99
 Section           40  ok, read           99
 Section           41  ok, read           99
 Section           42  ok, read           99
 Section           43  ok, read           99
 Section           44  ok, read           99
 Section           45  ok, read           99
 Section           46  ok, read           99
 Section           47  ok, read           99
 Section           48  ok, read           99
 Section           49  ok, read           99
 Section           50  ok, read           99
 Section           51  ok, read           99
 Section           52  ok, read           99
 Section           53  ok, read           99
 Section           54  ok, read           99
 Section           55  ok, read           99
 Section           56  ok, read           99
 Section           57  ok, read           99
 Section           58  ok, read           99
 Section           59  ok, read           99
 Section           60  ok, read           99
 Section           61  ok, read           99
 Section           62  ok, read           99
 Section           63  ok, read           99
 Section           64  ok, read           99
 Section           65  ok, read           99
 Section           66  ok, read           99
 Section           67  ok, read           99
 Section           68  ok, read           99
 Section           69  ok, read           99
 Section           70  ok, read           99
 Section           71  ok, read           99
 Section           72  ok, read           99
 Section           73  ok, read           99
 Section           74  ok, read           99
 Section           75  ok, read           99
 Section           76  ok, read           99
 Section           77  ok, read           99
 Section           78  ok, read           99
 Section           79  ok, read           99
 Section           80  ok, read           99
 error at reading section starting at         8100
 wrong character at           93  with iachar=          94
 read : >aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaa^aaaaaaa<
 Section           82  ok, read           99

 

0 Kudos
Kevin_D_Intel
Employee
378 Views

Thank you for reporting this possible bug with stream formatted I/O. I will investigate your test case and post an update when I know more.

0 Kudos
Kevin_D_Intel
Employee
378 Views

It appears related to the internal buffer. I need to inquire w/our run-time developer about this further. The test case runs when adding either BUFFERCOUNT=2 or BLOCKSIZE=16384 on the OPEN, or using the env-variable FORT_BLOCKSIZE=16384.

I'll post again when I know more.

0 Kudos
Jan_F_
Beginner
378 Views

Hello Kevin

thanks for your reply, it seems that setting BLOCKSIZE=16384 just moves the problematic character from position 8192 to 16384 so it indeed points to a problem of the internal buffer. I hope it helps.

All the best,

Jan

 

0 Kudos
Kevin_D_Intel
Employee
378 Views

Yeah and BUFFERCOUNT unfortunately is the same too so those might be of limited help in avoiding the issue for now. The RTL developer concurred it appears to be defect and will be looking into the issue further (see internal tracking id below). I will let you know if a more usable work around is found.

(Internal tracking id: DPD200254005)
(Resolution Update on 09/11/2014): This defect is fixed in the Intel® Composer XE 2013 SP1 Update 3 release (2013.1.3.174 - Linux) -AND- the Intel® Parallel Studio XE 2015 Initial Release (2015.0.090 - Linux)

0 Kudos
Kevin_D_Intel
Employee
378 Views

This defect is fixed in the Intel® Composer XE 2013 SP1 Update 3 release (2013.1.3.174 - Linux) -AND- the Intel® Parallel Studio XE 2015 Initial Release (2015.0.090 - Linux). Both are available from the Intel Registration Center. Thank you for reporting this defect.

0 Kudos
Reply