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

opening fortran compiler in cmd

blvb
Novice
1,108 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
1,050 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

0 Kudos
5 Replies
mecej4
Honored Contributor III
1,083 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
Novice
1,039 Views

Hi mecej4. Thank you for the answer!

0 Kudos
Ron_Green
Moderator
1,051 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

0 Kudos
blvb
Novice
1,039 Views

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

0 Kudos
Ron_Green
Moderator
1,050 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

0 Kudos
Reply