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

Intel Visual fortran installation issue

Rosier__Sebastian
790 Views

Hi,

Firstly I'm very sorry for posting this as I can see that this has been asked countless times but I've trawled through the answers and none of them seem to resolve my issue.  I have been trying to install Intel parallel studio XE 2018 onto my windows 10 computer, just in order to compile some simple fortran code in the command prompt. Prior to this I downloaded and installed Microsoft visual studio 2017 being careful to include all the C++ support that seems to also be needed. If I try and compile a simple fortran script in the command prompt I get 'ifort: error #10037: could not find 'link'. If I try and run the psxevars.bat intel64 command found in the parallel studio installation directory I get 'ERROR: Visual Studio 2013, 2015 or 2017 is not found in the system.' and I get a similar error if I try and run the intel comiler environment found in the start menu.  I'm sure I'm doing something very silly but I'm not smart enough to figure out what, any suggestions would be hugely appreciated!

Sebastian

0 Kudos
10 Replies
Steve_Lionel
Honored Contributor III
790 Views

Let's start with this. Open Visual Studio 2017. Select Help > About. Click the "Copy Info" button, and paste the result into a reply here. This lets us see how you have Visual Studio configured.

0 Kudos
Rosier__Sebastian
790 Views

Hi Steve,

Thanks very much for your reply. I followed your instructions and here is the info you requested:

Microsoft Visual Studio Professional 2017 
Version 15.7.4
VisualStudio.15.Release/15.7.4+27703.2035
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Professional

Visual C++ 2017   00369-60000-00001-AA214
Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package   8.12.10405.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.40601.0
ASP.NET and Web Tools 2017

C# Tools   2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools   15.7.20419.2003
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   2.8.3-beta6-62923-07. Commit Hash: 7aafab561e449da50712e16c9e81742b8e7a2969
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Linux Development   1.0.9
Visual C++ for Linux Development

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake   1.0
Visual Studio Tools for CMake

Visual Studio Tools for Universal Windows Apps   15.0.27703.2035
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Windows Machine Learning Generator Extension   1.0
Windows Machine Learning Visual Studio Extension Detailed Info

0 Kudos
Steve_Lionel
Honored Contributor III
790 Views

Ok, this looks fine. Please uninstall and reinstall Intel Parallel Studio XE. Pay very close attention to any warning messages displayed at the beginning or end of installation. Let us know what happens.

0 Kudos
Rosier__Sebastian
790 Views

Hi Steve,

Thanks again for getting back to me. The only warning I get (when I start the installation) is this:

If you intend to use the Intel® C++ Compiler feature to offload application computation to Intel® Graphics Technology
Please see the online Getting Started with Compute Offload To Intel Graphics Technology (https://software.intel.com/en-us/articles/getting-started-with-compute-offload-to-intelr-graphics-technology) for host and target requirements.

Having reinstalled it I still get a link failed error when compiling fortran code from a generic command prompt window BUT now when I try and run the command prompt that I find in the start menu under intel parallel studio XE 2018 I can compile the code. I guess maybe then it's almost solved and presumably I need to somehow setup the correct paths?

Sebastian

0 Kudos
Steve_Lionel
Honored Contributor III
790 Views

That's correct - for building from a command prompt you need to set up a lot. The shortcut added in the Start menu does this for you. What I tend to do is copy one of these shortcuts to my desktop. then edit it to change the "Start in" directory to be where I do my development, as the default is probably inappropriate. I also edit the path for the compiler to replace the explicit part (up to but not including \bin) with %IFORT_COMPILER18% so that it works for whatever the most recent version 18 compiler is.

0 Kudos
Rosier__Sebastian
790 Views

Hi Steve,

The way intel fortran is being called for my purposes is internally within a finite element software - unfortunately I can't just compile the fortran myself, so I need the compiler to work from any directory. Sorry for being dense but could you explain what environment variables I need to setup to do this, or is there a batch file somewhere within intel fortran/visual studios that will setup the correct variables for me?

Many thanks,

Sebastian

0 Kudos
Steve_Lionel
Honored Contributor III
790 Views

Yes, there is a batch file. The shortcut runs the batch file, and once you have run it you can use the compiler from any directory.

If you want to call the batch file manually:

call %IFORT_COMPILER18%\bin\ifortvars.bat intel64

Run this from your command prompt or your own .bat file.

This assumes you want version 18 and are building for x64. If building 32-bit, use "ia32" instead of "intel64".

0 Kudos
Rosier__Sebastian
790 Views

Hi Steve,

If I open a command prompt window and run the ifortvars.bat command then I can compile fortran from within that command prompt window. However if I then open a new command prompt window then I can't compile in the new one. Since the software I use calls intel fortran by itself I can't use this as a solution because there is no way for me to run the ifortvars batch file within that software. I need a way to permanently add all the commands I need to run intel fortran to my path so that no matter where or when I call the commands they are all available. How would I set this up?

Thanks for all your help so far,

Sebasitan

0 Kudos
IanH
Honored Contributor II
790 Views

Every user running that software (what is it?) would have run into this problem.

Software that uses ifort to compile user procedures or similar typically provides a way to invoke the equivalent of the ifortvars.bat script - running that script ahead of the program (in the same command prompt), specifying the path to the script as some sort of program setting, or some other hook.

0 Kudos
Steve_Lionel
Honored Contributor III
790 Views

There is no reasonable way to set this up so that any arbitrary command prompt will have access to the dozens of environment variables used by the compiler and the Microsoft tools. Why do you need to open yet another command window? Just invoke your tool from the one that has the Fortran environment set up. 

0 Kudos
Reply