Update on "mixing OpenMP with other threading models"

General OpenMP discussion

Update on "mixing OpenMP with other threading models"

Postby renaud.detry » Wed Aug 21, 2013 8:59 am

Hello,

Could someone update me on the status of "mixing OpenMP with other threading models"?

(I've read some posts on the topic, but all are pretty old by now.)

Under Linux, when a library is said to be thread-safe (or conditionally safe), it is generally assumed that accesses to data shared between threads (if any) has been serialized with pthread mutexes (correct me if I'm wrong). If I use OpenMP, can I still trust traditional thread safety, or should I just ignore from here on all advertisement about thread safety that involve mutual exclusion? In other words, is there any guarantee that a library that provides a certain level of thread safety with my OS' default threading model (pthread) will provide the same level of safety with OpenMP? Guarantees either from the OpenMP specs or from GCC would be very welcome.
renaud.detry
 
Posts: 2
Joined: Wed Aug 21, 2013 3:31 am

Re: Update on "mixing OpenMP with other threading models"

Postby MarkB » Fri Aug 23, 2013 1:53 am

The OpenMP standard says nothing about interaction with other threading models: any guarantees can therefore only be implementation specific. I would expect that it probably does work under gcc, but I couldn't easily find any documentation to support this - sorry!
MarkB
 
Posts: 487
Joined: Thu Jan 08, 2009 10:12 am
Location: EPCC, University of Edinburgh

Re: Update on "mixing OpenMP with other threading models"

Postby renaud.detry » Sat Aug 24, 2013 2:57 am

Ok, thank you for your reply!
renaud.detry
 
Posts: 2
Joined: Wed Aug 21, 2013 3:31 am


Return to Using OpenMP

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests