- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a couple of questions on the usage of the math library in windows (64bit, vs2010).
In the documentation of the intel c++ compiler (12.1), in the article "Using Intel Math Library" a simple program appropriate for windows is presented and then the user is instructed to add the compilation flags /Qlong-double /Qpc80 . After adding them in the Additional Compile Options of project properties (there is no visual entry for this), I got a warning that the options are not recognized and therefore ignored . What am I doing wrong ?
Also, tried to go through the mathimf.h file and so some ppc macro __INTEL_COMPILER (or something very similar). Where is this defined ? Should I define it ? Also there seems to be __ICL etc. where can one obtain a list of the meaning of these macros ? Unfortunately the documentation shipped with the product (Parallel Studio 2011) leaves some to be desired..
Thank you in advance for your help,
Petros
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI Melanie,
Thank you for the suggestion. No, it did not pass :
1>MessageBuildingWithCompiler:
1> Building with Intel(R) C++ Compiler 12.1
1>ClCompile:
1> ***** ClCompile (Win32 - Intel C++)
1>icl : warning #10148: option '/Qlong_double' not supported
1>icl : warning #10148: option '/Qpc80' not supported
1> main.cpp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Addition : Melanie's testimony could serve as proof beyond doubt that, the availability of 80 bit long doubles on windows has nothing to do with the ms rt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>Here is an example: Say I want to calculate the curtosis of a statistical sample , of a vector of size say 1,000,000 elements -curtosis because it involves powers of the element up to fourth. Then I choose to tun this accross threads for efficiency. The (partial)sums of the elements can be declared as long doubles and in the end of the day, when diided by the -long double'd- size of 1,000,000 be casted down to the familiar old friend the ms double, saving the user the headache of worrying about over/underflow and compromise of precision.>>>
This is obvious that we have a different projects and different needs.As I told you earlier for my project I would choose a 2D double precision or 4D single precision vector of scalar values instead of increased precision of the single scalar result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>I think the documentation is simply wrong - there is no other windows run time for intel to offer the etension to- and misleading.>.>>
Sorry I can not understand what do you mean by writing this sentence.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>Addition : Melanie's testimony could serve as proof beyond doubt that, the availability of 80 bit long doubles on windows has nothing to do with the ms rt.>>>
Intel compiler supports long double type,but when Intel compiler calls Micrososft implementation of printf() which in turn does not support long double.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Iliyapolak,
Understood that different people have different projects/needs. So, the question is very simple:
does the compiler support an 80bit long double as the documentation states?
The answer to this, as is becoming increasingly clear, is negative.
Noone cares about the silly printf, noone ever intended to call it - except from the very unfortunate test in
the documentation- I mean, who really wants to show a new feature by focussing on what it cannot do ;-))
Please, let's not keep revisiting what we have already covered.
Thank you for your help,
P-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At this point, I think I should put the whole thing to rest. We have been trying to get to a legit answer since last Saturday, almost a week.
If there is some kind of a workaround I would like to know, but do not wish to "debate" no matter how well- intended - and I trully belive the are -
people are.
The good news is that in a next release - as Melanie said- the issue is solved and I will have to wait until the next release and I meet in the same environment ;-))
Thank you very much everyone for your kind efforts to help,
P-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At this point, I think I should put the whole thing to rest. We have been trying to get to a legit answer since last Saturday, almost a week.
If there is some kind of a workaround I would like to know, but do not wish to "debate" no matter how well- intended - and I trully belive the are -
people are.
The good news is that in a next release - as Melanie said- the issue is solved and I will have to wait until the next release and I meet in the same environment ;-))
Thank you very much everyone for your kind efforts to help,
P-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey,
Melanie, mainly provided with a suggestion of an alternative flag.( no misunderstandings: I did try her test.c )
Also, not all the 1,000,000 elements are long double. Only their (partial) sums !!
Best Regards,
P-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>Noone cares about the silly printf, noone ever intended to call it - except from the very unfortunate test in
the documentation- I mean, who really wants to show a new feature by focussing on what it cannot do ;-))>>>
I know that nobody including me cares about printf,but in the end while working on Win platform you are dependent on Windows chain of execution components.Function printf was brought as a example because it was part of your code. Hope it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey Kostrov wrote:
Petros, as I promised a different test-case will be provided. I finally found article 'Using Intel Math Library' you've mentioned. Also,
>>...not all the 1,000,000 elements are long double. Only their (partial) sums !!..
this is a very important note and I'll try to simulate if a processing with mixed floating-point data types, for example float and double, improves accuracy of results.
Such a test case could be very interesting.Mainly for precission and accuracy of the accumulated sum.Sadly all this process at runtime is performed by the CPU microcode and hardware and it is opaque to the programmer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The most interesting thing about the test case is that it prints pass when using the Intel compiler with /Qlong-double and fail otherwise.
You don't need to wait for the next release, the current download of the Intel c++ compiler for windows supports /Qlong-double
I found a version of the 12.1 compiler to test on Windows with vs2010. I tested both ia32 and intel64, and the test passes in either case. Since you have 12.1 also, it's still a puzzle as to why the option isn't recognized. Your compiler doesn't appear to print the same versionn string, I'll check if this is a version specific thing... I usually use the compiler from the command line (cmd.exe). You can use iclvars.bat which is in the compiler installation directory to set up your path.
>icl /Qlong-double test.cIntel(R) C++ Compiler XE for applications running on IA-32, Version 12.1.5.344 Build 20120612Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
test.cMicrosoft (R) Incremental Linker Version 10.00.40219.01Copyright (C) Microsoft Corporation. All rights reserved.
-out:test.exetest.obj
>.\test.exe
TEST PASSED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>Size of [ long double ] is: 16>>>
So the size for long double is 16 bytes.Exactly as you pointed out in one of your posts.It is interesting what is memory layout of such a value.I suppose that the value(binary number)is padded with 6 bytes of 0's for alignment.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page