Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intel Fortran Compiler

2 views
Skip to first unread message

Xavier Seneque

unread,
Mar 16, 2004, 8:47:22 AM3/16/04
to
Hello,

on the intel web site, there is this sentence :

"A system based on a 450 MHz Intel Pentium II processor or or greater,
Intel Pentium 4 recommended."

but i have and AMD 750 box...

will the IFC compiler work with an AMD ( as it is from the x86 family ),
or is it really specific for intel processors ?

if it won't work, could any one tell me about a free fortran 95 compiler
that run with linux and AMD processors ? :)

thanks !

David Ham

unread,
Mar 16, 2004, 9:07:20 AM3/16/04
to
Xavier Seneque <xavier....@wanadoo.fr> writes:

> Hello,
>
> on the intel web site, there is this sentence :
>
> "A system based on a 450 MHz Intel Pentium II processor or or greater,
> Intel Pentium 4 recommended."
>
>
> but i have and AMD 750 box...
>
> will the IFC compiler work with an AMD ( as it is from the x86 family
> ), or is it really specific for intel processors ?

We have no difficulty using IFC on AMD. Rumour has it, it's even fast :-).

If you want to get involved in fiddling with processor targetting
options, you'll need to know which intel processor you AMD has the
same instruction set as but that's small beans.

David

Steve Lionel

unread,
Mar 16, 2004, 10:00:17 AM3/16/04
to
On Tue, 16 Mar 2004 14:47:22 +0100, Xavier Seneque <xavier....@wanadoo.fr>
wrote:

>on the intel web site, there is this sentence :
>
>"A system based on a 450 MHz Intel Pentium II processor or or greater,
>Intel Pentium 4 recommended."
>
>but i have and AMD 750 box...

The Intel web site lists minimum configurations which have been tested and are
supported. There are a variety of vendors other than Intel which make
processors compatible, more or less, with Intel processors. In most cases,
these work fine. If you encounter a problem with the compiler and we can
reproduce it on an Intel processor, we'll be glad to investigate. If the
problem is reproducible only on a non-Intel processor, we may not be able to
help. However, in the seven years I've been dealing with Fortran on PCs, I
have not yet encountered such a problem other than the obvious one of certain
instructions not being supported on one processor or another.

I will point out that some of the Intel compilers' processor-targetted
optimization modes, such as -xN, are for Intel processors only.

If you have further questions about Intel Fortran compilers, please feel free
to ask in our user forums at http://softwareforums.intel.com/


Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/

Dr Chaos

unread,
Mar 16, 2004, 7:29:54 PM3/16/04
to

Unfortunatley that doesn't matter (any more?).

With Intel Fortran 8.0, the compiled code specifically looks for
"GenuineIntel" CPU's through the processor ID. If it does not
find one, then depending on the compilation options -ax? vs -x?
it will execute 'generic Pentium' code or abort.

This was confirmed by an Intel person.

I think this is pretty annoying, meaning that even thought the Athlon 64
finally has SSE2, IFC compiled code will not take advantage of it
ever.

Scott Robert Ladd

unread,
Mar 16, 2004, 8:01:57 PM3/16/04
to
On Tue, 16 Mar 2004 14:47:22 +0100, Xavier Seneque wrote:
> will the IFC compiler work with an AMD ( as it is from the x86 family ),
> or is it really specific for intel processors ?

Yes, the Intel Fortran 95 compiler works with AMD processors. However,
you need to avoid options that generate Intel-specific instructions -- for
example, no current AMD processor implements the "Prescott New
Instructions", aka SSE3.

> if it won't work, could any one tell me about a free fortran 95 compiler
> that run with linux and AMD processors ? :)

GNU is developing a Fortran 95 compiler that is about 80% complete in
terms of language conformance. However, GNU Fortran does not (and is not
likely to soon) support OpenMP. Also, GNU Fortran 95 is part of GCC 3.5
The current release is 3.3), and as such, is only available by
downloading and building the compiler source from the GNU CVS servers.

--
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing


Steve Lionel

unread,
Mar 17, 2004, 11:38:57 AM3/17/04
to
On Wed, 17 Mar 2004 00:29:54 +0000 (UTC), Dr Chaos
<mbkennelS...@NOSPAMyahoo.com> wrote:

>With Intel Fortran 8.0, the compiled code specifically looks for
>"GenuineIntel" CPU's through the processor ID. If it does not
>find one, then depending on the compilation options -ax? vs -x?
>it will execute 'generic Pentium' code or abort.

Just to clarify - this occurs ONLY if you use the processor targeting options
B, N or P.

Rich Townsend

unread,
Mar 17, 2004, 11:57:10 AM3/17/04
to
Steve Lionel wrote:
> On Wed, 17 Mar 2004 00:29:54 +0000 (UTC), Dr Chaos
> <mbkennelS...@NOSPAMyahoo.com> wrote:
>
>
>>With Intel Fortran 8.0, the compiled code specifically looks for
>>"GenuineIntel" CPU's through the processor ID. If it does not
>>find one, then depending on the compilation options -ax? vs -x?
>>it will execute 'generic Pentium' code or abort.
>
>
> Just to clarify - this occurs ONLY if you use the processor targeting options
> B, N or P.
>

And for those without the ifort man page handy, these options are:

B -> target for Pentium M processors (B for Banias)

N -> target for Pentium 4 processors (N for Northwood)

P -> target for Pentium 4 processors with SSE3 support (P for Prescott)

(Note: the bits in parentheses are my guess as to Intel's nomenclature
scheme)

cheers,

Rich

Dr Chaos

unread,
Mar 17, 2004, 3:06:47 PM3/17/04
to
On Wed, 17 Mar 2004 11:38:57 -0500, Steve Lionel <Steve....@intel.com> wrote:
> On Wed, 17 Mar 2004 00:29:54 +0000 (UTC), Dr Chaos
><mbkennelS...@NOSPAMyahoo.com> wrote:
>
>>With Intel Fortran 8.0, the compiled code specifically looks for
>>"GenuineIntel" CPU's through the processor ID. If it does not
>>find one, then depending on the compilation options -ax? vs -x?
>>it will execute 'generic Pentium' code or abort.
>
> Just to clarify - this occurs ONLY if you use the processor targeting options
> B, N or P.

Does this mean if I compile with -xW, and run on an Athlon 64, the
code will work and successfully use SSE2 instructions (implemented in
Athlon 64)?

if so, why the change between B,N,P vs K and W. Is there a technical
reason or is there an annoying marketing reason? Is it to hurt
AMD's SPECmarks? And how long would that last? Only until AMD has its
own tuned compilers, a very temporary advantage.

I don't think Intel ought to go out of its way to tune to AMD
processors, but it also shouldn't go out of its way to needlessly
thwart AMD's compatibility with Intel instruction sets.

At some point AMD or the operating system will respond by faking
GenuineIntel id's if necessary.

I have no problem buying Intel cpus if they give the best price/performance
for my application. I do have a problem if they try to make that
gap from artificial means.

Steve Lionel

unread,
Mar 17, 2004, 3:42:54 PM3/17/04
to
On Wed, 17 Mar 2004 20:06:47 +0000 (UTC), Dr Chaos
<mbkennelS...@NOSPAMyahoo.com> wrote:

>Does this mean if I compile with -xW, and run on an Athlon 64, the
>code will work and successfully use SSE2 instructions (implemented in
>Athlon 64)?

-xW does not do the CPUID check, so the instructions are executed. Whether
they are successfully executed depends on how faithful the implementation is.
Note that -xW may not be supported in future versions of the compiler.


Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products

Dr Chaos

unread,
Mar 17, 2004, 8:07:20 PM3/17/04
to
On Wed, 17 Mar 2004 15:42:54 -0500, Steve Lionel <Steve....@intel.com> wrote:
> On Wed, 17 Mar 2004 20:06:47 +0000 (UTC), Dr Chaos
><mbkennelS...@NOSPAMyahoo.com> wrote:
>
>>Does this mean if I compile with -xW, and run on an Athlon 64, the
>>code will work and successfully use SSE2 instructions (implemented in
>>Athlon 64)?
>
> -xW does not do the CPUID check, so the instructions are executed. Whether
> they are successfully executed depends on how faithful the implementation is.
> Note that -xW may not be supported in future versions of the compiler.
>

And what is the purpose of the CPUID check?

Tim Prince

unread,
Mar 18, 2004, 12:23:27 AM3/18/04
to

"Dr Chaos" <mbkennelS...@NOSPAMyahoo.com> wrote in message
news:slrnc5htib.6a7.m...@lyapunov.ucsd.edu...

Subroutines compiled with options like -axP will test a flag set by the main
program, to determine whether the processor was recognized as a processor
which supports (in this case) SSE3 instructions. On this basis the SSE3 or
non-SSE code path is taken.

I haven't had much luck attempting to run P4 SSE2 code on an Opteron. There
appear to be a number of undocumented differences between the variety of
SSE2 supported by Opteron and that supported by Intel CPUs. I doubt that
the Intel compiler goes out of its way to exploit the differences (except
where a certain choice of instructions is expected to optimize for Xeon); if
it did, I would expect the success rate to be closer to 0. I suspect that
it's more difficult for Intel compiler folks to find out about these than
for other compiler vendors, but I think various groups are trying to find a
subsets of SSE instructions which will work on current models of various
brands. It's easy enough to select different options for the main program
and the important subroutines, such that the CPU brand will not be checked
and there is no protection against running into these failures.

Among the reasons for the original use of CPUID check is that there was no
documented way to distinguish Athlons which had the SSE hardware capability
flag on but SSE disabled in BIOS from those which could actually run SSE
code. Also, there have always been differences among models in the numerics
of the instructions which don't satisfy IEEE-754 (e.g. rcpps). It's
probably too difficult for anyone to reverse engineer these sufficiently to
get identical results to some other CPU; if AMD can't make their models
consistent, there's not even a single target to match.

My opinions are personal, probably wrong, yet subject to change.....


Dr Chaos

unread,
Mar 18, 2004, 2:50:50 PM3/18/04
to
On Thu, 18 Mar 2004 05:23:27 GMT, Tim Prince <tpr...@computer.org> wrote:
>
> "Dr Chaos" <mbkennelS...@NOSPAMyahoo.com> wrote in message
> news:slrnc5htib.6a7.m...@lyapunov.ucsd.edu...
>> On Wed, 17 Mar 2004 15:42:54 -0500, Steve Lionel <Steve....@intel.com>
> wrote:
>> > On Wed, 17 Mar 2004 20:06:47 +0000 (UTC), Dr Chaos
>> ><mbkennelS...@NOSPAMyahoo.com> wrote:
>> >
>> >>Does this mean if I compile with -xW, and run on an Athlon 64, the
>> >>code will work and successfully use SSE2 instructions (implemented in
>> >>Athlon 64)?
>> >
>> > -xW does not do the CPUID check, so the instructions are executed.
> Whether
>> > they are successfully executed depends on how faithful the
> implementation is.
>> > Note that -xW may not be supported in future versions of the compiler.
>> >
>>
>> And what is the purpose of the CPUID check?
>
> Subroutines compiled with options like -axP will test a flag set by the main
> program, to determine whether the processor was recognized as a processor
> which supports (in this case) SSE3 instructions. On this basis the SSE3 or
> non-SSE code path is taken.

OK, that's not what I mean. I think testing for CPU features is fine;
but Steve Lionel said that now Intel compilers specific test for
the manufacturer, and only use the more advanced instructions on
"GenuineIntel" squawking CPUs, regardless of the actual hardware
capability.


> I haven't had much luck attempting to run P4 SSE2 code on an Opteron.

what was the compiler, or was it assembly?

Gerry Thomas

unread,
Mar 18, 2004, 3:33:04 PM3/18/04
to

"Dr Chaos" <mbkennelS...@NOSPAMyahoo.com> wrote in message
news:slrnc5htib.6a7.m...@lyapunov.ucsd.edu...

This doesn't answer your question but back when MMX was all the rage there
was a DLL called cpuinfo32.dll (a VC++ workspace available via Google)
issued by Intel for querying the cpu's capabilities. Perhaps Intel has a
postMMX update for Win32/64.

--
Ciao,
Gerry T.


Steve M

unread,
Mar 19, 2004, 8:04:27 AM3/19/04
to
So the obvious question becomes what happens if one compiles on the
appropriate species of Pentium 4 for what one wishes to target in an AMD
processor and then executes it on said AMD ? Does the code actually run
OK ? What AMD processors support what intel compiler flags at execution
time ? Is the expected performance boost relealised for SSE/2/3 on an
AMD ? Anyone know or is willing to make available some compiled code so
we can find out ?

Steve

replace noname with s_j_madden if you want to reply by e-mail

Steve Lionel

unread,
Mar 19, 2004, 10:13:46 AM3/19/04
to
On Sat, 20 Mar 2004 00:04:27 +1100, Steve M <non...@yahoo.com> wrote:

>So the obvious question becomes what happens if one compiles on the
>appropriate species of Pentium 4 for what one wishes to target in an AMD
>processor and then executes it on said AMD ? Does the code actually run
>OK ? What AMD processors support what intel compiler flags at execution
>time ? Is the expected performance boost relealised for SSE/2/3 on an
>AMD ? Anyone know or is willing to make available some compiled code so
>we can find out ?

The Intel compiler does not care what kind of processor you compile on. There
are some OPTIONAL switches (/Qx on Windows, -x on Linux) that tell the
compiler to generate code for particular classes of Intel processors. As long
as you don't use those, the code should run fine on non-Intel processors that
properly implement the Pentium instruction set.

You can also use the options for run-time CPU dispatching, /Qax and -ax.
These allow you to specify one or two classes of Intel CPUs to target code
for. At run-time, a check will be made and, if the proper Intel CPU is found,
the targetted code paths will be taken, otherwise a generic path will be
taken.

Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products

Dr Chaos

unread,
Mar 19, 2004, 2:35:45 PM3/19/04
to
On Sat, 20 Mar 2004 00:04:27 +1100, Steve M <non...@yahoo.com> wrote:
> So the obvious question becomes what happens if one compiles on the
> appropriate species of Pentium 4 for what one wishes to target in an AMD
> processor and then executes it on said AMD ? Does the code actually run
> OK ?

Yes, but it uses only "generic pentium" instructions i.e. no SSE
no SSE2 no SSE3.

> What AMD processors support what intel compiler flags at execution
> time ? Is the expected performance boost relealised for SSE/2/3 on an
> AMD ?

apparently the answer is now 'no'.

this may be a change from previous Intel versions. I don't know for
sure.

Gerry Thomas

unread,
Mar 22, 2004, 3:04:03 PM3/22/04
to

"Steve Lionel" <Steve....@intel.com> wrote in message
news:p63m50p6sd6ikba6d...@4ax.com...

> On Sat, 20 Mar 2004 00:04:27 +1100, Steve M <non...@yahoo.com> wrote:
>
> >So the obvious question becomes what happens if one compiles on the
> >appropriate species of Pentium 4 for what one wishes to target in an AMD
> >processor and then executes it on said AMD ? Does the code actually run
> >OK ? What AMD processors support what intel compiler flags at execution
> >time ? Is the expected performance boost relealised for SSE/2/3 on an
> >AMD ? Anyone know or is willing to make available some compiled code so
> >we can find out ?
>
> The Intel compiler does not care what kind of processor you compile on.
There
> are some OPTIONAL switches (/Qx on Windows, -x on Linux) that tell the
> compiler to generate code for particular classes of Intel processors. As
long
> as you don't use those, the code should run fine on non-Intel processors
that
> properly implement the Pentium instruction set.
>
> You can also use the options for run-time CPU dispatching, /Qax and -ax.
> These allow you to specify one or two classes of Intel CPUs to target
code
> for. At run-time, a check will be made and, if the proper Intel CPU is
found,
> the targetted code paths will be taken, otherwise a generic path will be
> taken.

It's worthwhile for IVF users to look at the VC++ Pro (the optimizing
compiler that comes with the full blown VS.NET 2003, not the minimal VC++
standard edition required by IVF) optimizations choices (blended, \G5-7)
for Intel and AMD 32/64 bit cpus. The cpuid sample that comes with VC++ Pro
interrogates without prejudice either the Genuine Intel or the Authentic
AMD cpu capabilities that it finds and the OS support for such.

--
Ciao,
Gerry T.
______
"Visual Fortran is part of the Microsoft family of Visual Tools." --
DIGITAL Visual Fortran, Getting Started, 1998.

0 new messages