Commit 56663873 authored by Artem Pulkin's avatar Artem Pulkin

cython: add static openmp scheduling

parent 0086642c
Pipeline #44249 passed with stage
in 2 minutes and 29 seconds
......@@ -290,7 +290,7 @@ def kernel_harmonic_repulsion(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -335,7 +335,7 @@ def kernel_g_harmonic_repulsion(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -389,7 +389,7 @@ def kernel_lj(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -434,7 +434,7 @@ def kernel_g_lj(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -488,7 +488,7 @@ def kernel_sw_phi2(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -533,7 +533,7 @@ def kernel_g_sw_phi2(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -589,7 +589,7 @@ def kernel_sw_phi3(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -657,7 +657,7 @@ def kernel_g_sw_phi3(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -748,7 +748,7 @@ def kernel_mlsf_g2(
cdef int pre_compute_r_fn_handle = pre_compute_r_handles[0]
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -793,7 +793,7 @@ def kernel_g_mlsf_g2(
cdef int pre_compute_r_fp_handle = pre_compute_r_handles[1]
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -851,7 +851,7 @@ def kernel_mlsf_g5(
cdef int pre_compute_r_cutoff_fn_handle = pre_compute_r_handles[0], pre_compute_r_exp_fn_handle = pre_compute_r_handles[2]
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -924,7 +924,7 @@ def kernel_g_mlsf_g5(
cdef int pre_compute_r_cutoff_fp_handle = pre_compute_r_handles[1]
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1022,7 +1022,7 @@ def kernel_mlsf_g4(
cdef double _r3, _r3_factor, g5_fun
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1099,7 +1099,7 @@ def kernel_g_mlsf_g4(
cdef double _r3_factor_p, _r3_grad_r1, _r3_grad_r2, _r3_grad_cosine, g5_grad_r1, g5_grad_r2, g5_grad_cosine
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1201,7 +1201,7 @@ def kernel_sigmoid(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1246,7 +1246,7 @@ def kernel_g_sigmoid(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True):
for row in prange(nrows,nogil=True, schedule='static'):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......
......@@ -86,7 +86,7 @@ class BuildPotentials(Command):
p = _p
if p["openmp"]:
p["range"] = "prange"
p["range_args"] = "nogil=True"
p["range_args"] = "nogil=True, schedule='static'"
p["decorators"] = "@cython.boundscheck(False)\n@cython.wraparound(False)"
else:
p["range"] = "range"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment