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

Multiple compilers

Simon_Geard
New Contributor I
498 Views

I have four compilers installed on my machine: two version 12 and two version 13. For production code I use 12.1.0.233 and for development code we are happy to try the latest compiler. My question is how do I ensure that at runtime the program uses the matching dlls. As far as I can see there is only one redis directory which I assume is the latest and therefore (in principle) not compatible with the earlier compilers.

Simon Geard

0 Kudos
8 Replies
Steven_L_Intel1
Employee
498 Views

Your assumption that the later DLLs are not usable with the older compilers is not correct.  We make darned sure that they are compatible and recommend that you always use the latest DLLs. In fact, our install makes that happen by default.

If you want to test against a specific compiler's version, open a Fortran command prompt window for that version and its specific DLLs will be first in PATH.

0 Kudos
Simon_Geard
New Contributor I
498 Views

It didn't mean not usable just not necessarily completely compatible. This relates to an issue my colleague has reported separately about the G format; I'll repeat it here to save switching.

[fortran]

program fortranformat
    implicit none

    ! Variables
    CHARACTER*12 TCHAR
    real*4 r
 
    r = -1.0
    write(*,'(G12.6)') R
    
 end program fortranformat
[/fortran]

If I build and run the above with the 13.0.1.119 compiler I get

<blockquote>

c:\development\lloyds>ifort format.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.1.119 Build 20121008
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.

format.f90(9): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
    write(*,'(G12.6)') R
---------------^
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

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

c:\development\lloyds>format
************

</blockquote>

Similarly for 12.1.0.233 I get

<blockquote>

c:\development\lloyds>ifort format.f90 /exe:form.exe
Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.0.233 Build 20110811
Copyright (C) 1985-2011 Intel Corporation.  All rights reserved.

format.f90(9): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
    write(*,'(G12.6)') R
---------------^
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:form.exe
-subsystem:console
format.obj

c:\development\lloyds>form
-1.00000

</blockquote>

So there was a change in the v13 compiler which I think was a bug fix since the v12 compiler only outputs 5 dp not the 6 requested.

The actual application build uses the 12.1.0.233 compiler and I've used property pages to ensure that only IFORT_COMPILER12 libraries are used at build time, and yet the program output is the same as that obtained by 13.0.1.119 version of the above. This is how I reached my conclusion that the runtime library that was being used was one from the latest compiler installation.

0 Kudos
Steven_L_Intel1
Employee
498 Views

See your other thread about this.  The latest DLLs are compatible with older compiled code, but you may encounter changes in behavior. The 12.1 libraries incorrectly implement G format in some cases, 13.0 is correct according to Fortran 2008, but the language changed again. If you want to insulate yourself against such changes, link to the static libraries.

0 Kudos
Simon_Geard
New Contributor I
498 Views

Thanks very much for both explanations.

0 Kudos
SergeyKostrov
Valued Contributor II
498 Views
>>...My question is how do I ensure that at runtime the program uses the matching dlls... For example, when you do debugging of your Fortran program in a Visual Studio take a look at a list of loaded DLLs ( full paths are always shown ) in the Output Window.
0 Kudos
Simon_Geard
New Contributor I
498 Views

You can use 'depends' on the executable which will list the full path of all the dlls that exe will load. This is a good solution for customer installations where typically there is no Visual Studio or installed Fortran compiler.

0 Kudos
Steven_L_Intel1
Employee
498 Views

What you want to make sure is that the "file versions" of the Intel DLLs are all the same. When you look at Dependency Walker's output, the bottom pane lists all the DLLs loaded. (It may get confused, though, if you use the 32-bit version on a 64-bit system. Here's the info you are looking for :

0 Kudos
SergeyKostrov
Valued Contributor II
498 Views
>>...It may get confused, though, if you use the 32-bit version on a 64-bit system... Here is an example of how it looks like: mkl-rt.dll.32biton64bitos.jpg Note: The pictire is related to some problem with Intel MKL library ( Web-link: software.intel.com/en-us/forums/topic/360825 )
0 Kudos
Reply