Intel® oneAPI HPC Toolkit
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
1909 Discussions

Fortran Error (iFort #10037 #10041)

Antoni
Beginner
890 Views

Hello all,

I have an error in using Intel Fortran complier . At first, I have been tinkering for about half a day just to make my ifort to be able to run (I am a total newbie). Now it can run, but It seems to have 2 errors as follow:

 

ifort: error #10037: could not find 'link'
ifort: error #10041: spawn('C:\PROGRA~2\Intel\oneAPI\compiler\20213~1.0\windows\bin\intel64\ifort.exe') failed, errno=0

 

I am actually new to Fortran, cmd, and stuff. I just use Matlab in my previous research but now my Prof. uses fortran.

 

When I use the Intel One API command prompt, it shows this:

 

:: initializing oneAPI environment...
initializing Visual Studio command-line environment...
:: ERROR: Visual Studio not found in "C:\Program Files (x86)\Microsoft Visual Studio\<Year>\<Edition>"
Set VS2017INSTALLDIR or VS2019INSTALLDIR env vars to point to your installation and try again.
Visual Studio environment was not configured.
: advisor -- latest
: compiler -- latest

ERROR: Visual Studio 2019 is not found in "C:\Program Files (x86)\Microsoft Visual Studio\2019\<Edition>", please set VS2019INSTALLDIR
: dal -- latest
: debugger -- latest
: dev-utilities -- latest
: dnnl -- latest
: dpcpp-ct -- latest

ERROR: Visual Studio 2019 is not found in "C:\Program Files (x86)\Microsoft Visual Studio\2019\<Edition>", please set VS2019INSTALLDIR, then re-run this script.
: dpl -- latest
: inspector -- latest
: intelpython -- latest
: ipp -- latest
: ippcp -- latest
: itac -- latest
: mkl -- latest
: mpi -- latest
: tbb -- latest
: vpl -- latest
: vtune -- latest
:: oneAPI environment initialized ::

 

I do have Microsoft visual studio 2019 community, and I do have both base and HPC's latest version installed. I do see and check the tick mark of Microsoft visual studio 2019 during the installation. Since I am new, I just kinda trying some possible path for this error but yield no result. The path is shown in the figures.

 

I really hope some of you can spare a few minutes to help me. This is my master's thesis and really important for me. I utterly say thank you very much.

 

Note: I do tried to use Gfortran via MinGW, but It can't compile since it shows many errors on my computer but no error at my Prof. computer (I think due to different version (My Prof.'s is older))

 

0 Kudos
3 Replies
Germán
New Contributor I
869 Views

I have installed msys2 and the mingw64 GNU tool-chain and everything works just fine; I like it because up until now, I have been a Linux kind of guy. 

I downloaded and installed oneAPI Base+HPC and things work just fine, too. 

If you are going to be working with Intel compiler, I suggest you remove c:\mingw\bin from your System properties, altogether...it is going to get in the way!

Regarding VS2019 and Intel, I don't know what to tell you; but it sure looks like Intel is not finding it.

What happens if you open a CMD terminal and execute the setvars.bat file?
> c:\program files (x86)\Intel\oneAPI\setvars.bat

First of all, it should happen error-free; then, it should show a bunch of new environment variables (like 80 or so) in comparison to a plain CMD terminal; also, it should yield a much longer PATH variable, too. Just do
> set
In a plain CMD terminal and in the one where you run setvars.bat and you should notice a huge difference.

If you don't know your way around the computer, it may be easier and less time-consuming to un-install VS2019 and Intel programs and install everything back...VS2019 first and THEN Intel kits. And, yes, make sure to tell Intel installation program to fully integrate itself with VS2019.

You may reduce the installation time for Intel oneAPI Base kit if you un-select what you won't need from it. 

Antoni
Beginner
862 Views

First of all, thank you very much

 

when I execute the 

> c:\program files (x86)\Intel\oneAPI\setvars.bat

It does not show the environment variables,but errors. the error message is this:

 

:: initializing oneAPI environment...
initializing Visual Studio command-line environment...
:: ERROR: Visual Studio not found in "C:\Program Files (x86)\Microsoft Visual Studio\<Year>\<Edition>"
Set VS2017INSTALLDIR or VS2019INSTALLDIR env vars to point to your installation and try again.
Visual Studio environment was not configured.
: advisor -- latest
: compiler -- latest

ERROR: Visual Studio 2019 is not found in "C:\Program Files (x86)\Microsoft Visual Studio\2019\<Edition>", please set VS2019INSTALLDIR
: dal -- latest
: debugger -- latest
: dev-utilities -- latest
: dnnl -- latest
: dpcpp-ct -- latest

ERROR: Visual Studio 2019 is not found in "C:\Program Files (x86)\Microsoft Visual Studio\2019\<Edition>", please set VS2019INSTALLDIR, then re-run this script.
: dpl -- latest
: inspector -- latest
: intelpython -- latest
: ipp -- latest
: ippcp -- latest
: itac -- latest
: mkl -- latest
: mpi -- latest
: tbb -- latest
: vpl -- latest
: vtune -- latest
:: oneAPI environment initialized ::

 

I think there is a path that I miss, do you know what path? (the path that I already set is provide in the attachment before), thank you so much.

Germán
New Contributor I
844 Views

If you simply open a CMD terminal and type "set", you should get a list of all the environment variables.

In that (alphabetical) list, look for one named VS2017INSTALLDIR or VS2019INSTALLDIR, depending on which version you have; if you do in fact have visual studio already installed and one of the previously mentioned environment variables does not exist, then, go ahead and create it with the corresponding name and as value, give it the path to the installation directory of VS, for example "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community".

 

To create the system environment variable:

  • open the control panel
  • click on system
  • click on advanced system settings
  • in the system properties pop-up dialog, click on "environment variables"
  • in the "environment variables" pop-up dialog, down in the "system variables" frame, click on "New"

 

 

Reply