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

Attempting to invoke ifort from regular command line

awa5114
Beginner
1,165 Views

I am attempting to invoke ifort from the regular windows command prompt. I tried browsing to the Intel Fortran bin directory and running what batch files I found that looked appropriate. For this instance I ran:

compilervars.bat

compilervars_arch.bat

ifortvars.bat

vsshel2010vars_arch.bat

Then I browsed to my folder containing my source files and tried doing an operation that required use of the linker. This threw an error:

-out:test.exe
-subsystem:console
test.obj
module1.obj
module2.obj
LINK : fatal error LNK1104: cannot open file 'ifconsol.lib'

I'm not sure why it cannot open said file. Is there a batch file I omitted to run? I don't want to just blindly run every batch file I can get my hands on. Is it even possible to invoke ifort in the regular command prompt?

Thanks

0 Kudos
6 Replies
Arjen_Markus
Honored Contributor I
1,165 Views

Maybe you are overdoing it ;). I always use the Start menu and the item for Intel Fortran. It takes some searching, depending on the actual version of Intel Fortran you are using, but there ought to be an entry which brings up the command prompt. And I would think that ifortvars.bat is enough, perhaps with suitable parameters.

0 Kudos
awa5114
Beginner
1,165 Views

I need to use the regular windows command prompt because I'm developing a batch script that will need to operate as a runner in a TeamCity project. I think the command line runner in TeamCity doesn't have ifort built in so using only the intel command prompt is out of question.

In light of the error I am showing what, in your opinion, are some suitable parameters?

Thanks

0 Kudos
Arjen_Markus
Honored Contributor I
1,165 Views

I tried this:

> "c:\program files (x86)\....\ifortvars.bat" intel64

> ifort someprogram.f90

and that worked as a charm.

Our set-up with Team City uses the Visual Studio solution to build the programs. That might be an alternative.

0 Kudos
awa5114
Beginner
1,165 Views

Hi @Arjen Markus.

That worked for me also. It turns out I was omitting the intel 64 option. Thanks for the follow-up.

 

0 Kudos
Arjen_Markus
Honored Contributor I
1,165 Views

Yes, I had the same problem - the definition of the menu items was not very easy to comprehend, but with a little experimentation the usage of the batch files was.

0 Kudos
awa5114
Beginner
1,165 Views

I do have another question though. It appears that  clicking "run" on the Build Step: Command Line in Team City complains about "No enabled compatible agents for this build configuration. Please register a build agent or tweak build configuration requirements"

Under "Agent Requirements" I do see that the command line runner is set as "disconnected". Any ideas on this? Thanks

0 Kudos
Reply