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

Intel VF via Windows batch file

anglia
Beginner
445 Views

As Compaq Visual Fortran is no longer available, Ive just started a 1-month trial of Intel VF and theres an immediate problem I cant get IFORT to run from a Windows batch file (thats how I ran Compaq VF, and I want to stick with it, as I dont get on with Visual Studio alternative):

"C:\\Program Files (x86)\\Intel\\Composer XE 2011 SP1\\bin\\ifortvars" intel64
ifort source-code library file path\\*.FOR

Both these commands work fine if entered individually at the DOS command line, but from a batch file the ifort command bombs-out, with error message not recognised as internal or external command, operable program or batch file.

Ive tried all sorts of variants (elaborations, simplifications, etc) of the ifort line, but nothing seems to help. Please can somebody tell me how this can be done successfully.
0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
445 Views
Have you included the ifortvars.bat command in your batch file?
I usually start a DOS-box via the Intel Fortran build environment first, but what
you can do too (I found that after some experimentation) is:

call "c:\program files ...\ifortvars.bat" intel64
ifort ...

The "call" is important.


Regards,

Arjen

View solution in original post

0 Kudos
3 Replies
Arjen_Markus
Honored Contributor I
446 Views
Have you included the ifortvars.bat command in your batch file?
I usually start a DOS-box via the Intel Fortran build environment first, but what
you can do too (I found that after some experimentation) is:

call "c:\program files ...\ifortvars.bat" intel64
ifort ...

The "call" is important.


Regards,

Arjen
0 Kudos
anglia
Beginner
445 Views

Thank you !!! The "CALL" made all the difference, and IFORT compilation now works correctly. I'm so grateful for your solution to this problem.

Regards,

Anglia.

0 Kudos
Arjen_Markus
Honored Contributor I
445 Views
You're welcome. For small programs I definitely prefer the command line approach too.

Regards,

Arjen
0 Kudos
Reply