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

CVF migrates to Intel Fortran

truelies
Beginner
2,102 Views
I read following: http://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/

I suppose those options are under Project->property, but I can't find "Floating Point > Source" and " and "Code Generation > Enable Enhanced Instruction Set > No enhanced instruction sets". Where are those options?


In CVF, floating point arithmetic was always done using the "X87" instructions, which could lead to inconsistent values of expressions depending on optimizer choices. As of version 11, Intel Fortran uses the SSE2 instructions by default, which is faster and more consistent, but may give different results for some computations. If you see this issue, try setting the option /fp:source (Fortran > Floating Point > Floating Point > Source). If that does not resolve the issue, specify that the X87 instructions are to be used by specifying /arch:ia32 (Fortran > Code Generation > Enable Enhanced Instruction Set > No enhanced instruction sets)
0 Kudos
13 Replies
Steven_L_Intel1
Employee
2,102 Views

The link you posted was for the full forum - do you remember which specific thread asked this question? Or are you quoting entirely from another post and you have a new question of your own?
0 Kudos
truelies
Beginner
2,102 Views

The link you posted was for the full forum - do you remember which specific thread asked this question? Or are you quoting entirely from another post and you have a new question of your own?

Here is the article title:

Migrating from Compaq* Visual Fortran

Submit New Article
Last Modified On : June 24, 2009 12:20 PM PDT
0 Kudos
peterklaver
Beginner
2,102 Views
Quoting - truelies
I read following: http://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/

I suppose those options are under Project->property, but I can't find "Floating Point > Source" and " and "Code Generation > Enable Enhanced Instruction Set > No enhanced instruction sets". Where are those options?


In CVF, floating point arithmetic was always done using the "X87" instructions, which could lead to inconsistent values of expressions depending on optimizer choices. As of version 11, Intel Fortran uses the SSE2 instructions by default, which is faster and more consistent, but may give different results for some computations. If you see this issue, try setting the option /fp:source (Fortran > Floating Point > Floating Point > Source). If that does not resolve the issue, specify that the X87 instructions are to be used by specifying /arch:ia32 (Fortran > Code Generation > Enable Enhanced Instruction Set > No enhanced instruction sets)

You are correct to be looking in Project -> Properties. In that window there is a tree. Expand "Fortran" line and you will see "Code Generation"; select that and you will see another list in the right part of the window, where you can set "Enable Enhanced Instruction Set" (among other options). At the same tree level as "Code Generation" you will also find "Floating Point"; select that and you will see "Floating Point Model" to the right, where you can set /fp:source.

If all else fails you can also add these commands directly to the command line. Hope that helps.
0 Kudos
TimP
Honored Contributor III
2,102 Views
Quoting - truelies

I suppose those options are under Project->property, but I can't find "Floating Point > Source" and " and "Code Generation > Enable Enhanced Instruction Set > No enhanced instruction sets". Where are those options?

As you say, under project> ....properties>Fortran>code generation you would have available "enable enhanced instruction set" and "intel processor-specific optimization," and under Fortran>floating point you would have "floating point model" including "source" option, once you have Fortran integrated into VS and initialize a project.
0 Kudos
truelies
Beginner
2,102 Views
Quoting - peterklaver

You are correct to be looking in Project -> Properties. In that window there is a tree. Expand "Fortran" line and you will see "Code Generation"; select that and you will see another list in the right part of the window, where you can set "Enable Enhanced Instruction Set" (among other options). At the same tree level as "Code Generation" you will also find "Floating Point"; select that and you will see "Floating Point Model" to the right, where you can set /fp:source.

If all else fails you can also add these commands directly to the command line. Hope that helps.

I checked there don't have "Floating Point" or "Floating Point Model" at that place. Then I added it to "additional options", still got defference between Intel Fortran and CVF. You can see the picutres.
0 Kudos
Steven_L_Intel1
Employee
2,102 Views

That's because you're using version 10.1. That article is written assuming version 11.1, the current version.
0 Kudos
truelies
Beginner
2,102 Views

That's because you're using version 10.1. That article is written assuming version 11.1, the current version.

OK. Intel Fortran doesn't include the lifetime update to the price, this is not good.

I added it to "additional options", still got defference between Intel Fortran and CVF. Looks version 11.1 didn't make the results same as CVF?
0 Kudos
Steven_L_Intel1
Employee
2,102 Views

CVF didn't have lifetime free updates either.

Do you have a sample program I can look at?
0 Kudos
truelies
Beginner
2,102 Views

CVF didn't have lifetime free updates either.

Do you have a sample program I can look at?

I think CVF gave us free download on update.
The code is big, does add "Floating Point" or "Floating Point Model" at "additional options" in 10.1 same as the one in 11.1? Thanks!
0 Kudos
Steven_L_Intel1
Employee
2,102 Views

CVF had some free updates, and some you had to pay for. Intel Fortran offers a year of updates with purchase, and you can extend that for another year at a discounted price. 10.1 is two releases back.

10.1 did not have the Floating Point Model as a property in Visual Studio. You can go to the Command Line property page and add /fp:source under Additional Options.
0 Kudos
truelies
Beginner
2,102 Views

CVF had some free updates, and some you had to pay for. Intel Fortran offers a year of updates with purchase, and you can extend that for another year at a discounted price. 10.1 is two releases back.

10.1 did not have the Floating Point Model as a property in Visual Studio. You can go to the Command Line property page and add /fp:source under Additional Options.


I tried /fp:source. Still can't get same results as CVF. I am the first one to ask the support for this issue several years ago, cause we have a lot of old codes. It's not comfortable to see difference between two Fortrans.

Hope Intel Fortran can sell lifetime update, cause our company needs nearly a month to buy an IT item, and company also think this Fortran is very expensive since pay each year.
0 Kudos
Steven_L_Intel1
Employee
2,102 Views

I think it is unrealistic to expect the same results as any other compiler. Because of the way binary floating point works, any variation in instruction choice or ordering, or differing implementations of math library routines, can cause small differences. Depending on the algorithm, these can build.

We do not offer lifetime updates - I don't know of any commercial compiler vendor that does. How much is your time and effort worth?

You are welcome to download and install a free 30-day trial of the current version to see if you get any different results. But again I think it is not realistic to expect the same results. How different are they and can you identify the calculation where results start to diverge?
0 Kudos
TimP
Honored Contributor III
2,102 Views
Quoting - truelies


I tried /fp:source. Still can't get same results as CVF. I am the first one to ask the support for this issue several years ago,
As CVF hasn't changed, you would require /fltconsistency for CVF, as well as /fp:source for ifort.
Then, you may require /arch:ia32, at least while determining any differences due to double precision evaluation of single precision expressions.
0 Kudos
Reply