[chrono] Intel Composer XE 2011 unable to compile chrono library

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[chrono] Intel Composer XE 2011 unable to compile chrono library

Edward Rankin
Hi,

The purpose of this email is to get some insight on the problem we faced when trying to compile chrono from the 1.47 Beta 1 package. I have tried both the latest released compiler (2011 Update 4) and the current SP1 beta. There is no issue with VS 2010 SP1's compiler.

It was first surfaced here: http://comments.gmane.org/gmane.comp.lib.boost.user/68421. The error received can be seen below:
< snip >
chrono.cpp
.\boost/chrono/duration.hpp(94): error: expected an expression
                  &&  (boost::is_convertible<Rep2,
                  ^

.\boost/chrono/duration.hpp(124): error: expected an expression
                  &&  (boost::is_convertible<Rep,
                  ^
< snip >

After some discussion with Vicente and some testing by me, it turns out that Intel was not happy with the first operand of the && operator in the following snippet of code:

template <class Duration, class Rep2,
        bool = (
                    (boost::is_convertible<typename Duration::rep,
                        typename common_type<typename Duration::rep, Rep2>::type>::value)
                &&  (boost::is_convertible<Rep2,
                        typename common_type<typename Duration::rep, Rep2>::type>::value)
                )
        >
    struct duration_divide_imp
    {
    };

If we place an additional parenthesis around that first operand like this:

template <class Duration, class Rep2,
        bool = (
                    ( (boost::is_convertible<typename Duration::rep,
                        typename common_type<typename Duration::rep, Rep2>::type>::value) )
                &&  (boost::is_convertible<Rep2,
                        typename common_type<typename Duration::rep, Rep2>::type>::value)
                )
        >
    struct duration_divide_imp
    {
    };

It will happily compile. It is rather bizarre that this is necessary, which leads Vicente and I to believe that there is a bug in the Intel Compiler. What do you guys think? I have also posted to the Intel forums, the thread can be seen here: http://software.intel.com/en-us/forums/showthread.php?t=84061

Regards,

Edward

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [chrono] Intel Composer XE 2011 unable to compilechrono library

John Maddock-3
> It will happily compile. It is rather bizarre that this is necessary,
> which
> leads Vicente and I to believe that there is a bug in the Intel Compiler.
> What do you guys think? I have also posted to the Intel forums, the thread
> can be seen here:
> http://software.intel.com/en-us/forums/showthread.php?t=84061

Looks like a bug to me - if you have a reduced test case I file a bug report
with Intel,

HTH, John.

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [chrono] Intel Composer XE 2011 unable to compilechrono library

Bo Jensen-2
On Wed, Jul 6, 2011 at 9:39 AM, John Maddock <[hidden email]> wrote:

>> It will happily compile. It is rather bizarre that this is necessary,
>> which
>> leads Vicente and I to believe that there is a bug in the Intel Compiler.
>> What do you guys think? I have also posted to the Intel forums, the thread
>> can be seen here:
>> http://software.intel.com/en-us/forums/showthread.php?t=84061
>
> Looks like a bug to me - if you have a reduced test case I file a bug report
> with Intel,
>
> HTH, John.
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

I was the original bug reporter. My apologies for not getting back on
the suggestions made, I was busy and forgot about it.  Thanks for the
effort, much appreciated, will use suggested patch.

/Bo
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [chrono] Intel Composer XE 2011 unable to compile chrono library

Vicente Botet
In reply to this post by Edward Rankin
Edward Rankin wrote
Hi,

The purpose of this email is to get some insight on the problem we faced
when trying to compile chrono from the 1.47 Beta 1 package. I have tried
both the latest released compiler (2011 Update 4) and the current SP1 beta.
There is no issue with VS 2010 SP1's compiler.

It was first surfaced here:
http://comments.gmane.org/gmane.comp.lib.boost.user/68421. The error
received can be seen below:
< snip >
chrono.cpp
.\boost/chrono/duration.hpp(94): error: expected an expression
                  &&  (boost::is_convertible<Rep2,
                  ^

.\boost/chrono/duration.hpp(124): error: expected an expression
                  &&  (boost::is_convertible<Rep,
                  ^
< snip >

After some discussion with Vicente and some testing by me, it turns out that
Intel was not happy with the first operand of the && operator in the
following snippet of code:

template <class Duration, class Rep2,
        bool = (
                    (boost::is_convertible<typename Duration::rep,
                        typename common_type<typename Duration::rep,
Rep2>::type>::value)
                &&  (boost::is_convertible<Rep2,
                        typename common_type<typename Duration::rep,
Rep2>::type>::value)
                )
        >
    struct duration_divide_imp
    {
    };

If we place an additional parenthesis around that first operand like this:

template <class Duration, class Rep2,
        bool = (
                    ( (boost::is_convertible<typename Duration::rep,
                        typename common_type<typename Duration::rep,
Rep2>::type>::value) )
                &&  (boost::is_convertible<Rep2,
                        typename common_type<typename Duration::rep,
Rep2>::type>::value)
                )
        >
    struct duration_divide_imp
    {
    };

It will happily compile. It is rather bizarre that this is necessary, which
leads Vicente and I to believe that there is a bug in the Intel Compiler.
What do you guys think? I have also posted to the Intel forums, the thread
can be seen here:
http://software.intel.com/en-us/forums/showthread.php?t=84061

Regards,

Edward
Hi Edward,

I committed the change on the trunk. Please, let me know if there is some issue as the I'm not able to check with Intel compilers, and the regression test don't have a win Intel compiler.

Thanks,
Vicente
Reply | Threaded
Open this post in threaded view
|

Re: [chrono] Intel Composer XE 2011 unable to compile chrono library

Edward Rankin
In reply to this post by Edward Rankin
Hi,


2011/7/7 <[hidden email]>
---------- Forwarded message ----------
From: Vicente Botet <[hidden email]>
To: [hidden email]
Date: Wed, 6 Jul 2011 15:46:31 -0700 (PDT)
Subject: Re: [Boost-users] [chrono] Intel Composer XE 2011 unable to compile chrono library

Edward Rankin wrote:
>
> Hi,
>
> The purpose of this email is to get some insight on the problem we faced
> when trying to compile chrono from the 1.47 Beta 1 package. I have tried
> both the latest released compiler (2011 Update 4) and the current SP1
> beta.
> There is no issue with VS 2010 SP1's compiler.
>
> It was first surfaced here:
> http://comments.gmane.org/gmane.comp.lib.boost.user/68421. The error
> received can be seen below:
> < snip >
> chrono.cpp
> .\boost/chrono/duration.hpp(94): error: expected an expression
>                   &&  (boost::is_convertible&lt;Rep2,
>                   ^
>
> .\boost/chrono/duration.hpp(124): error: expected an expression
>                   &amp;&amp;  (boost::is_convertible&lt;Rep,
>                   ^
> &lt; snip &gt;
>
> After some discussion with Vicente and some testing by me, it turns out
> that
> Intel was not happy with the first operand of the && operator in the
> following snippet of code:
>
> template &lt;class Duration, class Rep2,
>         bool = (
>                     (boost::is_convertible&lt;typename Duration::rep,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::type>::value)
>                 &&  (boost::is_convertible&lt;Rep2,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::type>::value)
>                 )
>         >
>     struct duration_divide_imp
>     {
>     };
>
> If we place an additional parenthesis around that first operand like this:
>
> template &lt;class Duration, class Rep2,
>         bool = (
>                     ( (boost::is_convertible&lt;typename Duration::rep,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::type>::value) )
>                 &&  (boost::is_convertible&lt;Rep2,
>                         typename common_type&lt;typename Duration::rep,
> Rep2&gt;::type>::value)
>                 )
>         >
>     struct duration_divide_imp
>     {
>     };
>
> It will happily compile. It is rather bizarre that this is necessary,
> which
> leads Vicente and I to believe that there is a bug in the Intel Compiler.
> What do you guys think? I have also posted to the Intel forums, the thread
> can be seen here:
> http://software.intel.com/en-us/forums/showthread.php?t=84061
>
> Regards,
>
> Edward
>
>

Hi Edward,

I committed the change on the trunk. Please, let me know if there is some
issue as the I'm not able to check with Intel compilers, and the regression
test don't have a win Intel compiler.

Thanks,
Vicente


I have checked the release candidate and it compiles okay. Thanks.

Edward


_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users