Problems, Workarounds and Possible Solutions Implementing the Singleton Pattern with C++ and OpenMP

Programs written in C++ and OpenMP are still relatively rare. This paper shows some problems with the current state of the OpenMP specification regarding C++. We illustrate the problems with various implementations of the singleton pattern, measure their performance and describe workarounds and possible changes to the specification. The singletons are available in the AthenaMP open-source project.