Skip to content

Commit

Permalink
Fix openblas sha
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriel Sandoval authored and sanurielf committed Oct 16, 2023
1 parent 870ddac commit 5dbe1e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ jobs:
VC_TARGET: 64
CMAKE_TARGET: x64
PYTHON_ARCH_TARGET: win-amd64
OPENBLAS_SHA256: 9255020dcd6e10e037550b04aa7b85b2a2c610c2a479be79b26105eb81fe253b
OPENBLAS_SHA256: e3a82e60db8d6197228790567e7cf74f2c421a65b29f848977a07b5457debdaa
FFTW_SHA256: cfd88dc0e8d7001115ea79e069a2c695d52c8947f5b4f3b7ac54a192756f439f

- ARCH: x86
VC_TARGET: 32
CMAKE_TARGET: Win32
PYTHON_ARCH_TARGET: win32
OPENBLAS_SHA256: 53e019385d8730a36943c5e3816d5994b448c8cfd9f3a9a55bc2f189f09dc821
OPENBLAS_SHA256: 89060f862ca33219aaf7ef49b58a0a8b2d763236a1c6a16c693cd28146a812e6
FFTW_SHA256: 29882a43033c9393479a4df52a2e9120589c06a2b724155b1a682747fa3e57d4

- python-version: 3.8
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
- name: Get openblas
shell: msys2 {0}
run: |
wget https://github.com/xianyi/OpenBLAS/releases/download/v${OPENBLAS_VERSION}/OpenBLAS-${OPENBLAS_VERSION}-${{matrix.ARCH}}.zip
wget https://github.com/openmathlib/OpenBLAS/releases/download/v${OPENBLAS_VERSION}/OpenBLAS-${OPENBLAS_VERSION}-${{matrix.ARCH}}.zip
wget https://raw.githubusercontent.com/xianyi/OpenBLAS/v${OPENBLAS_VERSION}/LICENSE -O OpenBLAS_LINCENSE
echo "${{matrix.OPENBLAS_SHA256}} OpenBLAS-${OPENBLAS_VERSION}-${{ matrix.ARCH }}.zip" > OpenBLAS.sha256
shasum -a 256 -c OpenBLAS.sha256
Expand Down
23 changes: 13 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@
glob(SUITESPARSE_SRC_DIR + '/UMFPACK/Source2/*_zi_*.c') +\
glob(SUITESPARSE_SRC_DIR + '/AMD/Source/*[!_l]*.c')

print(umf_sources)

umfpack = Extension('umfpack',
include_dirs = [ SUITESPARSE_SRC_DIR + '/UMFPACK/Include',
SUITESPARSE_SRC_DIR + '/AMD/Include',
Expand All @@ -296,26 +294,29 @@
sources = ['src/C/klu.c'])
else:

klu_sources = [SUITESPARSE_SRC_DIR + '/SuiteSparse_config/SuiteSparse_config.c']
klu_sources = [ 'src/C/klu.c',
SUITESPARSE_SRC_DIR + '/SuiteSparse_config/SuiteSparse_config.c']

if DLONG:
klu_sources += \
glob(SUITESPARSE_SRC_DIR + '/AMD/Source/*_l*.c') +\
glob(SUITESPARSE_SRC_DIR + '/BTF/Source/*_l_*.c') +\
[SUITESPARSE_SRC_DIR + '/COLAMD/Source/colamd_l.c'] +\
[SUITESPARSE_SRC_DIR + '/KLU/Source/klu_l.c'] +\
glob(SUITESPARSE_SRC_DIR + '/KLU/Source/*_l_*.c') +\
glob(SUITESPARSE_SRC_DIR + '/KLU/Source/*_zl_*.c')
glob(SUITESPARSE_SRC_DIR + '/KLU/Source/klu_l*.c') +\
glob(SUITESPARSE_SRC_DIR + '/KLU/Source/klu_zl*.c')
else:
klu_sources += \
glob(SUITESPARSE_SRC_DIR + '/AMD/Source/*[!_l]*.c') +\
glob(SUITESPARSE_SRC_DIR + '/BTF/Source/*[!_l_]*.c') +\
[SUITESPARSE_SRC_DIR + '/COLAMD/Source/colamd.c'] +\
[SUITESPARSE_SRC_DIR + '/KLU/Source/klu.c'] +\
glob(SUITESPARSE_SRC_DIR + '/KLU/Source/*[!_l_]*.c') +\
glob(SUITESPARSE_SRC_DIR + '/KLU/Source/*[!_zl_]*.c')

list(set(glob(SUITESPARSE_SRC_DIR + '/KLU/Source/klu_[!l]*.c')) &
set(glob(SUITESPARSE_SRC_DIR + '/KLU/Source/klu_[!zl]*.c'))) +\
[SUITESPARSE_SRC_DIR + '/KLU/Source/klu_z.c'] +\
glob(SUITESPARSE_SRC_DIR + '/KLU/Source/klu_z_*.c')

print(klu_sources)
klu = Extension('klu',
include_dirs = [ SUITESPARSE_SRC_DIR + '/KLU/Include',
SUITESPARSE_SRC_DIR + '/KLU/Source',
Expand Down Expand Up @@ -344,18 +345,20 @@
sources = [ 'src/C/cholmod.c' ])
else:
cholmod_sources = [ 'src/C/cholmod.c' ] +\
[SUITESPARSE_SRC_DIR + '/AMD/Source/' + s for s in ['amd_postorder.c', 'amd_post_tree.c', 'amd_2.c']] +\
[SUITESPARSE_SRC_DIR + '/COLAMD/Source/colamd.c'] +\
[SUITESPARSE_SRC_DIR + '/SuiteSparse_config/SuiteSparse_config.c'] +\
[SUITESPARSE_SRC_DIR + '/CHOLMOD/Check/cholmod_check.c']

if DLONG:
cholmod_sources += \
[SUITESPARSE_SRC_DIR + '/AMD/Source/amd_l_' + s for s in ['postorder.c', 'post_tree.c', '2.c']] +\
[SUITESPARSE_SRC_DIR + '/COLAMD/Source/colamd_l.c'] +\
glob(SUITESPARSE_SRC_DIR + '/CHOLMOD/Core/c*_l_*.c') +\
glob(SUITESPARSE_SRC_DIR + '/CHOLMOD/Cholesky/c*_l_*.c') +\
glob(SUITESPARSE_SRC_DIR + '/CHOLMOD/Supernodal/c*_l_*.c')
else:
cholmod_sources += \
[SUITESPARSE_SRC_DIR + '/AMD/Source/amd_' + s for s in ['postorder.c', 'post_tree.c', '2.c']] +\
[SUITESPARSE_SRC_DIR + '/COLAMD/Source/colamd.c'] +\
glob(SUITESPARSE_SRC_DIR + '/CHOLMOD/Core/c*[!_l_]*.c') +\
glob(SUITESPARSE_SRC_DIR + '/CHOLMOD/Cholesky/c*[!_l_]*.c') +\
glob(SUITESPARSE_SRC_DIR + '/CHOLMOD/Supernodal/c*[!_l_]*.c')
Expand Down

0 comments on commit 5dbe1e1

Please sign in to comment.