Skip to content

Commit

Permalink
Statically link BLAS/LAPACK
Browse files Browse the repository at this point in the history
  • Loading branch information
rth committed Nov 15, 2018
1 parent 9482984 commit 3e1d634
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 295 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sudo apt-get install gfortran f2c
# Download BLAS/LAPACK
git clone https://github.com/adrianbg/CLAPACK-WA.git packages/scipy/CLAPACK-WA
git clone https://github.com/rth/CLAPACK-WA.git packages/scipy/CLAPACK-WA
- restore_cache:
keys:
Expand Down
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ OPTFLAGS=-O3
CFLAGS=$(OPTFLAGS) -g -I$(PYTHONINCLUDE) -Wno-warn-absolute-paths
CXXFLAGS=$(CFLAGS) -std=c++14


# __ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv is in
# EXPORTED_FUNCTIONS to keep the C++ standard library in the core, even though
# there isn't any C++ there, for the sake of loading dynamic modules written in
Expand Down Expand Up @@ -134,6 +135,7 @@ clean:
rm -fr src/*.bc
make -C packages clean
make -C six clean
make -C packages/scipy/CLAPACK-WA cleanall
echo "The Emsdk and CPython are not cleaned. cd into those directories to do so."


Expand Down Expand Up @@ -208,8 +210,14 @@ $(LZ4LIB):
$(SIX_LIBS): $(CPYTHONLIB)
make -C six

$(LAPACK): $(CPYTHONLIB)
emmake make -C packages/scipy/CLAPACK-WA
clapack: $(CPYTHONLIB)
# We build BLAS/LAPACK only for target.
# On host we include -LCLAPACK-WA path which has no effect on host.
# On target it gets rewritten by pywasmcross to the full patch of
# blas_WA.bc, lapack_WA.bc which are linked statically in scipy
# in each module that needs them.
make -C $(LAPACK_DIR)F2CLIBS/libf2c/ arith.h
emmake make -C $(LAPACK_DIR)

$(CLAPACK): $(CPYTHONLIB)
make -C CLAPACK
Expand All @@ -218,6 +226,5 @@ $(CLAPACK): $(CPYTHONLIB)
build/packages.json: $(CPYTHONLIB) $(CLAPACK)
make -C packages


emsdk/emsdk/.complete:
make -C emsdk
3 changes: 1 addition & 2 deletions packages/scipy/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ source:
# these patches can be found as commits in
# https://github.com/rth/scipy/tree/0.17.1-pyodide
# on top of the v0.17.1 tag
- patches/disable_modules_with_blas.patch
- patches/fix-blas.patch
- patches/fix-build-gcc5-a80460.patch
- patches/force_malloc.patch
- patches/disable_scipy_stats_mvn.patch
- patches/skip-fortran-fails-to-link.patch
- patches/dummy_threading.patch
- patches/skip-blas-imports.patch
- patches/skip_ellip_harm_2_pyx_ctypes.patch

build:
Expand Down
282 changes: 0 additions & 282 deletions packages/scipy/patches/disable_modules_with_blas.patch

This file was deleted.

Loading

0 comments on commit 3e1d634

Please sign in to comment.