utility::thread namespace error while trying to build with boost_thread

Member Site Forums Rosetta 3 Rosetta 3 – Build/Install utility::thread namespace error while trying to build with boost_thread

  • This topic has 1 reply, 2 voices, and was last updated 9 years ago by Anonymous.
Viewing 1 reply thread
  • Author
    Posts
    • #2201
      Anonymous

        Hello, I’m trying to build Rosetta 2015-.12.57698 in Ubuntu 14.04.2 LTS using gcc 4.8.2. I can successfully build Rosetta using:


        ./scons.py -j2 bin mode=release


         

        but when I try with “extras=boost_thread” (i.e., ./scons.py -j2 bin mode=release extras=boost_thread), I get the following error:


        g++ -o build/src/release/linux/3.16/64/x86/gcc/4.8/boost_thread/protocols/fldsgn/potentials/sspot/HSPairPotential.os -c -std=c++98 -isystem external/boost_1_55_0/ -isystem external/include/ -isystem external/dbio/ -pipe -ffor-scope -Wall -Wextra -pedantic -Werror -Wno-long-long -Wno-strict-aliasing -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -Wno-unused-parameter -pthread -fPIC -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DPTR_BOOST -DNDEBUG -DUSE_BOOST_THREAD -DMULTI_THREADED -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc/4.8 -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/boost_1_55_0 -Iexternal/dbio -I/usr/include -I/usr/local/include src/protocols/fldsgn/potentials/sspot/HSPairPotential.cc

        In file included from src/protocols/hotspot_hashing/SurfaceSearchPattern.cc:33:0:

        src/core/scoring/sc/MolecularSurfaceCalculator.hh:273:2: error: 'thread' in namespace 'utility' does not name a type

        utility::thread::ReadWriteMutex sc_radii_mutex_;



      • #11014
        Anonymous

          Multithreading isn’t well supported in Rosetta at this point – it’s something we’re working on, but it’s a little rough around the edges. Particularly, when we get better multi-threading support in Rosetta it will be based off of native C++11 threading, rather than boost threading.

          For that reason, I would only recommend building with extras=boost_thread if you use the few protocols which explicitly mention they make use of it (such as the fragment picker), as it’s not going to help general Rosetta protocols. Also, if you can set things up so that you can use multi-processing distribution rather than multi-threading, then I’d recommend that.

          If you absolutely need the boost_thread build of Rosetta, then to fix this bug you need to add preprocessing guards for CXX11 threading around this particular use case, as it’s C++11 threading specific:

          #ifdef MULTI_THREADED
          #ifdef CXX11
          private:
          utility::thread::ReadWriteMutex sc_radii_mutex_;
          #endif
          #endif

          You’ll need to do something similar to src/core/scoring/sc/MolecularSurfaceCalculator.cc as well at around line 255

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.