Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure only the thread that holds the GIL does Python stuff #107

Merged
merged 3 commits into from
Jul 13, 2024
Merged
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
4 changes: 4 additions & 0 deletions src/dmrg/determinant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ struct DeterminantTRIE<S, FL, typename S::is_sz_t>
#pragma omp parallel num_threads(ntg)
// depth-first traverse of trie
while (!ptrs.empty()) {
#pragma omp master
check_signal_()();
int pstart = max(0, (int)ptrs.size() - ngroup);
#pragma omp for schedule(static)
Expand Down Expand Up @@ -772,6 +773,7 @@ struct DeterminantTRIE<S, FL, typename S::is_su2_t>
#pragma omp parallel num_threads(ntg)
// depth-first traverse of trie
while (!ptrs.empty()) {
#pragma omp master
check_signal_()();
int pstart = max(0, (int)ptrs.size() - ngroup);
#pragma omp for schedule(static)
Expand Down Expand Up @@ -1080,6 +1082,7 @@ struct DeterminantTRIE<S, FL, typename S::is_sg_t>
#pragma omp parallel num_threads(ntg)
// depth-first traverse of trie
while (!ptrs.empty()) {
#pragma omp master
check_signal_()();
int pstart = max(0, (int)ptrs.size() - ngroup);
#pragma omp for schedule(static)
Expand Down Expand Up @@ -1451,6 +1454,7 @@ struct DeterminantTRIE<S, FL, typename S::is_sany_t>
#pragma omp parallel num_threads(ntg)
// depth-first traverse of trie
while (!ptrs.empty()) {
#pragma omp master
check_signal_()();
int pstart = max(0, (int)ptrs.size() - ngroup);
#pragma omp for schedule(static)
Expand Down
Loading