Reposting as a single message -- had formatting issues with the prior otherwise identical post.
Guys,
Did something happen recently with ThreadLocal? I can't find ThreadLocal.h in the latest release of simbody (https://github.com/simbody/simbody.git ). I ask because I try to compile molmodel (which has not changed in forever) I get the below error. Where exactly is ThreadLocal.h?
thanks
sam
sam@pe1:~/svn/molmodel/build$ make
[ 3%] Building CXX object sharedTarget/CMakeFiles/SimTKmolmodel.dir/__/src/DuMMForceFieldSubsystemRep.cpp.o
/home/sam/svn/molmodel/src/DuMMForceFieldSubsystemRep.cpp:1759:5: error: ThreadLocal does not name a type; did you mean thread_local?
ThreadLocal Real localEnergy
thread_local
/home/sam/svn/molmodel/src/DuMMForceFieldSubsystemRep.cpp:1759:5: error: ThreadLocal does not name a type; did you mean thread_local?
ThreadLocal< Array_<Real, DuMM::NonbondAtomIndex> > localVdwScale;
^~~~~~~~~~~
thread_local
ThreadLocal.h
- Michael Sherman
- Posts: 807
- Joined: Fri Apr 01, 2005 6:05 pm
Re: ThreadLocal.h
Hi, Sam. I think Chris Dembia removed that obsolete code a while back. I sent him an email requesting advice.
Best regards,
Sherm
Best regards,
Sherm
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: ThreadLocal.h
Sherm is correct. We removed that class template when removing the pthread dependency, since now we can use C++11 threads. See https://github.com/simbody/simbody/pull/587/files for how you can use C++11 `thread_local` instead. If you would prefer to continue using `SimTK::ThreadLocal`, you can copy it into your own project. You can obtain the header file here: https://github.com/simbody/simbody/blob ... eadLocal.h
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: ThreadLocal.h
Thanks guys!
yea i suspected that might be it but couldn't find anything about it in the github comments. maybe that was back in svn days and somehow i managed to void encountering this issue.
yea i suspected that might be it but couldn't find anything about it in the github comments. maybe that was back in svn days and somehow i managed to void encountering this issue.