Can PGI C++ support boost? Pleeeaase...

Hi Everyone,

Apologies if this message might somehow be unsuitable in context and manner, but hopefully as PGI C++ users we can create some buzz on this issue.

I am using boost for everything these days. (www.boost.org). More than the standard C++ library itself. Are there any other users of this fine lib out there? (I am sure MANY! Please speak out.)

Boost libraries push C++ compilers to the limit, yet one way or another many compilers are supported (probably most were thanks to combined efforts of boost AND compiler vendors).

I can attest that PGI compiler is successfully living up to that limit: One can build and test many if not all boost libraries with current PGI compilers as is by modifying one of the simplest available bjam toolsets according to one’s PGI development environment. It works, but…

PGI is not officially supported by boost (or vice versa!). What does this mean? It means the user has to suffer trying to come up with a non-portable, (very!) underoptimized, quite nontrivial and extremely brittle build with every new version of the library.

Please help!

Levent

Hi Levent,

We are currently working through the process of adding PGI support for Boost. We don’t have a firm time line yet, but it is a high priority item which we are actively pursuing.

Thanks,
Mat

what is the status of your support for boost. we are working on a product that is trying to use a small set of the boost library and are unable to proceed. while we are able to build the library with g++ we get the following error message using pgCC

/opt/PGI/pgi_6.2-4/linux86-64/6.2/bin/pgcpp1 --llalign -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__NO_MATH_INLINES -D__x86_64__ -D__LONG_MAX__=9223372036854775807L ‘-D__SIZE_TYPE__=unsigned long int’ ‘-D__PTRDIFF_TYPE__=long int’ -D__THROW= -D__extension__= -D__amd64__ -D__SSE__ -D__MMX__ -D__SSE2__ -D__SSE3__ -D__PGI -I. -I/usr/include -I/usr/projects/blanca/packages/Loki/include -I/usr/projects/blanca/packages/UnitTest++/src -IContinuous/ENDF_Laws -IContinuous -IInterface_test -DGCC_FORT_COMPILER -DNDEBUG -DBOOST_DISABLE_ASSERTS -I/opt/PGI/pgi_6.2-4/linux86-64/6.2/include/CC -I/opt/PGI/pgi_6.2-4/linux86-64/6.2/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/3.4.4/include -I/usr/lib/gcc/x86_64-redhat-linux/3.4.4//include -I/usr/include --dependencies_to_file_quoted_only /users/sdnolen/obj/pgi-opt-flash/Continuous/XsdirReader.d -q -o /tmp/sdnolen/pgcppZ9ObzfqWYEjN.il Continuous/XsdirReader.cc
“/usr/include/boost/cstdint.hpp”, line 71: error: the global scope has no
“int64_t”
using ::int64_t;
^

1 error detected in the compilation of “Continuous/XsdirReader.cc”.
pgCC-Fatal-cpp1 completed with exit code 2

Hi,

We are still working on it. We recommend you try the latest release of our compilers to compile. Unfortunately we cannot tell the specific time when we will be able to compile it all.

The boost dev branch gets compile at Sandia at least weekly. You can find results and best flags to use on at:

http://beta.boost.org/development/tests/trunk/developer/summary.html

Hongyon

With 7.0-7, I was able to compile some parts of Boost, provided I explicitely tell the compiler to undefine SSE2 (it seems 7.0-7 does not handle how Boost writes SSE code). Also, the thread library can’t be compiled.

It seems that there isn’t a PGI compiler in the Boost compilation farm. Any luck of having different versions back?

Hi Matthieu,

I know Sandia was working on getting our 8.0 compiler into their daily build of BOOST, so I’m not sure why we’re not on the list now. I’ll ask my contact there and see what’s going on.

FYI, we have made a lot progress with BOOST but still have more work to do.

Thanks for letting me know,
Mat

You’re welcome, thanks for supporting this library!

hi all,

I had some success getting Boost to compile, we are only using the regex and serialization libraries, this is what I did:

  1. Unpack boost_1_37_0.tar.bz2 with md5sum 8d9f990bfb7e83769fa5f1d6f065bc92
  2. Change to directory boost_1_37_0/tools/build/v2/tools
  3. Delete pgi.jam
  4. wget http://lists.boost.org/boost-users/att-24439/pgi.jam
  5. Apply pgi.jam.patch attached to this email
  6. Change to directory boost_1_37_0/boost/archive
  7. Apply codecvt_null.hpp.patch attached to this email
  8. Change to directory boost_1_37_0
  9. ./configure --prefix=$HOME --with-toolset=pgi
    –with-libraries=regex,serialization
  10. make
  11. make install

However, when I try to link against the regex library, I get this error:

.gnu.linkonce.t.finalize__Q3_5boost9re_detail98basic_regex_creator__tm__71_cQ2_5boost58regex_traits__tm__38_cQ2_5boost25cpp_regex_traits__tm__2_cFPCZ1ZT1_v' referenced in section .data’ of ./libclustering_algorithm_pack.a(ccpivot.o): defined in discarded section `.gnu.linkonce.t.finalize__Q3_5boost9re_detail98basic_regex_creator__tm__71_cQ2_5boost58regex_traits__tm__38_cQ2_5boost25cpp_regex_traits__tm__2_cFPCZ1ZT1_v’ of ./libclustering_algorithm_pack.a(ccpivot.o)

It then continues for many pages in the same way, blah' referenced in section blah’ of blah: defined in discarded section blah'. Inspecting the ld’ online documentation it seems that pgcpp has created an empty section with a label in it. References to that label are causing the problem… On the one hand I can’t really see why this should be illegal… But on the other hand I can’t see why the C++ compiler would need to do this. Before I go inspecting the asm output, does anyone have any further information about this problem?

*** pgi.jam.patch ***
— pgi.jam.orig 2007-01-08 15:08:53.000000000 +1100
+++ pgi.jam 2009-01-08 11:36:52.050786498 +1100
@@ -45,7 +45,7 @@
flags pgi.compile OPTIONS on : -xprofile=tcov ;
flags pgi.compile OPTIONS speed : -fast ;
flags pgi.compile OPTIONS space : -xO2 -xspace ;
-flags pgi.compile OPTIONS multi : -mt ;
+flags pgi.compile OPTIONS multi : -D_MT ;

flags pgi.compile OPTIONS off : -Minform=severe ;
flags pgi.compile OPTIONS on : -Minform=warn ;
@@ -79,7 +79,7 @@

Strip the binary when no debugging is needed

flags pgi.link OPTIONS off : -s ;
flags pgi.link OPTIONS on : -xprofile=tcov ;
-flags pgi.link OPTIONS multi : -mt ;
+flags pgi.link OPTIONS multi : -D_MT ;
flags pgi.link OPTIONS ;
flags pgi.link LINKPATH ;
flags pgi.link FINDLIBS-ST ;
*** codecvt_null.hpp.patch ***
— codecvt_null.hpp.orig 2009-01-08 10:44:55.100340315 +1100
+++ codecvt_null.hpp 2009-01-08 10:45:01.516449600 +1100
@@ -25,7 +25,7 @@
#if defined(BOOST_NO_STDC_NAMESPACE)
using ::codecvt;
using ::mbstate_t;

  • using ::size_t
  • using ::size_t;
    #endif

namespace boost {
*** end of attachments ***

Many thanks,
cheers, Nick

Indeed, there is a stupid typo in codecvt_null.hpp that will be fixed in the next Boost release ;)