Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions itensor/index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ nameint(string const& f, int n)
Index::id_type Index::
generateID()
{
static Index::IDGenerator G;
return G();
Index::id_type r;
#pragma omp critical
{
static Index::IDGenerator G;
r = G();
}
return r;
}

Index::
Expand Down
2 changes: 1 addition & 1 deletion options.mk.sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
##
## Set which compiler to use by defining CCCOM:
## GNU GCC compiler
CCCOM=g++ -m64 -std=c++11 -fPIC
CCCOM=g++ -m64 -std=c++11 -fPIC -fopenmp

## Clang compiler (good to use on Mac OS)
#CCCOM=clang++ -std=c++11 -fPIC
Expand Down