boost float128 and Intel's _Quad with Tux Eigen

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

boost float128 and Intel's _Quad with Tux Eigen

Boost - Users mailing list
Hi,
I have written a short program utilising boost::float128 together with tux Eigen which successfully compiles and runs using g++, however it fails when I use icc.
The compiler error is 

/home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727): error: no suitable constructor exists to convert from "const _Quad" to "boost::multiprecision::number<boost::multiprecision::backends::float128_backend, boost::multiprecision::et_off>"
     static number_type (min)() BOOST_NOEXCEPT { return BOOST_MP_QUAD_MIN; }
                                                        ^
How can I resolve this?

My example code is;
#include <iostream>
#include <cmath>
#include <Eigen/Dense>
#include <Eigen/Eigenvalues>
#include <iomanip>
#include <boost/cstdfloat.hpp>
#include <boost/multiprecision/float128.hpp>
#include <boost/math/special_functions.hpp>
#include <boost/math/constants/constants.hpp>
#include <quadmath.h>
#define BOOST_MP_USE_QUAD

using namespace Eigen;
using namespace std;

int main(){
  typedef Matrix<complex<boost::multiprecision::float128>, Dynamic, Dynamic> MatrixXcmp;
  MatrixXcmp C = MatrixXcmp::Random(8,8);
  cout<<setprecision(128)<<C<<endl<<endl;
  ComplexEigenSolver<MatrixXcmp> ces;
  ces.compute(C);
  return 0;
}

It only fails compilation when I put in the line 'ces.compute(C);'.

I compile with 
icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2 -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential -lmkl_core -lpthread -lm -ldl -lquadmath 

Many thanks in advance,

Alex

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

Re: boost float128 and Intel's _Quad with Tux Eigen

Boost - Users mailing list

On 03/02/2020 21:33, Alex.Durie via Boost-users wrote:

> Hi,
> I have written a short program utilising boost::float128 together with
> tux Eigen which successfully compiles and runs using g++, however it
> fails when I use icc.
> The compiler error is
>
> /home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727):
> error: no suitable constructor exists to convert from "const _Quad" to
> "boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
> boost::multiprecision::et_off>"
>      static number_type (min)() BOOST_NOEXCEPT { return
> BOOST_MP_QUAD_MIN; }
>                                                         ^
> How can I resolve this?

I fear due to a lack of consistent testing support for the Intel
compiler, we may well have dropped the ball and broken support for
Intel's _Quad type.


The good news is that Intel on Linux does support GCC's __float128 type,
so my suggestion would be to:


* Remove the #define BOOST_MP_USE_QUAD

* Build with -std=gnu++14 rather than -std=c++14

* Remove the -Qoption,cpp,--extended_float_type option.


HTH, John.


>
> My example code is;
> #include <iostream>
> #include <cmath>
> #include <Eigen/Dense>
> #include <Eigen/Eigenvalues>
> #include <iomanip>
> #include <boost/cstdfloat.hpp>
> #include <boost/multiprecision/float128.hpp>
> #include <boost/math/special_functions.hpp>
> #include <boost/math/constants/constants.hpp>
> #include <quadmath.h>
> #define BOOST_MP_USE_QUAD
>
> using namespace Eigen;
> using namespace std;
>
> int main(){
>   typedef Matrix<complex<boost::multiprecision::float128>, Dynamic,
> Dynamic> MatrixXcmp;
>   MatrixXcmp C = MatrixXcmp::Random(8,8);
> cout<<setprecision(128)<<C<<endl<<endl;
>   ComplexEigenSolver<MatrixXcmp> ces;
>   ces.compute(C);
>   return 0;
> }
>
> It only fails compilation when I put in the line 'ces.compute(C);'.
>
> I compile with
> icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2
> -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential
> -lmkl_core -lpthread -lm -ldl -lquadmath
>
> Many thanks in advance,
>
> Alex
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost float128 and Intel's _Quad with Tux Eigen

Boost - Users mailing list
In reply to this post by Boost - Users mailing list
Thanks John,

>The good news is that Intel on Linux does support GCC's __float128 type,
>so my suggestion would be to:
>* Remove the #define BOOST_MP_USE_QUAD
>* Build with -std=gnu++14 rather than -std=c++14
>* Remove the -Qoption,cpp,--extended_float_type option.

Unfortunately that didn't work, I get the new compiler error;

/home/alex/boost/boost_1_71_0/boost/multiprecision/detail/number_base.hpp(216): error: static assertion failed with "is_integral<T>::value || is_enum<T>::value || std::numeric_limits<T>::is_specialized"
BOOST_STATIC_ASSERT(is_integral<T>::value || is_enum<T>::value || std::numeric_limits<T>::is_specialized);

Are you able to help?

Many thanks,

Alex


From: Boost-users <[hidden email]> on behalf of [hidden email] <[hidden email]>
Sent: 04 February 2020 10:56
To: [hidden email] <[hidden email]>
Subject: Boost-users Digest, Vol 5318, Issue 1
 
CAUTION: This mail comes from outside the University. Please consider this before opening attachments, clicking links, or acting on the content.

Send Boost-users mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.boost.org/mailman/listinfo.cgi/boost-users
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Boost-users digest..."


Today's Topics:

   1. boost float128 and Intel's _Quad with Tux Eigen (Alex.Durie)
   2. [boost build] - How to create symbols (.pdb) files on windows
      using VS2017 Community Edition? (Eko palypse)
   3. Re: [boost build] - How to create symbols (.pdb) files on
      windows using VS2017 Community Edition? (Mateusz Loskot)
   4. Re: [boost build] - How to create symbols (.pdb) files on
      windows using VS2017 Community Edition? (Eko palypse)
   5. Re: boost float128 and Intel's _Quad with Tux Eigen (John Maddock)


----------------------------------------------------------------------

Message: 1
Date: Mon, 3 Feb 2020 21:33:13 +0000
From: Alex.Durie <[hidden email]>
To: "[hidden email]" <[hidden email]>
Subject: [Boost-users] boost float128 and Intel's _Quad with Tux Eigen
Message-ID:
        <[hidden email]>

Content-Type: text/plain; charset="iso-8859-1"

Hi,
I have written a short program utilising boost::float128 together with tux Eigen which successfully compiles and runs using g++, however it fails when I use icc.
The compiler error is

/home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727): error: no suitable constructor exists to convert from "const _Quad" to "boost::multiprecision::number<boost::multiprecision::backends::float128_backend, boost::multiprecision::et_off>"
     static number_type (min)() BOOST_NOEXCEPT { return BOOST_MP_QUAD_MIN; }
                                                        ^
How can I resolve this?

My example code is;
#include <iostream>
#include <cmath>
#include <Eigen/Dense>
#include <Eigen/Eigenvalues>
#include <iomanip>
#include <boost/cstdfloat.hpp>
#include <boost/multiprecision/float128.hpp>
#include <boost/math/special_functions.hpp>
#include <boost/math/constants/constants.hpp>
#include <quadmath.h>
#define BOOST_MP_USE_QUAD

using namespace Eigen;
using namespace std;

int main(){
  typedef Matrix<complex<boost::multiprecision::float128>, Dynamic, Dynamic> MatrixXcmp;
  MatrixXcmp C = MatrixXcmp::Random(8,8);
  cout<<setprecision(128)<<C<<endl<<endl;
  ComplexEigenSolver<MatrixXcmp> ces;
  ces.compute(C);
  return 0;
}

It only fails compilation when I put in the line 'ces.compute(C);'.

I compile with
icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2 -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential -lmkl_core -lpthread -lm -ldl -lquadmath

Many thanks in advance,

Alex
-------------- next part --------------
HTML attachment scrubbed and removed

------------------------------

Message: 2
Date: Mon, 3 Feb 2020 23:23:31 +0100
From: Eko palypse <[hidden email]>
To: [hidden email]
Subject: [Boost-users] [boost build] - How to create symbols (.pdb)
        files on windows using VS2017 Community Edition?
Message-ID:
        <CAD8XV+3=PM0yvD5W+RP+dGDubUB9gJcsvS+[hidden email]>
Content-Type: text/plain; charset="utf-8"

How can I build pdb files using b2 tool?
If I run b2 -a --with-regex toolset=msvc-14.1 debug-symbols=on
address-model=64 architecture=ia64 variant=debug
it creates the needed lib but no pdb files are created.

Thank you
Eren
-------------- next part --------------
HTML attachment scrubbed and removed

------------------------------

Message: 3
Date: Tue, 4 Feb 2020 00:06:43 +0100
From: Mateusz Loskot <[hidden email]>
To: [hidden email]
Subject: Re: [Boost-users] [boost build] - How to create symbols
        (.pdb) files on windows using VS2017 Community Edition?
Message-ID:
        <CABUeae_nDj4CaC0+[hidden email]>
Content-Type: text/plain; charset="UTF-8"

On Mon, 3 Feb 2020 at 23:23, Eko palypse via Boost-users
<[hidden email]> wrote:
>
> How can I build pdb files using b2 tool?
> If I run b2 -a --with-regex toolset=msvc-14.1 debug-symbols=on address-model=64 architecture=ia64 variant=debug
> it creates the needed lib but no pdb files are created.

Additionally to
debug-symbols=on
add
debug-store=database

You should find PDBs in sub-folder(s) called debug-store-database.

You may find some additional useful info here
https://github.com/boostorg/build/issues/492

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net


------------------------------

Message: 4
Date: Tue, 4 Feb 2020 00:28:37 +0100
From: Eko palypse <[hidden email]>
To: [hidden email]
Subject: Re: [Boost-users] [boost build] - How to create symbols
        (.pdb) files on windows using VS2017 Community Edition?
Message-ID:
        <CAD8XV+[hidden email]>
Content-Type: text/plain; charset="utf-8"

Thank you very much Mateusz,
works like a charm.

Thank you
Eren
-------------- next part --------------
HTML attachment scrubbed and removed

------------------------------

Message: 5
Date: Tue, 4 Feb 2020 10:56:54 +0000
From: John Maddock <[hidden email]>
To: "Alex.Durie via Boost-users" <[hidden email]>
Subject: Re: [Boost-users] boost float128 and Intel's _Quad with Tux
        Eigen
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=windows-1252; format=flowed


On 03/02/2020 21:33, Alex.Durie via Boost-users wrote:
> Hi,
> I have written a short program utilising boost::float128 together with
> tux Eigen which successfully compiles and runs using g++, however it
> fails when I use icc.
> The compiler error is
>
> /home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727):
> error: no suitable constructor exists to convert from "const _Quad" to
> "boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
> boost::multiprecision::et_off>"
> ? ? ?static number_type (min)() BOOST_NOEXCEPT { return
> BOOST_MP_QUAD_MIN; }
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
> How can I resolve this?

I fear due to a lack of consistent testing support for the Intel
compiler, we may well have dropped the ball and broken support for
Intel's _Quad type.


The good news is that Intel on Linux does support GCC's __float128 type,
so my suggestion would be to:


* Remove the #define BOOST_MP_USE_QUAD

* Build with -std=gnu++14 rather than -std=c++14

* Remove the -Qoption,cpp,--extended_float_type option.


HTH, John.


>
> My example code is;
> #include <iostream>
> #include <cmath>
> #include <Eigen/Dense>
> #include <Eigen/Eigenvalues>
> #include <iomanip>
> #include <boost/cstdfloat.hpp>
> #include <boost/multiprecision/float128.hpp>
> #include <boost/math/special_functions.hpp>
> #include <boost/math/constants/constants.hpp>
> #include <quadmath.h>
> #define BOOST_MP_USE_QUAD
>
> using namespace Eigen;
> using namespace std;
>
> int main(){
> ? typedef Matrix<complex<boost::multiprecision::float128>, Dynamic,
> Dynamic> MatrixXcmp;
> ? MatrixXcmp C = MatrixXcmp::Random(8,8);
> cout<<setprecision(128)<<C<<endl<<endl;
> ? ComplexEigenSolver<MatrixXcmp> ces;
> ? ces.compute(C);
> ? return 0;
> }
>
> It only fails compilation when I put in the line 'ces.compute(C);'.
>
> I compile with
> icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2
> -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential
> -lmkl_core -lpthread -lm -ldl -lquadmath
>
> Many thanks in advance,
>
> Alex
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users


------------------------------

Subject: Digest Footer

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


------------------------------

End of Boost-users Digest, Vol 5318, Issue 1
********************************************

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

Re: boost float128 and Intel's _Quad with Tux Eigen

Boost - Users mailing list

On 04/02/2020 15:37, Alex.Durie via Boost-users wrote:
> Thanks John,
>
> >The good news is that Intel on Linux does support GCC's __float128 type,
> >so my suggestion would be to:
> >* Remove the #define BOOST_MP_USE_QUAD
> >* Build with -std=gnu++14 rather than -std=c++14
> >* Remove the -Qoption,cpp,--extended_float_type option.
>
> Unfortunately that didn't work, I get the new compiler error;


It shouldn't be required but try adding -DBOOST_HAS_FLOAT128 to the
command line.


John.


>
> /home/alex/boost/boost_1_71_0/boost/multiprecision/detail/number_base.hpp(216):
> error: static assertion failed with "is_integral<T>::value ||
> is_enum<T>::value || std::numeric_limits<T>::is_specialized"
> BOOST_STATIC_ASSERT(is_integral<T>::value || is_enum<T>::value ||
> std::numeric_limits<T>::is_specialized);
>
> Are you able to help?
>
> Many thanks,
>
> Alex
>
> ------------------------------------------------------------------------
> *From:* Boost-users <[hidden email]> on behalf of
> [hidden email] <[hidden email]>
> *Sent:* 04 February 2020 10:56
> *To:* [hidden email] <[hidden email]>
> *Subject:* Boost-users Digest, Vol 5318, Issue 1
> CAUTION: This mail comes from outside the University. Please consider
> this before opening attachments, clicking links, or acting on the content.
>
> Send Boost-users mailing list submissions to
>         [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
> or, via email, send a message with subject or body 'help' to
>         [hidden email]
>
> You can reach the person managing the list at
>         [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Boost-users digest..."
>
>
> Today's Topics:
>
>    1. boost float128 and Intel's _Quad with Tux Eigen (Alex.Durie)
>    2. [boost build] - How to create symbols (.pdb) files on windows
>       using VS2017 Community Edition? (Eko palypse)
>    3. Re: [boost build] - How to create symbols (.pdb) files on
>       windows using VS2017 Community Edition? (Mateusz Loskot)
>    4. Re: [boost build] - How to create symbols (.pdb) files on
>       windows using VS2017 Community Edition? (Eko palypse)
>    5. Re: boost float128 and Intel's _Quad with Tux Eigen (John Maddock)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 3 Feb 2020 21:33:13 +0000
> From: Alex.Durie <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Subject: [Boost-users] boost float128 and Intel's _Quad with Tux Eigen
> Message-ID:
> <[hidden email]>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
> I have written a short program utilising boost::float128 together with
> tux Eigen which successfully compiles and runs using g++, however it
> fails when I use icc.
> The compiler error is
>
> /home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727):
> error: no suitable constructor exists to convert from "const _Quad" to
> "boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
> boost::multiprecision::et_off>"
>      static number_type (min)() BOOST_NOEXCEPT { return
> BOOST_MP_QUAD_MIN; }
>                                                         ^
> How can I resolve this?
>
> My example code is;
> #include <iostream>
> #include <cmath>
> #include <Eigen/Dense>
> #include <Eigen/Eigenvalues>
> #include <iomanip>
> #include <boost/cstdfloat.hpp>
> #include <boost/multiprecision/float128.hpp>
> #include <boost/math/special_functions.hpp>
> #include <boost/math/constants/constants.hpp>
> #include <quadmath.h>
> #define BOOST_MP_USE_QUAD
>
> using namespace Eigen;
> using namespace std;
>
> int main(){
>   typedef Matrix<complex<boost::multiprecision::float128>, Dynamic,
> Dynamic> MatrixXcmp;
>   MatrixXcmp C = MatrixXcmp::Random(8,8);
> cout<<setprecision(128)<<C<<endl<<endl;
>   ComplexEigenSolver<MatrixXcmp> ces;
>   ces.compute(C);
>   return 0;
> }
>
> It only fails compilation when I put in the line 'ces.compute(C);'.
>
> I compile with
> icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2
> -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential
> -lmkl_core -lpthread -lm -ldl -lquadmath
>
> Many thanks in advance,
>
> Alex
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 2
> Date: Mon, 3 Feb 2020 23:23:31 +0100
> From: Eko palypse <[hidden email]>
> To: [hidden email]
> Subject: [Boost-users] [boost build] - How to create symbols (.pdb)
>         files on windows using VS2017 Community Edition?
> Message-ID:
> <CAD8XV+3=[hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> How can I build pdb files using b2 tool?
> If I run b2 -a --with-regex toolset=msvc-14.1 debug-symbols=on
> address-model=64 architecture=ia64 variant=debug
> it creates the needed lib but no pdb files are created.
>
> Thank you
> Eren
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 3
> Date: Tue, 4 Feb 2020 00:06:43 +0100
> From: Mateusz Loskot <[hidden email]>
> To: [hidden email]
> Subject: Re: [Boost-users] [boost build] - How to create symbols
>         (.pdb) files on windows using VS2017 Community Edition?
> Message-ID:
> <[hidden email]>
> Content-Type: text/plain; charset="UTF-8"
>
> On Mon, 3 Feb 2020 at 23:23, Eko palypse via Boost-users
> <[hidden email]> wrote:
> >
> > How can I build pdb files using b2 tool?
> > If I run b2 -a --with-regex toolset=msvc-14.1 debug-symbols=on
> address-model=64 architecture=ia64 variant=debug
> > it creates the needed lib but no pdb files are created.
>
> Additionally to
> debug-symbols=on
> add
> debug-store=database
>
> You should find PDBs in sub-folder(s) called debug-store-database.
>
> You may find some additional useful info here
> https://github.com/boostorg/build/issues/492
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 4 Feb 2020 00:28:37 +0100
> From: Eko palypse <[hidden email]>
> To: [hidden email]
> Subject: Re: [Boost-users] [boost build] - How to create symbols
>         (.pdb) files on windows using VS2017 Community Edition?
> Message-ID:
> <[hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> Thank you very much Mateusz,
> works like a charm.
>
> Thank you
> Eren
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 5
> Date: Tue, 4 Feb 2020 10:56:54 +0000
> From: John Maddock <[hidden email]>
> To: "Alex.Durie via Boost-users" <[hidden email]>
> Subject: Re: [Boost-users] boost float128 and Intel's _Quad with Tux
>         Eigen
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
>
> On 03/02/2020 21:33, Alex.Durie via Boost-users wrote:
> > Hi,
> > I have written a short program utilising boost::float128 together with
> > tux Eigen which successfully compiles and runs using g++, however it
> > fails when I use icc.
> > The compiler error is
> >
> > /home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727):
> > error: no suitable constructor exists to convert from "const _Quad" to
> >
> "boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
> > boost::multiprecision::et_off>"
> > ? ? ?static number_type (min)() BOOST_NOEXCEPT { return
> > BOOST_MP_QUAD_MIN; }
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
> > How can I resolve this?
>
> I fear due to a lack of consistent testing support for the Intel
> compiler, we may well have dropped the ball and broken support for
> Intel's _Quad type.
>
>
> The good news is that Intel on Linux does support GCC's __float128 type,
> so my suggestion would be to:
>
>
> * Remove the #define BOOST_MP_USE_QUAD
>
> * Build with -std=gnu++14 rather than -std=c++14
>
> * Remove the -Qoption,cpp,--extended_float_type option.
>
>
> HTH, John.
>
>
> >
> > My example code is;
> > #include <iostream>
> > #include <cmath>
> > #include <Eigen/Dense>
> > #include <Eigen/Eigenvalues>
> > #include <iomanip>
> > #include <boost/cstdfloat.hpp>
> > #include <boost/multiprecision/float128.hpp>
> > #include <boost/math/special_functions.hpp>
> > #include <boost/math/constants/constants.hpp>
> > #include <quadmath.h>
> > #define BOOST_MP_USE_QUAD
> >
> > using namespace Eigen;
> > using namespace std;
> >
> > int main(){
> > ? typedef Matrix<complex<boost::multiprecision::float128>, Dynamic,
> > Dynamic> MatrixXcmp;
> > ? MatrixXcmp C = MatrixXcmp::Random(8,8);
> > cout<<setprecision(128)<<C<<endl<<endl;
> > ? ComplexEigenSolver<MatrixXcmp> ces;
> > ? ces.compute(C);
> > ? return 0;
> > }
> >
> > It only fails compilation when I put in the line 'ces.compute(C);'.
> >
> > I compile with
> > icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2
> > -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential
> > -lmkl_core -lpthread -lm -ldl -lquadmath
> >
> > Many thanks in advance,
> >
> > Alex
> >
> > _______________________________________________
> > Boost-users mailing list
> > [hidden email]
> > https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> ------------------------------
>
> End of Boost-users Digest, Vol 5318, Issue 1
> ********************************************
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost float128 and Intel's _Quad with Tux Eigen

Boost - Users mailing list
Thanks John,

>It shouldn't be required but try adding -DBOOST_HAS_FLOAT128 to the
command line.

Unfortunately it now complains of the redefinition of the macro BOOST_HAS_FLOAT128 as well as the previous compile errors.

You mentioned that perhaps support was broken somewhere down the lines, would it work with an earlier version of boost do you think?

Many thanks,

Alex


From: Boost-users <[hidden email]> on behalf of John Maddock via Boost-users <[hidden email]>
Sent: Tuesday, 4 February 2020, 16:47
To: Alex.Durie via Boost-users
Cc: John Maddock
Subject: Re: [Boost-users] boost float128 and Intel's _Quad with Tux Eigen

CAUTION: This mail comes from outside the University. Please consider this before opening attachments, clicking links, or acting on the content.

On 04/02/2020 15:37, Alex.Durie via Boost-users wrote:
> Thanks John,
>
> >The good news is that Intel on Linux does support GCC's __float128 type,
> >so my suggestion would be to:
> >* Remove the #define BOOST_MP_USE_QUAD
> >* Build with -std=gnu++14 rather than -std=c++14
> >* Remove the -Qoption,cpp,--extended_float_type option.
>
> Unfortunately that didn't work, I get the new compiler error;


It shouldn't be required but try adding -DBOOST_HAS_FLOAT128 to the
command line.


John.


>
> /home/alex/boost/boost_1_71_0/boost/multiprecision/detail/number_base.hpp(216):
> error: static assertion failed with "is_integral<T>::value ||
> is_enum<T>::value || std::numeric_limits<T>::is_specialized"
> BOOST_STATIC_ASSERT(is_integral<T>::value || is_enum<T>::value ||
> std::numeric_limits<T>::is_specialized);
>
> Are you able to help?
>
> Many thanks,
>
> Alex
>
> ------------------------------------------------------------------------
> *From:* Boost-users <[hidden email]> on behalf of
> [hidden email] <[hidden email]>
> *Sent:* 04 February 2020 10:56
> *To:* [hidden email] <[hidden email]>
> *Subject:* Boost-users Digest, Vol 5318, Issue 1
> CAUTION: This mail comes from outside the University. Please consider
> this before opening attachments, clicking links, or acting on the content.
>
> Send Boost-users mailing list submissions to
>         [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
> or, via email, send a message with subject or body 'help' to
>         [hidden email]
>
> You can reach the person managing the list at
>         [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Boost-users digest..."
>
>
> Today's Topics:
>
>    1. boost float128 and Intel's _Quad with Tux Eigen (Alex.Durie)
>    2. [boost build] - How to create symbols (.pdb) files on windows
>       using VS2017 Community Edition? (Eko palypse)
>    3. Re: [boost build] - How to create symbols (.pdb) files on
>       windows using VS2017 Community Edition? (Mateusz Loskot)
>    4. Re: [boost build] - How to create symbols (.pdb) files on
>       windows using VS2017 Community Edition? (Eko palypse)
>    5. Re: boost float128 and Intel's _Quad with Tux Eigen (John Maddock)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 3 Feb 2020 21:33:13 +0000
> From: Alex.Durie <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Subject: [Boost-users] boost float128 and Intel's _Quad with Tux Eigen
> Message-ID:
> <[hidden email]>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
> I have written a short program utilising boost::float128 together with
> tux Eigen which successfully compiles and runs using g++, however it
> fails when I use icc.
> The compiler error is
>
> /home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727):
> error: no suitable constructor exists to convert from "const _Quad" to
> "boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
> boost::multiprecision::et_off>"
>      static number_type (min)() BOOST_NOEXCEPT { return
> BOOST_MP_QUAD_MIN; }
>                                                         ^
> How can I resolve this?
>
> My example code is;
> #include <iostream>
> #include <cmath>
> #include <Eigen/Dense>
> #include <Eigen/Eigenvalues>
> #include <iomanip>
> #include <boost/cstdfloat.hpp>
> #include <boost/multiprecision/float128.hpp>
> #include <boost/math/special_functions.hpp>
> #include <boost/math/constants/constants.hpp>
> #include <quadmath.h>
> #define BOOST_MP_USE_QUAD
>
> using namespace Eigen;
> using namespace std;
>
> int main(){
>   typedef Matrix<complex<boost::multiprecision::float128>, Dynamic,
> Dynamic> MatrixXcmp;
>   MatrixXcmp C = MatrixXcmp::Random(8,8);
> cout<<setprecision(128)<<C<<endl<<endl;
>   ComplexEigenSolver<MatrixXcmp> ces;
>   ces.compute(C);
>   return 0;
> }
>
> It only fails compilation when I put in the line 'ces.compute(C);'.
>
> I compile with
> icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2
> -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential
> -lmkl_core -lpthread -lm -ldl -lquadmath
>
> Many thanks in advance,
>
> Alex
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 2
> Date: Mon, 3 Feb 2020 23:23:31 +0100
> From: Eko palypse <[hidden email]>
> To: [hidden email]
> Subject: [Boost-users] [boost build] - How to create symbols (.pdb)
>         files on windows using VS2017 Community Edition?
> Message-ID:
> <CAD8XV+3=PM0yvD5W+RP+dGDubUB9gJcsvS+[hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> How can I build pdb files using b2 tool?
> If I run b2 -a --with-regex toolset=msvc-14.1 debug-symbols=on
> address-model=64 architecture=ia64 variant=debug
> it creates the needed lib but no pdb files are created.
>
> Thank you
> Eren
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 3
> Date: Tue, 4 Feb 2020 00:06:43 +0100
> From: Mateusz Loskot <[hidden email]>
> To: [hidden email]
> Subject: Re: [Boost-users] [boost build] - How to create symbols
>         (.pdb) files on windows using VS2017 Community Edition?
> Message-ID:
> <CABUeae_nDj4CaC0+[hidden email]>
> Content-Type: text/plain; charset="UTF-8"
>
> On Mon, 3 Feb 2020 at 23:23, Eko palypse via Boost-users
> <[hidden email]> wrote:
> >
> > How can I build pdb files using b2 tool?
> > If I run b2 -a --with-regex toolset=msvc-14.1 debug-symbols=on
> address-model=64 architecture=ia64 variant=debug
> > it creates the needed lib but no pdb files are created.
>
> Additionally to
> debug-symbols=on
> add
> debug-store=database
>
> You should find PDBs in sub-folder(s) called debug-store-database.
>
> You may find some additional useful info here
> https://github.com/boostorg/build/issues/492
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 4 Feb 2020 00:28:37 +0100
> From: Eko palypse <[hidden email]>
> To: [hidden email]
> Subject: Re: [Boost-users] [boost build] - How to create symbols
>         (.pdb) files on windows using VS2017 Community Edition?
> Message-ID:
> <CAD8XV+[hidden email]>
> Content-Type: text/plain; charset="utf-8"
>
> Thank you very much Mateusz,
> works like a charm.
>
> Thank you
> Eren
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 5
> Date: Tue, 4 Feb 2020 10:56:54 +0000
> From: John Maddock <[hidden email]>
> To: "Alex.Durie via Boost-users" <[hidden email]>
> Subject: Re: [Boost-users] boost float128 and Intel's _Quad with Tux
>         Eigen
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
>
> On 03/02/2020 21:33, Alex.Durie via Boost-users wrote:
> > Hi,
> > I have written a short program utilising boost::float128 together with
> > tux Eigen which successfully compiles and runs using g++, however it
> > fails when I use icc.
> > The compiler error is
> >
> > /home/alex/boost/boost_1_71_0/boost/multiprecision/float128.hpp(727):
> > error: no suitable constructor exists to convert from "const _Quad" to
> >
> "boost::multiprecision::number<boost::multiprecision::backends::float128_backend,
> > boost::multiprecision::et_off>"
> > ? ? ?static number_type (min)() BOOST_NOEXCEPT { return
> > BOOST_MP_QUAD_MIN; }
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^
> > How can I resolve this?
>
> I fear due to a lack of consistent testing support for the Intel
> compiler, we may well have dropped the ball and broken support for
> Intel's _Quad type.
>
>
> The good news is that Intel on Linux does support GCC's __float128 type,
> so my suggestion would be to:
>
>
> * Remove the #define BOOST_MP_USE_QUAD
>
> * Build with -std=gnu++14 rather than -std=c++14
>
> * Remove the -Qoption,cpp,--extended_float_type option.
>
>
> HTH, John.
>
>
> >
> > My example code is;
> > #include <iostream>
> > #include <cmath>
> > #include <Eigen/Dense>
> > #include <Eigen/Eigenvalues>
> > #include <iomanip>
> > #include <boost/cstdfloat.hpp>
> > #include <boost/multiprecision/float128.hpp>
> > #include <boost/math/special_functions.hpp>
> > #include <boost/math/constants/constants.hpp>
> > #include <quadmath.h>
> > #define BOOST_MP_USE_QUAD
> >
> > using namespace Eigen;
> > using namespace std;
> >
> > int main(){
> > ? typedef Matrix<complex<boost::multiprecision::float128>, Dynamic,
> > Dynamic> MatrixXcmp;
> > ? MatrixXcmp C = MatrixXcmp::Random(8,8);
> > cout<<setprecision(128)<<C<<endl<<endl;
> > ? ComplexEigenSolver<MatrixXcmp> ces;
> > ? ces.compute(C);
> > ? return 0;
> > }
> >
> > It only fails compilation when I put in the line 'ces.compute(C);'.
> >
> > I compile with
> > icpc quadtest.cpp -std=c++14 -Qoption,cpp,--extended_float_type -O2
> > -DMKL_LP64 -lmkl_intel_lp64 -fp-model precise -lmkl_sequential
> > -lmkl_core -lpthread -lm -ldl -lquadmath
> >
> > Many thanks in advance,
> >
> > Alex
> >
> > _______________________________________________
> > Boost-users mailing list
> > [hidden email]
> > https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> ------------------------------
>
> End of Boost-users Digest, Vol 5318, Issue 1
> ********************************************
>
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users


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