Does PGI support Boost?

Hello,

I’m trying to compile a project that uses boost. If i compile with gcc Boost libraries can be found, although, when i compile with pgcc my cmake tells me that it cannot find Boost. My CMakeList has this line to find Boost:

find_package(Boost COMPONENTS system thread)

I also tried, since pgc couldn’t find it, to add this:

SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/usr/include/boost")

Although it still can’t find Boost libraries. Any idea what i should do? Thanks

The PGI C++ compiler, pgc++, is able to compile and use Boost, though pgcc is a C compiler so wont be able to use it (Boost is a set of C++ libraries).

Though, I don’t know if this is your issue or if you have a configuration problem with CMake.

What command is CMake using to determine if Boost is available? Is it trying to compile something? Is it looking for a particular file?

-Mat

Hello,

from my understanding in my CMakeLists.txt i only have this:

 find_package(Boost COMPONENTS system thread

)

From what i read this sends a automatic message if the system found or not found Boost. In my case e get a message that it could not find it. This only happens when i force to compile with pgc++ or pgcc, with the following command:

SET(CMAKE_CXX_COMPILER /opt/pgi/linux86-64/17.10/bin/pgc++)

If i dont do this last command, it will compile with gcc and i get the message that Boost was found.

You can check full CMakeLists.txt here:

https://github.com/JakobEngel/dso/blob/master/CMakeLists.txt

The only difference from that and mine is that i added the command to compile with pgc++ and changed CXX_FLAGS to:

-O3 -g -std=c++0x -acc -Minfo=accel -ta=multicore -silent

Hi,

I changed my CMakeLists.txt to use pgc++ for CXX_COMPILER and gcc for C_COMPILER. That way it manages to find Boost.

Although now i have another problem, i get many error like this one:

"/usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h", line 214: error:
          excessive recursion at instantiation of function
          "Eigen::internal::copy_using_evaluator_LinearTraversal_CompleteUnroll
          ing<Kernel, Index, Stop>::run [with
          Kernel=Eigen::internal::generic_dense_assignment_kernel<Eigen::intern
          al::evaluator<Eigen::Matrix<float, 9, 9, 0, 9, 9>>,
          Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Eigen::internal::sca
          lar_constant_op<float>, Eigen::Matrix<float, 9, 9, 0, 9, 9>>>,
          Eigen::internal::assign_op<float>, 0>, Index=64, Stop=81]"
      copy_using_evaluator_LinearTraversal_CompleteUnrolling<Kernel, Index+1, Stop>::run(kernel);
      ^
          detected during:
            instantiation of "void
                      Eigen::internal::copy_using_evaluator_LinearTraversal_Com
                      pleteUnrolling<Kernel, Index, Stop>::run(Kernel &) [with
                      Kernel=Eigen::internal::generic_dense_assignment_kernel<E
                      igen::internal::evaluator<Eigen::Matrix<float, 9, 9, 0,
                      9, 9>>,

What is the recursion threshold for pgc?

Is there any way to change the limit for template recursion?

In gcc would be something like “-ftemplate-depth limit”. I can’t find anything like that for pgc

Try: “-Wc,–pending_instantiations=N”

Where N is the maximum number of recursive template instantiations, or 0 for unlimited. The default value, without this option, is 64.
(That’s a single hyphen before the ‘W’, and a double hyphen before ‘pending’.)