Commit b62e85b1 authored by Artem Pulkin's avatar Artem Pulkin

cython: remove openmp from templates

parent 91b56947
Pipeline #45033 failed with stage
in 2 minutes and 20 seconds
......@@ -3,7 +3,6 @@ import numpy as np
cimport numpy as np
cimport cython
from libc.math cimport exp, cos, sin, pi, pow, sqrt
from cython.parallel import prange
# Template potential-2.pyx
# A two-point potential: depends on the distance between pairs of atoms
......@@ -33,7 +32,7 @@ def kernel_general_2(
# (no 'preamble' statements)
# ----------------
for row in range(nrows,):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -77,7 +76,7 @@ def kernel_g_general_2(
# (no 'preamble_grad' statements)
# ----------------
for row in range(nrows,):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -132,7 +131,7 @@ def kernel_general_3(
# (no 'preamble' statements)
# ----------------
for row in range(nrows,):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -199,7 +198,7 @@ def kernel_g_general_3(
# (no 'preamble_grad' statements)
# ----------------
for row in range(nrows,):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -290,7 +289,7 @@ def kernel_harmonic_repulsion(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -335,7 +334,7 @@ def kernel_g_harmonic_repulsion(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -389,7 +388,7 @@ def kernel_lj(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -434,7 +433,7 @@ def kernel_g_lj(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -488,7 +487,7 @@ def kernel_sw_phi2(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -533,7 +532,7 @@ def kernel_g_sw_phi2(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -589,7 +588,7 @@ def kernel_sw_phi3(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -657,7 +656,7 @@ def kernel_g_sw_phi3(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -748,7 +747,7 @@ def kernel_mlsf_g2(
cdef int pre_compute_r_fn_handle = pre_compute_r_handles[0]
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -793,7 +792,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, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -851,7 +850,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, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -924,7 +923,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, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1022,7 +1021,7 @@ def kernel_mlsf_g4(
cdef double _r3, _r3_factor, g5_fun
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1099,7 +1098,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, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1201,7 +1200,7 @@ def kernel_sigmoid(
# (no 'preamble' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......@@ -1246,7 +1245,7 @@ def kernel_g_sigmoid(
# (no 'preamble_grad' statements)
# ----------------
for row in prange(nrows,nogil=True, schedule='static'):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......
......@@ -26,7 +26,7 @@ def kernel_g_$name(
$preamble_grad
# ----------------
for row in $range(nrows,$range_args):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......
......@@ -26,7 +26,7 @@ def kernel_$name(
$preamble
# ----------------
for row in $range(nrows,$range_args):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......
......@@ -30,7 +30,7 @@ def kernel_g_$name(
$preamble_grad
# ----------------
for row in $range(nrows,$range_args):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......
......@@ -28,7 +28,7 @@ def kernel_$name(
$preamble
# ----------------
for row in $range(nrows,$range_args):
for row in range(nrows):
if species_row[row] == row_mask:
ptr_fr = r_indptr[row]
ptr_to = r_indptr[row + 1]
......
......@@ -3,6 +3,5 @@ import numpy as np
cimport numpy as np
cimport cython
from libc.math cimport exp, cos, sin, pi, pow, sqrt
from cython.parallel import prange
$kernels
\ No newline at end of file
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