Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

opening fortran compiler in cmd

blvb
Beginner
372 Views

Hi 

 

I am using the fortran compiler to compile subroutines for the finite element program Abaqus. I can make it work with an old version of fortran but I cannot figure out how to call fortran after updating to oneAPI.

 

What I want to do (works with old version):

I run abaqus in windows 10. To make abaqus aware of the compiler i set the target of the shortcut to open the compiler before abaqus. It looks like this:

target: "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.4.246\windows\bin\ifortvars.bat" intel64 && C:\SIMULIA\CAE\2019\win_b64\resources\install\cae\launcher.bat cae || pause

 

Untitled.png

It looks like this when I open shortcut: 

blvb_3-1650877488834.png

 

What I have tried with the new version that failed:

In my newer installation of the fortran compiler I cannot locate the ifortvars.bat in C:\Program Files (x86)\Intel\oneAPI\compiler\2021.4.0 which allows me to start the compiler in the way described above. Instead I have tried to call it directly like this:

blvb_2-1650877126830.png

 

Any help would be much appreciated

 

0 Kudos
1 Solution
Ron_Green
Moderator
314 Views

c:\Program Files (x86)\Intel\oneAPI\setvars.bat

 

note that you do not need the 'intel64' argument to setvars.sh.  Setvars is for all of oneAPI, all the tools. 

If you want to source just the compiler, no other tools or libraries like MKL, then

c:\Program Files (x86)\Intel\oneAPI\compilers\latest\env\vars.sh intel64

note that compiler-only batch file does take the inte64 argument

View solution in original post

5 Replies
mecej4
Black Belt
347 Views

The Fortran compilers in OnaAPI use a slightly different batch file than the old ifortvars.bat, and the layout of the directories is also somewhat different. The batch file is called setvars.bat, as you can find by clicking on the Start Menu entry for the OneAPI command window and asking for properties and following the shortcuts.

blvb
Beginner
303 Views

Hi mecej4. Thank you for the answer!

Ron_Green
Moderator
315 Views

c:\Program Files (x86)\Intel\oneAPI\setvars.bat

 

note that you do not need the 'intel64' argument to setvars.sh.  Setvars is for all of oneAPI, all the tools. 

If you want to source just the compiler, no other tools or libraries like MKL, then

c:\Program Files (x86)\Intel\oneAPI\compilers\latest\env\vars.sh intel64

note that compiler-only batch file does take the inte64 argument

blvb
Beginner
303 Views

Thanks Ron_Green! It works now. I used setvars.bat. 

Ron_Green
Moderator
314 Views

c:\Program Files (x86)\Intel\oneAPI\setvars.bat

 

note that you do not need the 'intel64' argument to setvars.sh.  Setvars is for all of oneAPI, all the tools. 

If you want to source just the compiler, no other tools or libraries like MKL, then

c:\Program Files (x86)\Intel\oneAPI\compilers\latest\env\vars.sh intel64

note that compiler-only batch file does take the intel64 argument

Reply