Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

READ(*,'(a)') error

sanjayg0
Beginner
2,811 Views

I have a simple program

program qwin2
character (len=256) :: record
write(*,*) 'Input: '
read(*,'(a)') record
write(*,*) 'read string', record
end program qwin2

I am using VS 2019 (ver 16.6.2) with Intel Fortran Package ID:w_oneAPI_2021.4.0.364 (installed today), using IFORT and a quick win project, x64.

Compiling and running throws an error of

Expression: (L "Buffer is too small" && 0)

when i enter any string and hit return.  If I just hit return without typing anything the error is

Expression: ((destination)) != NULL && ((size_in_elements)) > 0

Either way the errors are from the read statement.  The stack trace shows problems on Line 22 in QWin2.exe!strncpy_s and Line 218 in QWin.exe!common_tcsncpy_s, so system routines.  Following the stack in the debugger, I can see my input string is correct in the locals for strncpy_s with the correct length as it is in common_tcsncpy_s.

 

Does anyone know what is going on here?  Thanks in advance for any ideas.

-sanjay

0 Kudos
1 Solution
Barbara_P_Intel
Moderator
1,125 Views

Yes, it should be fixed in the oneAPI 2022.2 release, ifort 2021.6.0. I haven't tried it myself.

 

View solution in original post

31 Replies
Steve_Lionel
Black Belt Retired Employee
768 Views

It would affect only new builds of applications, since QuickWin is a static link library only. I have no idea what Intel's schedule for this is.

One can revert to a slightly older version (2021.3.0) and it works.

preshenne
Novice
764 Views

How does one revert from 2021.4 to 2021.3?  2021.4 was first install on new machine.

Steve_Lionel
Black Belt Retired Employee
756 Views

I don't know how to download a previous version of one of the oneAPI compilers - perhaps an Intel rep will comment. If you upgraded from an earlier version, the old version is still installed and can be switched to in Visual Studio How to Select Intel® Fortran Compiler and Compiler Version in...

Devorah_H_Intel
Moderator
738 Views

@preshenne 

While fixes take some time to be implemented and released (no date on that) here is a link to download oneAPI 2021.3

https://registrationcenter-download.intel.com/akdlm/irc_nas/17940/w_HPCKit_p_2021.3.0.3227_offline.e...

preshenne
Novice
728 Views

Hi Devorah -

Thank you very much for this link.  It was successful for installing 2021.3 with 2021.4 still installed - amazing.   Tested it on the READ(*,'(A)')  error and it executes correctly.  Fantastic.  I am back in business.  I am very happy you provided that link.  Well done.

 

How will we know when this bug is fixed for future versions?

 

Pres Henne

sanjayg0
Beginner
636 Views

Does anyone know if the reported QuickWin read error was fixed in the March 3, 2022 release? Hoping to save myself the installation time and disk space, if the fix has not been made yet.

Barbara_P_Intel
Moderator
632 Views

The March 3 release, 2022.1.3, fixed an installation issue.  The compiler was not updated.

Good thing you asked!

 

sanjayg0
Beginner
465 Views

@Barbara_P_Intel

I see there is a oneAPI 2022.2 release out.  Is the patch for this issue included in that release?

 

Barbara_P_Intel
Moderator
1,126 Views

Yes, it should be fixed in the oneAPI 2022.2 release, ifort 2021.6.0. I haven't tried it myself.

 

Steve_Lionel
Black Belt Retired Employee
435 Views

I tried it, it is fixed.

sanjayg0
Beginner
426 Views

Thanks!  Time to upgrade my compiler now.

Reply