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

Fortran ftell returning to wrong position

Mincheol
Beginner
2,024 Views

When I have used Intel Parallel Studio 2015 or gfortran, it is working good.

But After I updated last version  which is Intel Parallel Studio 2020 update 4, It is working bad.

And when I tested that compiler option which is Multithreaded or Multithread dll, the results were different.

If you run attached, You can know compiler has a bug.

0 Kudos
1 Solution
Barbara_P_Intel
Employee
1,878 Views

Thank you all for the additional information!

I filed a bug, CMPLRLIBS-33377. I'll let you know its progress to a fix.

 

View solution in original post

0 Kudos
9 Replies
mecej4
Honored Contributor III
1,998 Views

The output from Intel Fortran 2016.0.8 is correct, the first three lines being:

 

 FTELL Test
           1           0          14                    14                    14
           2           0          28                    28                    28

 

The output from the 19.1.3 version as well as the OneApi latest compilers is:

 

 FTELL Test
           1           0          14                    14                    14
           2           0          14                    14                    14

 

0 Kudos
Mincheol
Beginner
1,962 Views

When can Intel fix it?

0 Kudos
Barbara_P_Intel
Employee
1,939 Views

I'll take a look at it.  What OS are you running on?  I get different output on Linux. It's not correct, just different than your incorrect output.

What compiler options are you using?

Please post the complete output from the program.  It's only 11 lines.

Thanks!

0 Kudos
MWind2
New Contributor III
1,920 Views

My test on W10:

 

FTELL Test
           1           0          14                    14                    14
           2           0          14                    14                    14
           3           0          28                    28                    28
           4           0          42                    42                    42
           5           0          56                    56                    56
           6           0          70                    70                    70
           7           0          84                    84                    84
           8           0          98                    98                    98
           9           0         112                   112                   112
          10           0         126                   126                   126
 Compiler version:
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel
(R) 64, Version 2021.2.0 Build 20210228_000000
Compiler options:
/nologo /debug:full /Od /warn:interfaces /module:x64\Debug\ /object:x64\Debug\
/Fdx64\Debug\vc160.pdb /traceback /check:bounds /check:stack /libs:dll /threads
/dbglibs /c /Qlocation,link,C:\Program Files (x86)\Microsoft Visual Studio\201
9\Professional\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64 /Qm64

Added

 use ISO_FORTRAN_ENV
!...
    write(*,*)" Compiler version: ",compiler_version()
    write(*,*)" Compiler options: ",compiler_options()

 

0 Kudos
Mincheol
Beginner
1,899 Views

My OS is Windows 10.

Mincheol_1-1620975397236.png

The result is below.

Mincheol_2-1620975652564.png

 

Thank you.

0 Kudos
Barbara_P_Intel
Employee
1,879 Views

Thank you all for the additional information!

I filed a bug, CMPLRLIBS-33377. I'll let you know its progress to a fix.

 

0 Kudos
Barbara_P_Intel
Employee
1,746 Views

@Mincheol  The issue you reported with ftell is fixed in the Fortran compiler 2021.4.0. It was released last week as part of oneAPI HPC Toolkit.

Can you please download the new compiler and check it out? Let me know how it works for you.

 

 

0 Kudos
Mincheol
Beginner
1,716 Views

I have finished to check it.
It worked good.

 

Thank you.

0 Kudos
Barbara_P_Intel
Employee
1,658 Views

That's great news! I consider this case closed.



0 Kudos
Reply