Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
521 Views

ifort not recognized as an internal or external command

Jump to solution

Good afternoon 

I have Parallel Studio XE 2019 Cluster Edition, and now I am trying to run a *.bat file in my computer, I am a beginner the use of this kind of files. My computer has two units a SSD (C:) and  a HDD (D:). Parallel Studio was installed in the D: unit, and when I want to run ifort form the batch file I get the message "ifort is not recognized as an internal or external command". I find the ifort.exe file in "Program Files" folder. I do not know what could be bad. 

Thanks

Miguel

0 Kudos

Accepted Solutions
Highlighted
Black Belt Retired Employee
521 Views

You need to add this in your .bat file:

call "%IFORT_COMPILER19%bin\ipsxe-comp-vars.bat" intel64 vs2017

This establishes the proper command line environment for the ifort command.

Replace "intel64" with "ia32" if you want 32-bit, and/or "vs2017" by the VS version you have.

View solution in original post

0 Kudos
11 Replies
Highlighted
Black Belt Retired Employee
522 Views

You need to add this in your .bat file:

call "%IFORT_COMPILER19%bin\ipsxe-comp-vars.bat" intel64 vs2017

This establishes the proper command line environment for the ifort command.

Replace "intel64" with "ia32" if you want 32-bit, and/or "vs2017" by the VS version you have.

View solution in original post

0 Kudos
Highlighted
521 Views

Thanks, it works perfectly!!.

0 Kudos
Highlighted
521 Views

How to Fix “not recognized as an internal or external command” in Windows?

 

set path=c:\foo;%path%
call "%IFORT_COMPILER19%bin\ipsxe-comp-vars.bat" intel64 vs2013
abq2019 job=plas_exp_axidisp user=code_exp cpus=4 interactive
 

This is my bat file. It is not working

0 Kudos
Highlighted
Black Belt Retired Employee
521 Views

I'm a bit surprised that the .bat file even accepts "vs2013" as an option as that isn't supported by the 19.0 compiler.

What happens if you type:

ifort

after the call command completes?

0 Kudos
Highlighted
Beginner
223 Views

even though more than a year has passed, I wanted to kindly ask two things about the same problem:
1) how can you do the same thing from the Powershell of Windows?
2) How can you do the same thing from Visual Studio? (I need to install a local python package from the "python environment" of VS2017, but this package needs ifort. The instruction to install a local python packages is to copy and paste the path of the (local) package into the python Environmet for installing packages. But it does find ifort. (I get an error " Could not locate executable ifort")

many thanks and best regards

 

0 Kudos
Highlighted
Black Belt Retired Employee
210 Views

The answer to your Powershell question is harder than I anticipated. I am looking into this. I can get the script to run, but the environment variables don't stick. It is a brave new world....

As for VS, I don't understand your question. What is the "Python environment" of VS2017?

0 Kudos
Highlighted
Black Belt Retired Employee
208 Views

The simple answer to the Powershell question is to first type:

cmd.exe

and then proceed as shown earlier. If I find another solution, I will update this thread.

0 Kudos
Highlighted
Black Belt Retired Employee
203 Views

Here's an alternative, done from a cmd.exe window:

call "%IFORT_COMPILER20%bin\ipsxe-comp-vars.bat" intel64 vs2019
powershell

You will now be in Powershell and can use the ifort command.

0 Kudos
Highlighted
Beginner
180 Views

many thanks, the solutions you suggested worked perfectly.

VS2017: may be I should post this question on a dedicated site. I'm working on a Python project.

I write everything just to be clear (I'm not yet familiar with Python):

From VS2017: Tools > Python > Python Environments: it allows to install python packages from VS. Normally one can search PyPI packages. When installing a local package (e.g. downloaded from a git repository), one can simply add the local path to the search bar of the Packages (PyPI)... but in the output I get an error (that is the same obtained when installing the same package from cmd or powershell): "Could not locate executable ifort".

 

0 Kudos
Highlighted
Black Belt Retired Employee
165 Views

I am not familiar with using Python from inside VS, but I am not surprised by this behavior. Building a Fortran project in VS has the Intel Fortran paths added, but any non-Fortran projects or command scripts run won't know about the Intel Fortran paths. I do recommend asking about this in a Python-related community. 

0 Kudos
Highlighted
New Contributor II
153 Views

 

call "%IFORT_COMPILER20%bin\ipsxe-comp-vars.bat" intel64 vs2019
powershell

This is great - I did not know this would work.

JMN

0 Kudos