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

Intel VF via Windows batch file

Jump to solution

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

Accepted Solutions
Highlighted
Valued Contributor II
7 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
Highlighted
Valued Contributor II
8 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
Highlighted
Beginner
7 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
Highlighted
Valued Contributor II
7 Views
You're welcome. For small programs I definitely prefer the command line approach too.

Regards,

Arjen
0 Kudos