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

Intel MPI 2019.3.203 not working with Fortran in Visual Studio 2015 if Fortran version is set to "latest"

Joachim_Herb
Beginner
743 Views

If I try to compile a Fortran file with "use mpi" and in the options of Visual Studio 2015 (14.0.25123.00 Update 2) the Intel compiler version is set to latest (with Intel Fortran 2019.2 installed), I get the following output:

1>------ Neues Erstellen gestartet: Projekt: nut, Konfiguration: Release x64 ------
1>Deleting intermediate files and output files for project 'nut', configuration 'Release|x64'.
1>Compiling with Intel(R) Visual Fortran Compiler 19.0.3.203 [Intel(R) 64]...
1>nut.f90
1>..\..\nut\include/nut/communicators.fmod(29): error #7012: The module file cannot be read.  Its format requires a more recent F90 compiler.   [MPI]
1>..\..\nut\include/nut/communicators.fmod(60): error #6404: This name does not have a type, and must have an explicit type.   [MPI_COMM_WORLD]

...

If I set the compiler version explicitly to 2019.0.3.203, it is working.

Does anybody else see this problem? What could cause it?

 

 

0 Kudos
6 Replies
Steve_Lionel
Honored Contributor III
743 Views

I would rebuild with the project property Fortran > General > Suppress Startup Banner set to No and look at the build log to see which exact compiler is being used. The output you show simply identifies what was selected in VS, and if the path is wrong the incorrect compiler could be used.

Why using Latest should be different from selecting 19.0.3, I don't know, but it's a place to start.

0 Kudos
Joachim_Herb
Beginner
743 Views

You are right:

1>Compiling with Intel(R) Visual Fortran Compiler 19.0.3.203 [Intel(R) 64]...
1>nut.f90
1>Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0 Build 20180409
1>Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.
1>..\..\nut\include/nut/communicators.fmod(29): error #7012: The module file cannot be read.  Its format requires a more recent F90 compiler.   [MPI]
...

For whatever reason, latest is interpreted as ifort 16.0. Only, if I set it explicitly to 19.3, that version is used.

 

Steve Lionel (Ret.) (Blackbelt) wrote:

I would rebuild with the project property Fortran > General > Suppress Startup Banner set to No and look at the build log to see which exact compiler is being used. The output you show simply identifies what was selected in VS, and if the path is wrong the incorrect compiler could be used.

Why using Latest should be different from selecting 19.0.3, I don't know, but it's a place to start.

0 Kudos
Steve_Lionel
Honored Contributor III
743 Views

In Visual Studio, go to the compiler selection property page, with Latest selected, and click Reset... Make sure you do that for both Win32 and x64. Then try a build again.

0 Kudos
Joachim_Herb
Beginner
743 Views

This also didn't help. But I can remember, that I installed first the update for ifort 19.3 and then for 16.5 (because I had missed that and 16.4 was installed only).

If I open the "..." subwindow (from the Intel Compiler settings in VS options) and then Macros, for "latest" the $(FortInstallDir) is c:\program files (x86)\intelswtools\compiler_and_libraries_2016\windows\

Where is the macro $(FortInstallDir) set?

 

 

 

Steve Lionel (Ret.) (Blackbelt) wrote:

In Visual Studio, go to the compiler selection property page, with Latest selected, and click Reset... Make sure you do that for both Win32 and x64. Then try a build again.

0 Kudos
Steve_Lionel
Honored Contributor III
743 Views

In the registry editor under HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Intel\Compilers\Fortran there are keys for each version you have installed, as well as a Latest. The version keys each have a subkey ProductDir. Under Latest, it has EM64T_NATIVE and IA32 subkeys, and under those are VSNetxx keys, and THOSE have a ProductDir key. My guess is that the 16.0 install messed up the Latest entries.

(Grumble - this mechanism offends me. Either Latest should just select the latest (highest version), or it should point to what it thinks is the latest entry. Duplicating definitions is just wrong-headed.)

I never noticed that Macros button! Very helpful!

0 Kudos
Joachim_Herb
Beginner
743 Views

Thank you very much for your help. Fixing the path in the registry fixed the problem!

Steve Lionel (Ret.) (Blackbelt) wrote:

In the registry editor under HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Intel\Compilers\Fortran there are keys for each version you have installed, as well as a Latest. The version keys each have a subkey ProductDir. Under Latest, it has EM64T_NATIVE and IA32 subkeys, and under those are VSNetxx keys, and THOSE have a ProductDir key. My guess is that the 16.0 install messed up the Latest entries.

(Grumble - this mechanism offends me. Either Latest should just select the latest (highest version), or it should point to what it thinks is the latest entry. Duplicating definitions is just wrong-headed.)

I never noticed that Macros button! Very helpful!

0 Kudos
Reply