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

ifortvars draws unknown command "amf64" and unknown command "link" from compilation

Gordon_Sande
Beginner
747 Views
I installed Parallel Studio XE 2011 update1 and then ...sp1.... I invoked "ifortvars.bat intel64" as setup for
the command line processor. (I use JPSoft's TakeCommand but that should not be the issue as it has worked
well in the past.) There is an unknown command "amd64" at line 215 in some batch file called by ifortvars.
When I compile there is eventually an unknown command "link". This is on a Windows 7 (64-bit) in an
NTFS partition on a Mac Pro.
The batch file called by ifortbars is arcane, nothing but many parameters and quite inscrutable as it is
totally parameterized to accomadate all sorts of situations. The line 215 is of the form "call xxx yyy"
when xxx is msvs_... and evaluates to null and yyy evaluates to "amd64" which explains the immediate
cause of the unknow command amd64. It appears that the code intended to fill in msvs_ only expects
ia32. But I really do not want to debug this many pages of what used to be called line noise. Batch file
are unreadable when they have heavy substitutions and were never really intended to be more that 30
lines when developed for CP/M in the era of the first PC. But they are what is there. :-(
How do I compile from a command line on Win7-64?
(PS I thought I had posted this before but am unable to find any trace of it. It may well be in some other
placeas I find navigating these forums unclear for someone who needs it once every couple years. The last
timeI used these forums I had email echoing on but I could not find such an option this time.)
0 Kudos
8 Replies
mecej4
Honored Contributor III
747 Views
amd64 is a subdirectory rather than a command. Typically, the VC-tools installation (or other SDK installation) contains 32-bit tools (linker, librarian, dumper, etc.) in its bin directory; the 64 bit versions are in the amd64 subdirectory of the bin directory.
0 Kudos
Steven_L_Intel1
Employee
747 Views
I saw an earlier post from you and replied to it, but the thread seems to be gone. Strange.

My guess is that you did not install the "X64 compiler and tools" component of Visual Studio. You should not try understanding what is inside ifortvars.bat - just use it the way we recommend. If you did not install x64 support in Visual Studio, you will get errors like this when trying to build for x64.

Here are the instructions from the compiler release notes:

If you are using Microsoft Visual Studio 2005* or 2008 and will be developing 64-bit applications
(for the Intel 64 architecture) you may need to change the configuration of Visual Studio to add
64-bit support.
If you are using Visual Studio 2005/2008 Standard Edition or Visual Studio 2008 Shell, no
configuration is needed to build Intel 64 architecture applications. For other editions:
1. From Control Panel > Add or Remove Programs, select Microsoft Visual Studio 2005
(or 2008) > Change/Remove. The Visual Studio Maintenance Mode window will appear.
Click Next.
2. Click Add or Remove Features
3. Under Select features to install, expand Language Tools > Visual C++
4. If the box X64 Compiler and Tools is not checked, check it, then click Update. If the
box is already checked, click Cancel.
This step is not required when using Microsoft Visual Studio 2010.
0 Kudos
Gordon_Sande
Beginner
747 Views
The ifortvars.bat is the top level that checks its arguments for correctness and either issues a diagnostic
that gives a correct usage or it calls further batch files for processing. Under no circumstances does
one expect the further processing to have to deal with incorrect invocation. Except of course when the
whole thing is buggy and botched. Whether amd64 is a command or a directory or the name of a programmer
at Intel does not matter as there should not be any diagnostics.
In this case there are clearly problems which include the setting up of the paths needed to do linking.
It is not the end users job to debug these sorts of infrastructure files from Intel.
The end result is that the new improved software is an improvement to not working. Not exactly what
one expects from an outfit that claims to be professional.
0 Kudos
Steven_L_Intel1
Employee
747 Views
It could be that your non-standard command processor is the issue, but I have not seen other users encounter a similar problem. Please verify that the VS x64 support is installed as I showed above.
0 Kudos
Gordon_Sande
Beginner
747 Views
>> I saw an earlier post from you and replied to it, but the thread seems to be gone. Strange.
Good. (Bad?) I was not dreaming. I could not find it either so tried again.

Thanks. I do not intend to use anything other than the command line so have paid no attention
to MS Visual Studio xxxx.
I did a clean install of Parallel Studio XE 2011 update1 which seems to include VS2008. Not clear on
what version of VS. Then I installed the Parallel Studio XE 2011 sp1 which seems to include VS2010. Again
I am not clear on what version of VS. The only VS I have is whatever is included in your kits.But you seem
to imply that I should not have to bother. All ofthis was just the standard installs of both. Learned the
hard way that ...sp1... by itself is only newversions of part of the whole package. Hopefully update1
was a reasonable starting point inspite of the slightly confusing name. If not then I am missing the
base system that was to be updated and then service packed.
I must admit that I am surprised that the support batch files to ifortvars are willing to proceed with
erroneous arguements. When I put a print (well it is spelt echo) in the offending support file it was
clear that some calculated variable had stayed at blank in total silence. So the detailed message
of unknown command amd64 made sense as a symptom even if the real cause was still a mystery.
With just the Fortran compiler back to DEC days it has always just worked. But this marvelous
combination of Parallel, C and Fortran in one package has not just worked out of the box.
I think I have been told that there is nothing for me to do as VS2010 was installed by sp1. But that
also just leaves me with ifortvars that is issuing diagnostics and with no ability to link the results
of a compilation. No real progress over where I am now.
0 Kudos
Steven_L_Intel1
Employee
747 Views
Gordon,

If you are using the Visual Studio Shell that is included in Parallel Studio XE, then that would have the x64 support installed.

Can we start over? I admit I don't fully understand where you are seeing the error and exactly what the error is. How are you starting the command line environment? Please show the command window output from the beginning through the point of the error (including the error message.)

If you do Start > All Programs > Intel Parallel Studio XE 2011 > Command Prompt > Parallel Studio XE with Intel Compiler 12.1 , and try to build from that environment, does it work?
0 Kudos
Gordon_Sande
Beginner
747 Views
Steve
I used cmd.exe and pasted in the call to ifortvars.
It came back and said that the VS2008 x86 tools were installed. No messages of the "report an error" type!
TakeCommand would process ifortvars and call compvars... which is 300+ lines of setting internal
variablesdepending on both arguements and environment variables. It then calls yet another batch
files with oneof these set variables. With the evident internal problem of TC the result looked like
call " " amd64 andproduced an error message. The " " was supposed to be one of the VS batch
files that cmd.exe seemsto be able to set and find.
Rather definitive indication that the problem is with TakeCommand from J P Soft. Will file a problem report.
They make a point of being compatible but have clearly missed. Too bad as it is a much easier to use
CLI that cmd. They go back to 4DOS so one is a bit surprised. Maybe I will have to dig out an older
copy of TakeCommand as I upgraded TakeCommand at the same time as I finally got around to installing
Parallel Studio. Too many changes at once!
Thanks.
0 Kudos
Steven_L_Intel1
Employee
747 Views
Ok - glad to hear that you identified the culprit.
0 Kudos
Reply