From 133e4f13a24241ad4c108998d12350cce88d0831 Mon Sep 17 00:00:00 2001 From: ianchb Date: Sat, 7 Feb 2026 19:04:51 +0800 Subject: [PATCH] Use OpenMP's parallel for with schedule(dynamic,1) --- AMSS_NCKU_source/TwoPunctures.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AMSS_NCKU_source/TwoPunctures.C b/AMSS_NCKU_source/TwoPunctures.C index 79b73a2..1b6e590 100644 --- a/AMSS_NCKU_source/TwoPunctures.C +++ b/AMSS_NCKU_source/TwoPunctures.C @@ -1359,7 +1359,7 @@ void TwoPunctures::F_of_v(int nvar, int n1, int n2, int n3, derivs v, double *F, debugfile = fopen("res.dat", "w"); assert(debugfile); } - #pragma omp parallel for collapse(3) schedule(static) \ + #pragma omp parallel for collapse(3) schedule(dynamic,1) \ private(i, j, k, ivar, indx, al, be, A, B, X, R, x, r, phi, y, z, Am1, \ psi, psi2, psi4, psi7, r_plus, r_minus) for (i = 0; i < n1; i++) @@ -1829,7 +1829,7 @@ void TwoPunctures::J_times_dv(int nvar, int n1, int n2, int n3, derivs dv, doubl Derivatives_AB3_MatMul(nvar, n1, n2, n3, dv); - #pragma omp parallel for schedule(static) \ + #pragma omp parallel for schedule(dynamic,1) \ private(j, k, ivar, indx, al, be, A, B, X, R, x, r, phi, y, z, Am1) for (i = 0; i < n1; i++) {