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

QUICKWIN Keyboard Input

FSXXX
Novice
1,685 Views

Quickwin GETSTRQQ or simply READ(5,*) causes program crash using Intel Fortran 2020 compiler.

As soon as this code is encountered program will crash within a second.  Error message is 0xc0000005

THis method of getting keyboard input has been used for years and works fine with previous version of INTEL compiler (2011 version).

What has changed and what is fix to use simple keyboard input to a Quickwin program?

0 Kudos
15 Replies
andrew_4619
Honored Contributor II
1,667 Views

If you could post a small test program the reproduces the issue you will get a better response. We could speculate on a thousand reason why it might fail.

0 Kudos
Ron_Green
Moderator
1,657 Views

we will need the compiler version. You can add compiler option -V to get that.

Also, we need to know which version of Visual Studio:  Help, About can give the details of the version and update numbers.

0 Kudos
FSXXX
Novice
1,632 Views

Visual Fortran Compiler 19.1.3.311

Microsoft Visual Studio Professional 2019
Version 16.11.22

Problem does not occur when GETSTRQQ is called in Main before DO WHILE(.TRUE.) is called.

Problem occurs when GETSTRQQ is called from a dialog box.  Thanks.

0 Kudos
Steve_Lionel
Honored Contributor III
1,626 Views

Please provide a sample program that demonstrates the problem. Attach the source file to a reply here.

0 Kudos
FSXXX
Novice
1,615 Views

Here is Qwickwin program that shows the problem.  When compiled and run with 2019 version referenced above, it crashes.

When compiled and run with 2011 version it works correctly as it has for years.  Thanks, FSXXX

0 Kudos
Steve_Lionel
Honored Contributor III
1,604 Views

Thanks for that. Your sample needs to declare the variable CURSOR as INTEGER*2, and there was also a warning about the long string assigned to SETUPNAME, but these don't affect the problem.

What I see is a floating point assertion (not error) in the call to GETSTRQQ inside SETUPFLUIDS, but only in a 64-bit configuration; 32-bit  (using IFORT) is fine. The Intel folk will have to investigate further, but you can continue for now by right clicking on the project, selecting Intel Compiler > IFORT.

0 Kudos
FSXXX
Novice
1,593 Views

Steve, Thanks for that.  I see the program will run on 64 bit and that is good to see.

I have searched for where to declare IFORT but am not given any place in my installation either under Tools/Intel COmpilers etc (just latest and 19.1.3.311 or under Intel Compiler or in the Properties / General.  I am missing something.  Thanks, FSXXX

0 Kudos
Ron_Green
Moderator
1,589 Views

I will get the team to look at this problem. Thank you for producing QWin_Keyboard_main.for.  I've changed the declaration of CURSOR as Steve advised.  We'll use that as our reproducer.

0 Kudos
JohnNichols
Valued Contributor III
1,566 Views

Screenshot 2023-11-29 173746.png

What Steve was saying was right click the Fn button and down the bottom of the menu you can change Intel Compilers.  No idea why they hid it in an obscure spot, but then again it is findable. 

0 Kudos
FSXXX
Novice
1,555 Views

JohnNichols: That option does not show up for me.  Don't see any way to change this except as I note above.  So if there is a workaround I am trying to implement it somehow but don't see what you have done.  Any more ideas?  Thanks, FSXXX

0 Kudos
andrew_4619
Honored Contributor II
1,554 Views

In solution explorer right click on the project, it pops a menu,  "Intel Compilers" is an option on it.

0 Kudos
FSXXX
Novice
1,524 Views

andrew_4619:  I have "Intel Compiler" but there is no compiler option there in my setup.  THere are other things like Guided Parallelism Code Coverage but no compiler options. Thanks, FSXXX

0 Kudos
andrew_4619
Honored Contributor II
1,444 Views

Reading back up your thread what Fortran version are you using I see 2020, why not use a current version. Does your version even have IFX installed?

0 Kudos
Steve_Lionel
Honored Contributor III
1,465 Views

What I wrote was that the error occurs in 64-bit mode, but not 32-bit. Change the configuration to 32-bit, and it will automatically switch to ifort. However, this is NOT an ifx vs. ifort issue, but 32-bit vs. 64-bit. I admit I don't understand what that assert error is about, but that's what they pay the Intel folk for.

That said, if you are in a 64-bit configuration, you can right click on the project and select Intel Compiler to switch between IFX and IFORT.

Screenshot 2023-11-30 152655.png

0 Kudos
FSXXX
Novice
1,429 Views

Steve and Andrew: I have now upgraded to compiler 2021.11.0 and I now can see the IFORT and IFX options for the 64 bit.  So, now recompiling the test program above in 32 and 64 bit, now there is no longer a crash for either case.  However now the cursor is missing in the dialog box!  I'll take the non crashing compile version above and move forward and have made this change to my original software and it is now working fine (except for the cursor).  It looks like the crash is compiler version specific.  Thanks very much for your help.  FSXXX

Reply