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

suppress pop-up error messages

vivekrao4
Beginner
1,044 Views

Thanks to Intel Fortran developers for improving the ability to detect uninitialized variables using the /check:uninit option. I prefer that when an uninitialized variable is used, a pop-up box not be created, with all messages instead being written to the console. I'd like a general option to avoid pop-up boxes in favor of console messages, since I do not want a program to require human intervention to terminate. I am compiling from the console using only the /check:uninit option, using W_FC_C_9.1.034.

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,044 Views
You should be seeing a message box only for non-console applications. If you are seeing that for a console application, we'd like to see a test case. What switches are you using to build your application?
0 Kudos
vivekrao4
Beginner
1,044 Views

Here is the test case. Thanks for your help.

U:vraofortran>type xuninit.f90
subroutine un(i)
integer, intent(out) :: i
print*,"in un, i=",i
end subroutine un

program xuninit
implicit none
integer :: i,j
i = 2*i
print*,"i=",i
call un(i)
print*,"j=",j
end program xuninit

U:vraofortran>ifort /check:uninit xuninit.f90
Intel Fortran Compiler for 32-bit applications, Version 9.1 Build 20070109Z Package ID: W_FC_C_9.1.034
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.

xuninit.f90(1) : Warning: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.
subroutine un(i)
--------------^
Microsoft Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

-out:xuninit.exe
-subsystem:console
xuninit.obj

U:vraofortran>xuninit.exe

console output:

forrtl: severe (193): run-time check failure. The variable 'XUNINIT$I' is being used without being defined.

Then, a pop-up with the message "xuninit.exe has encountered a problem and needs to close" appears.

0 Kudos
Steven_L_Intel1
Employee
1,044 Views

Ah, that popup is coming from Windows, not from Fortran, due to a raised error that is not dismissed. Apparently the RTL is signaling an error for this case. I note (and have been aware) that the behavior for array bounds errors is different - no signal is done. We have had customers ask for a signal so that they could catch it in an exception handler (in C).

I'm unsure what we can or should do here.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,044 Views

When I compile your test program using 9.1.032 in the Debug configuration and withRTC for Uninitialized variablesthen

a) Run from the IDE produces dump in the console window andthe anoying pop-up in lieu of Break at offending location.

b) Run from command line produces dump in the console windowbut No Pop-Up

Run on WinXP Pro

I would think, with a little bit of work the RTC check could determine if it were called while running in a Debug session. Probably easy to do if launched from the IDE but may be more difficult if attached to after starting from the command line. If while in Debug session then I think something like a return from single step (to call to RTC) for break.

Jim

0 Kudos
Reply