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

DISLIN and IFX

JohnNichols
Valued Contributor III
831 Views

Screenshot 2024-01-12 160256.png

Steve:

I know we have talked about this before, but why would DISLIN need the legacy_stdio.. libs and also the user32 and gdi32 libraries.  it is not documented anywhere so putting it here makes it easy to find. 

I was just updating some software to IFX - that is really old and when it was written this stuff did not have to be added.  There is a long set of excellent posts on the workarounds, but not why fprintf pops up as unfound until you add the legacy?

The new and annoying deprecated notice on IFORT is new and very annoying, it pops up for every *.f90 file.  Is there a way to switch it off?

 

Thanks

John

 

0 Kudos
9 Replies
Ron_Green
Moderator
811 Views

Per compilation:

 

linux:  -diag-disable=10448

windows: /Qdiag-disable=10448

 

globally, we use a config file.  

in your bin folder, alongside the ifort and ifx binaries are 2 config file of zero length

ifort.cfg

ifx.cfg

 

In these just add any options you wan to apply globally.  then you need not supply the diag-disable in all projects.

here is what I added to my linux <path>/compiler/latest/bin/ifort.cfg

-diag-disable=10448

 

same for Windows but use /Qdiag-disable=10448

and that pesky warning is gone forever.  Banished.  Exiled. Never to be seen again.

 

ron

0 Kudos
JohnNichols
Valued Contributor III
761 Views

If you say that in a court under oath, 

and that pesky warning is gone forever.  Banished.  Exiled. Never to be seen again.

the lawyer for the other side will challenge your statement and provide an example that shows you are at best an idiot and at  worst a liar.   Been there done that got the kewpie doll.  Never say never, ever.  

Entirely by accident on a NUC used for accelerometers that only had C# code and VS 2022 Preview, I had to load IFX to do some minor analysis on data I did not want to transfer, anyway it appears that Intel has fixed the latest release to include the current preview.  It appears on the surface to work.  

 

0 Kudos
JohnNichols
Valued Contributor III
753 Views

Jim:

The accelerometer data from the IFX analysis shows a temperature of -17C in Ames Iowa at the moment, which is the coldest we have recorded in 5 years, by a long shot.  It froze the accelerometer overnight.  

The wind speed is 30 mph, which is blowy.  

I am glad I am not outside there.

John

0 Kudos
JohnNichols
Valued Contributor III
756 Views

The data for the Fortran program shows a temperature of -17C on the underside of the bridge out of the wind at the moment and wind speed of 30 mph in Ames Iowa.  It is cold in Iowa, that is the coldest we have recorded in 5 years. 

The camera shows not much traffic, but would you believe one of the common trucks on the road over the last few days are Prime Amazon -  delivery semi trailers.  

0 Kudos
jimdempseyatthecove
Honored Contributor III
732 Views

Our temperature in Oshkosh WI, 350mi NE of Ames IA, was/is much warmer (~-1C). We did get about 8" accumulation of snow overnight. And I did have a few 2' snow drifts to plow out. No record cold, yet. 

 

Jim

0 Kudos
andrew_4619
Honored Contributor II
705 Views

"but why would DISLIN need the legacy_stdio.. libs and also the user32 and gdi32 libraries" 

Well because DISLIN uses calls to those sdk libs and nowhere else in your project are those implicitly being pulled in. If you have USE ifwin or any other intel sdk interface it pulls the relevant libs into the link with the likes of !DIR$OBJCOMMENT LIB:"USER32.LIB" in the source.

As to the legacy libs is fprintf the only unresolved call? That should be in the default CLIB but maybe you have "nodefaultlibs" in your link command to bypass that?

0 Kudos
JohnNichols
Valued Contributor III
602 Views

I have been using DISLIN with IFORT for many years and I have tried it with C#. 

The notes provided by the author indicates that it works with IFORT and by extension IFX.  This is true but the steps to succeed are :

add in user32.lib, gdi32.lib, create the mod files for the DISLIN.F90, and add in the legacy_stdio.. libs. The last time I did this I wrote to the author, whom I paid for DISLIN manuals and asked that he include the notes in the readme, this has not occurred, one can but wish.  It will not run with user and gdi, but whence you use those, you get a fprintf error that I am sure Steve helped me to solve many years ago using the legacy drivers, I even remember he provided an explanation at the time.  

Unfortunately, it is just long enough between computer changes and using DISLIN on a new computer that you remember you need to make changes, you just forget what they are. 

But the IFORT encyclopedia of infinite knowledge is a good place to store notes that will not get lost.  

It is selfish, but it works. 

There is 0.1 mm of ice crystals on the lawn, I am off to build a snowman at that is at least 1 barley corn high.  

PS A barley corn is a US customary unit from the British.  

0 Kudos
mecej4
Honored Contributor III
582 Views

About the time that Visual Studio 2015 was released, Microsoft made some changes to the way in which the STDIO functions such as fprintf() are declared and linked. I suspect that the libraries that are distributed with DISLIN were built with earlier versions of Visual C. Just now, I downloaded and built the exa-f90 example with (a) Ifort 2013 SP1 and (b) ifx 2024.0.2 Only in case (b) did I need to include legacy_stdio_definitions.lib.

0 Kudos
JohnNichols
Valued Contributor III
551 Views

Yes, I agree that is the likely cause.  But the author has many distributions and it is nice that it is available in Fortran so we can put up with a minor issue.  Storing the necessary change here makes it easier to find than within 500000 files on my computer as I do not install it that often.  

I have an old version of IFORT on a CD, but I prefer to just use the latest. I am always amazed at how many versions of Fortran you can run.   

 

0 Kudos
Reply