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

Run Time Breakpoint for Simple Code

preshenne
Novice
3,054 Views

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 Kudos
14 Replies
DavidWhite
Valued Contributor II
3,039 Views

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

0 Kudos
preshenne
Novice
3,021 Views

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 Kudos
mecej4
Honored Contributor III
3,010 Views

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 Kudos
preshenne
Novice
3,001 Views

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 Kudos
preshenne
Novice
2,996 Views

Keyboard entries to run:

"TEST3C.TXT"

"TEST3C"

"TEST INTEL"

"Y"

"1"

"129"

 

0 Kudos
mecej4
Honored Contributor III
2,990 Views

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 Kudos
preshenne
Novice
2,984 Views

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 Kudos
mecej4
Honored Contributor III
2,979 Views

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 Kudos
IanH
Honored Contributor III
2,957 Views
0 Kudos
preshenne
Novice
2,939 Views

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 Kudos
preshenne
Novice
2,908 Views

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 Kudos
Steve_Lionel
Honored Contributor III
2,895 Views
0 Kudos
preshenne
Novice
2,883 Views

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 Kudos
Steve_Lionel
Honored Contributor III
2,865 Views

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 Kudos
Reply