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

Run Time Breakpoint for Simple Code

preshenne
초보자
6,368 조회수

Migrating to 2021.4 from Intel Fortran circa 2015.  Very simple code now generating a runtime breakpoint at a simple read statement:

Debug Assertion Failed!

Program: C:\IFortran\HWG\HNEWWING\x64\Debug\HNEWWING.exe
File: minkernel\crts\ucrt\inc\corecrt_internal_string_templates.h
Line: 218

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

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
HNEWWING.exe has triggered a breakpoint.

 

Code:


WRITE(*,'(A\)') ' ENTER INPUT GEOMETRY filename.ext '
READ(*,'(A)') FNMI
WRITE(*,'(A\)') ' ENTER OUTPUT GEOMETRY filename (NO .EXT) '
READ(*,'(A)') FNMOO

 

Fails at first READ

Clueless as to why this fails now.  I must have something wrong in the new environment

 

0 포인트
14 응답
DavidWhite
소중한 기여자 II
6,353 조회수

Can you please supply the rest of the code, e.g. definitions of variables in use.

0 포인트
preshenne
초보자
6,335 조회수

Hi David -

 

Thanks for the quick reply.  I have attached the six routines that are the entire program.  If you would like a sample input file, I can send one of those too.  My breakpoint comes before that even gets opened.  It comes on the file name read.

Thanks for your help.

Pres Henne

0 포인트
mecej4
명예로운 기여자 III
6,324 조회수

You did not provide the include file BAS.CMN. Yes, the input data files should be provided, since without them the program cannot be run.

Two comments:

  • You use unit 5 to read from the data file. This may cause problems since unit 5 is typically connected to standard input (used to be card reader or terminal keyboard).
  • The argument to subroutine DATES should be CHARACTER(8). In the caller, however, the actual argument CREATD has the  implicit type REAL.
0 포인트
preshenne
초보자
6,315 조회수

Hi mecej4 -

 

Thanks for the note.

The "BAS.CMN"  file is here:

       COMMON/BAS/ X(601,203),Y(601,203),Z(601,203),NC,NS,TITLE(20),
    1 SRO2,CR,XR,YR,ZR,BO2,CREATD
       CHARACTER*4 TITLE
       CHARACTER*8 CREATD

 

I have attached a sample input file..."TEST3C.TXT"

 

Thanks for your help.

 

Pres Henne

0 포인트
preshenne
초보자
6,310 조회수

Keyboard entries to run:

"TEST3C.TXT"

"TEST3C"

"TEST INTEL"

"Y"

"1"

"129"

 

0 포인트
mecej4
명예로운 기여자 III
6,304 조회수

I see that this is a QuickWin program, which I am not familiar with. Someone else will probably help you. 

After changing IFWIN to DFWIN, etc., in the USE statements, I built and ran the program with CVF 6.6, and it ran to completion, producing a HWG file.

With the Intel compiler, however, the program closed the window and crashed as soon as I entered the name of the input data file. Is that what you experienced, too?

0 포인트
preshenne
초보자
6,298 조회수

Yes - that is the same crash.  Thank you for doing that.

 

If you debug that crash, do you get to "C++ assertion" verbage?  Why would I be invoking C++?  I wouldn't know a C++ if it walked up and bit me.!

 

I wonder if something has changed in the fortran standard for the "A" format??

 

Pres Henne

0 포인트
mecej4
명예로운 기여자 III
6,293 조회수

The Fortran compiler generates code that uses some of the same runtime routines as the Visual C compiler. The compiler developers are best equipped to debug the code produced by their compiler at the assembler or C runtime level.

I attach a Zip file with a character I/O version of your program. It runs normally when compiled with the Intel compiler (with one bug if compiled into a 32-bit EXE, an error occurs when a STOP statement is executed).

Since both the character I/O version runs fine with CVF and Ifort, and the Quickwin version runs fine with CVF, I suspect a bug in the Quick Windows library of Ifort.

0 포인트
IanH
명예로운 기여자 III
6,271 조회수
0 포인트
preshenne
초보자
6,253 조회수

Wow -thank you for the note IanH.  Its the same error, and remains unfixed in Intel Fortran Classic 2021.4 and subs.  This renders these compilers unusable.  They should be recalled.  What was the testing protocol (or lack thereof) that missed this simple READ error???  Maybe its time to move away from Intel Fortran Compilers.

0 포인트
preshenne
초보자
6,222 조회수

Unfortunately,  this problem and :

https://community.intel.com/t5/Intel-Fortran-Compiler/READ-a-error/td-p/1340829

referenced in this string are the same problem and are unresolved.  No communication from Intel.  Very disappointing.

0 포인트
Steve_Lionel
명예로운 기여자 III
6,209 조회수
0 포인트
preshenne
초보자
6,197 조회수

I stand corrected.  Someone from Intel said:   "This issue was escalated to compiler engineering for a fix.  I can't say how soon it will be fixed. " a month ago.

Still no fix that I can tell.

0 포인트
Steve_Lionel
명예로운 기여자 III
6,179 조회수

Unfortunately, fixes take a long time to appear, for various reasons. If you have paid support, you could ask for a "hotfix" replacement QuickWin library.

0 포인트
응답