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

Fix build #387

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9]
python-version: [3.11]

runs-on: ${{ matrix.os }}
defaults:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/zoltan-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: [3.11]

env:
USE_TRILINOS: 1
Expand Down Expand Up @@ -41,7 +41,8 @@ jobs:
run: |
conda info
conda install -c conda-forge numpy cython
python -m pip install mpi4py cyarray
python -m pip install mpi4py
python -m pip install https://github.com/pypr/cyarray/zipball/master
python -m pip install --no-build-isolation https://github.com/pypr/pyzoltan/zipball/master
python -m pip install https://github.com/pypr/compyle/zipball/master
python -m pip install -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion pysph/base/linalg3.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ from numpy.linalg import eigh
cimport numpy
import numpy

cdef extern:
cdef extern from "math.h":
double fabs(double) nogil

# this is cython substitute for const values
Expand Down
7 changes: 0 additions & 7 deletions pysph/base/nnps_base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ ELSE:
cpdef set_number_of_threads(int n):
print("OpenMP not available, cannot set number of threads.")


IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y

# Particle Tag information
from cyarray.carray cimport BaseArray, aligned_malloc, aligned_free
from .utils import ParticleTAGS
Expand Down
6 changes: 0 additions & 6 deletions pysph/base/octree.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ from cython.parallel import parallel, prange, threadid
# EPS_MAX is maximum value of eps in tree building
DEF EPS_MAX = 1e-3

IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y

ctypedef cOctreeNode* node_ptr
ctypedef double* dbl_ptr

Expand Down
7 changes: 0 additions & 7 deletions pysph/base/octree_nnps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ from libc.stdlib cimport malloc, free
cimport cython
from cython.operator cimport dereference as deref, preincrement as inc

IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y


#############################################################################
cdef class OctreeNNPS(NNPS):
"""Nearest neighbor search using Octree.
Expand Down
7 changes: 0 additions & 7 deletions pysph/base/spatial_hash_nnps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ from libcpp.vector cimport vector
# Cython for compiler directives
cimport cython

IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y


#############################################################################
cdef class SpatialHashNNPS(NNPS):

Expand Down
6 changes: 0 additions & 6 deletions pysph/base/stratified_hash_nnps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ cimport cython

DEF EPS = 1e-6

IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y

#############################################################################
cdef class StratifiedHashNNPS(NNPS):

Expand Down
7 changes: 0 additions & 7 deletions pysph/base/stratified_sfc_gpu_nnps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ cdef extern from *:
#endif
"""

IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y


cdef class StratifiedSFCGPUNNPS(GPUNNPS):
def __init__(self, int dim, list particles, double radius_scale=2.0,
int ghost_layers=1, domain=None, bint fixed_h=False,
Expand Down
7 changes: 0 additions & 7 deletions pysph/base/stratified_sfc_nnps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ cdef extern from *:
#endif
"""

IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y


#############################################################################
cdef class StratifiedSFCNNPS(NNPS):

Expand Down
7 changes: 0 additions & 7 deletions pysph/base/z_order_gpu_nnps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ cdef extern from *:
#endif
"""

IF UNAME_SYSNAME == "Windows":
cdef inline double fmin(double x, double y) nogil:
return x if x < y else y
cdef inline double fmax(double x, double y) nogil:
return x if x > y else y


cdef class ZOrderGPUNNPS(GPUNNPS):
def __init__(self, int dim, list particles, double radius_scale=2.0,
int ghost_layers=1, domain=None, bint fixed_h=False,
Expand Down
Loading