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

What is difference betweeen x86 and x64 platform ?

sdj77
New Contributor I
2,305 Views

I use the Intel one API.

On VS, What is the difference between x86 platform and x64 platform ?

For instance, Significant figure of the smallest number is '1.110223024625157E-016' on the x86, x86 platform.

Why do i have the same value? 

On x64 platform,  shouldn't there be twice as many significant figures ?

 

program x_min
double precision xmin
xmin=1.0
do 10 i=1,1000
if(xmin+1.0.gt.1.0) then
xmin=xmin/2.0
else
go to 20
end if
10 continue
20 write(*,*) xmin
stop
end

 

 

0 Kudos
1 Solution
sdj77
New Contributor I
2,290 Views

What I understand is that floating point processing is the same regardless of whether it's a 32-bit platform or a 64-bit platform, but there's a difference in the size of the address space and the efficient processing method. Is it correct?

View solution in original post

0 Kudos
18 Replies
Steve_Lionel
Honored Contributor III
2,298 Views

The major difference is that x64 has 64-bit addresses, allowing for a much larger address space. It does not change the sizes of numeric types. x64 has additional instructions and a more efficient argument passing convention. It would be unusual for programs to get different results.

sdj77
New Contributor I
1,992 Views

Is what you're talking about related to the visual studio x86 or x64 platform, not the Windows OS? 

I have some knowledge about Windows operating systems 32 bits and 64 bits. What I want to know is the difference between visual studio x86 platform and x64 platform, not Windows operating system.

I still didn't  understand your explaination.  I would appreciate it if you could explain it with a simple example.

0 Kudos
mecej4
Honored Contributor III
2,296 Views

You are confusing different issues here. The abbreviations "x86" and "x64" stand for CPU architectures/modes in which integer registers and addresses are 32 bits and 64 bits, respectively.

Whether you have a 32-bit or a 64-bit CPU, it is capable of processing floating point numbers that are 32 or 64 (or even 80, in x87 mode) bits long.

Even the 8087, which was a coprocessor for the 16-bit processor 8086 four decades ago, was capable of operating on 64-bit reals.

Your phrase "significant figure of the smallest number" is confusing, since the smallest floating point number in IEEE-64 bit representation is about 10-308 

 

sdj77
New Contributor I
2,291 Views

What I understand is that floating point processing is the same regardless of whether it's a 32-bit platform or a 64-bit platform, but there's a difference in the size of the address space and the efficient processing method. Is it correct?

0 Kudos
JohnNichols
Valued Contributor III
2,281 Views

Modern computers are based on the von Neumann architecture model developed around the end of WW2.  In memory, the size of the space that can be addressed is related "approximately" due to the invariable losses for system elements, to the the length of the address number for a simplification.  A 32 bit number can address a certain space, a 64 bit number can address a larger space.  

If I have a finite element model then my model is dependent on how many  nodes and say beams I can create.  In a large model often the nodes and the beams are in a close ratio.  Ask Euler, he could explain it.  

So if I want to model a large church in England then I want a 64 bit model.  In FEM models we are always playing catchup, the model we want will not fit into memory.  

But it is also dependent on the quality of the modelling, the saving of space in creating the model, so one uses programs such as Pardiso to stretch the available space.  

Of course the problem with FEM models using bricks etc is their stiffness matrix is so large they are lousy at finding eigenvalues compared to a simpler beam model.  

 

As an experimental engineer, any model that does not predict reality well, is not really useful.  I play with this data all the time and I model all the time.  

 

sdj77
New Contributor I
2,217 Views

program x_min
xmin=1.0
do 10 i=1,1000
if(xmin+1.0.gt.1.0) then
xmin=xmin/2.0
else
go to 20
end if
10 continue
20 write(*,*) xmin
stop
end


This code is for obtaining Machine Epsilon.

On x86 platform of visual studio, the code result is "5.9604645E-08".

Next, on x64 platform, i expected '1.110223024625157E-016'.

But the result is same x86 platform result(5.9604645E-08).

In the case of the same code, shouldn't the results of the x86, x64 platforms be different?

I want to know the difference from x86 and x64 platform. 

 

 

0 Kudos
andrew_4619
Honored Contributor II
2,197 Views

FYI Fortran has an EPSILON intrinsic which would simplify your code:

program test_epsilon
    real :: x = 3.143
    real(8) :: y = 2.33
    print *, EPSILON(x)
    print *, EPSILON(y)
end program test_epsilon

 

0 Kudos
mecej4
Honored Contributor III
2,132 Views

EPSILON is an inquiry function; its return value depends only on the type of the argument, not the value of the argument. Therefore, x and y need not even be defined before being used as arguments to EPSILON.

There are four meaningful ways of defining machine epsilon. The OP's program implicitly uses a definition that is not the same as the one used for the intrinsic function, and the values reported by the program are half the values returned by the intrinsic function.

 

  • The smallest positive machine number ϵ such that 1 + ϵ > 1
  • The largest positive machine number ϵ such that 1 + ϵ = 1
  • The smallest positive machine number ϵ such that 1 - ϵ < 1
  • The largest positive machine number ϵ such that 1 - ϵ = 1

 Compare the results from the OP's program with the data from the last two columns of the Wikipedia article.

The description given in the Fortran 2018 standard, "Model number that is small compared to 1" is rather ambiguous. That definition would be satisfied by any number smaller than EPSILON(x), such as 1E-20 for REAL. The Gfortran documentation is more precise:

     " EPSILON(x) returns the smallest number E of the same kind as X such that 1 + E > 1"

0 Kudos
Steve_Lionel
Honored Contributor III
2,168 Views

No, they should not be different. You seem to be assuming that default real on x64 is 64-bit - that is not the case. There is no difference in default kinds between 32-bit and 64-bit platforms for the Intel compiler (nor most others I am familiar with.)

0 Kudos
sdj77
New Contributor I
2,069 Views

Exactly, what is the differences between x86 platform and x64 platform ? 

0 Kudos
Steve_Lionel
Honored Contributor III
2,058 Views
0 Kudos
jimdempseyatthecove
Honored Contributor III
2,112 Views

Please note, the returned epsilon is relative to 1.0. When used, say in a convergence routine, the returned epsilon has to be scaled to the order of the numbers involved in the convergence (typically to max of the absolute values of the participant variables).

 

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
2,096 Views

Then the SPACING intrinsic function may be of use.

0 Kudos
JohnNichols
Valued Contributor III
2,078 Views

In the old days, when I used MS Fortran, now Intel Fortran, on a machine I am not supposed to name, it looked like a sewing machine packed up and was heavy as one, I could start a compile and then make a cup of tea return and I had one library file.  

If you are going to use epsilon as a convergence criterion, you start and then you can drive to Houston - 2 hours, wait for the plane, 2 hours, fly to Australia - 32 hours provided you do not take the Russian route, drive to Newcastle, 3 hours, have dinner and a two week holiday and return, make a cup of tea and sit down and look at a screen that says analyzing, please wait. 

Or you could put in a limit that says stop after X loops.   My program, to find non-linear beam results, can run for days if you let it.  

 

I was banned from the mainframe at Newcastle University because of a Fortran program that grabbed everything and ran for 5 hours overnight before they found out.  They were really upset according to the dean who chewed me out and said stay away. An Intel NUC i3 can do the analysis in about 2 hours now.  

0 Kudos
Steve_Lionel
Honored Contributor III
1,968 Views

It's very simple. You can choose to build an application that executes in the 32-bit (x86) environment ("Windows on Windows" as Microsoft calls it), or the 64-bit (x64) environment. The only visible differences in a Fortran program should be the size of address-sized integers and the ability to dynamically allocate more than 2GB of memory. 32-bit build capability will be disappearing in the future - there's very few reasons you would choose to use that. Most Fortran programs can't tell the difference. I'd expect an x64 build to perform slightly better but will use more memory because addresses are twice the size.

0 Kudos
Neels
New Contributor II
1,937 Views

Will an executable built for x64 run on Windows 32-bit operating system?

There are still a large number of Windows 32-bit machines running across the world, some even using Windows XP, because of compatibility issues with production floor machine interfaces. It is very worrying if the x64 will not run on these machines and x86 will be discontinued.

 

 

0 Kudos
Arjen_Markus
Honored Contributor I
1,876 Views

No, a 64-bits executable will not run on a 32-bits platform. The reverse: 32-bits executables do run on 64-bits platforms, if there is support for it. Windows has a subsystem for this and on Linux you may need to add the support explicitly.

0 Kudos
Steve_Lionel
Honored Contributor III
1,817 Views

If (when) at some point in the future Intel stops supporting building for 32-bit environments, you will still be able to use an older compiler. This has happened before when Intel stopped supporting Itanium. It also happened several years ago on Linux. Note that if you are building for XP, there are some additional compatibility steps you must take in Visual Studio (not Fortran related.) You'll also want to hold on to an older Visual Studio, as I expect 32-bit support to be dropped there as well.

0 Kudos
Reply