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

Avoid pup-up windows on library runtime errors

Jens_E_
New Contributor I
681 Views

Hi,

 

For applications running in the cloud, pop-up windows are a big no-no. Sometimes, if an Intel Fortran application fails (in Windows) due to a fortran runtime error (full disk, for example), a pop-up window will show.

Is there a way to avoid such pop-up windows?

 

Jens

0 Kudos
4 Replies
FortranFan
Honored Contributor II
681 Views

@Jens,

You state, "if an Intel Fortran application fails (in Windows) due to a fortran runtime error (full disk, for example), a pop-up window will show."  This suggests some IO operation is in effect that is impacted by a "full disk" issue.  If so, one option you may consider this is using the IOSTAT and IOMSG parameters in the IO instruction e.g., WRITE operation.  Are you doing this already?

As you may know, you can check for non-zero IOSTAT in IO operations which signals a failure and then process the IOMSG error description suitably e.g., redirect it to a database and/or a web service, etc. and manage to prevent the pop-up window.  Same philosophy applies for other run-time failures as well i.e., do the needful to "catch" the run-time errors in Fortran code itself to prevent Intel Fortran run-time pop-ups.

https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-write-statement

 

0 Kudos
Jens_E_
New Contributor I
681 Views

Finally reverting to this issue after a year :)

The problem is that the pop-up comes from a fortran library which my application consumes. I was hoping that there might be a way to avoid the pop-up (I would prefer an uncontrolled crash because the application runs without supervision in the cloud) link-time, but I guess not?

 

0 Kudos
Steve_Lionel
Honored Contributor III
681 Views

What is the application project type? Console, Windows, QuickWIn? I think only QuickWin does a popup of any sort.

What you want to do is to define the environment variable FOR_NOERROR_DIALOGS as 1 before the application starts.

0 Kudos
Jens_E_
New Contributor I
681 Views

It's a c++ windows application (winmain) consuming a fortran library.

Thanks, will give the environment viriable a try.

0 Kudos
Reply