Modify

Opened 6 years ago

Closed 5 years ago

#6354 closed Bugs (fixed)

PGI: Compiler threading support is not turned on

Reported by: viboes Owned by: viboes
Milestone: Boost 1.50.0 Component: thread
Version: Boost Development Trunk Severity: Problem
Keywords: build threading=multi Cc:

Description

The following tester is reporting this compile error

Test output: Sandia-pgi-11.9 - thread - test_barrier / pgi-11.9
Rev 76218 / Thu, 29 Dec 2011 17:44:28 +0000
Report Time: Tue, 3 Jan 2012 15:45:59 +0000

Compile [2011-12-29 19:29:47 UTC]: fail

    "pgCC" -INLINE:none -Kieee -fpic -fPIC -gopt -Minform=warn -DBOOST_ALL_NO_LIB=1 -DBOOST_TEST_NO_AUTO_LINK=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -D__need_IOV_MAX -I".." -c -o "/scratch/kbelco/boost/results/boost/bin.v2/libs/thread/test/test_barrier.test/pgi-11.9/debug/threading-multi/test_barrier.o" "../libs/thread/test/test_barrier.cpp"

"../boost/config/requires_threads.hpp", line 86: catastrophic error: #error
          directive: "Compiler threading support is not turned on.  Please
          consult your compiler's documentation for the appropriate options to
          use"
  #  error "Compiler threading support is not turned on.  Please consult your compiler's documentation for the appropriate options to use"
     ^

1 catastrophic error detected in the compilation of "../libs/thread/test/test_barrier.cpp".
Compilation terminated.

Maybe the build is setting threading=single and Boost.Thread doesn't force threading=multi or the selection in the config file doesn't takes in account the PGI compiler.

Attachments (0)

Change History (7)

comment:1 Changed 6 years ago by viboes

Committed #76283

Thread: protect of threading=single by forcing threading=multi

to see if this is a Thread issue.

comment:2 Changed 6 years ago by anonymous

Just want to chime in and say that I see the same compiler errors compiling my application with pgCC. I hope this gets resolved, I'd like to use pgCC, but for now have to use GNU C++ due to this issue.

Thanks. reddell at uw.edu

comment:3 Changed 6 years ago by Lars Viklund <zao@…>

boost/config/compiler/pgi.hpp defines BOOST_HAS_PTHREADS but not BOOST_HAS_THREADS, resulting in failure in the requires_threads.hpp header mentioned in the report.

As far as I can tell, there's no particular compiler flag needed to enable threading in current PGI versions. Simply hacking in a

#define BOOST_HAS_THREADS

in the pgi.hpp header seems to have done the trick for threading on my tested configuration (11.8).

comment:4 Changed 6 years ago by Ioannis Papadopoulos <ipapadop@…>

It also works with pgi 11.9

comment:5 Changed 6 years ago by viboes

Milestone: To Be DeterminedBoost 1.50.0
Status: newassigned

Thanks for the analysis. I will see if we can add this soon.

comment:6 Changed 6 years ago by viboes

Committed in trunk revision 77487.

comment:7 Changed 5 years ago by viboes

Resolution: fixed
Status: assignedclosed

It seems this is working now.

Committed in release branch at [78543]

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.