Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
ccdadc6e
Commit
ccdadc6e
authored
Oct 26, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move CLAPACK_WA to the root folder
parent
3747c6db
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
26 deletions
+31
-26
.circleci/config.yml
.circleci/config.yml
+1
-1
Makefile
Makefile
+11
-3
packages/scipy/meta.yaml
packages/scipy/meta.yaml
+1
-1
packages/scipy/patches/fix-blas.patch
packages/scipy/patches/fix-blas.patch
+16
-20
pyodide_build/pywasmcross.py
pyodide_build/pywasmcross.py
+2
-1
No files found.
.circleci/config.yml
View file @
ccdadc6e
...
@@ -23,7 +23,7 @@ jobs:
...
@@ -23,7 +23,7 @@ jobs:
sudo apt-get install gfortran f2c
sudo apt-get install gfortran f2c
# Download BLAS/LAPACK
# Download BLAS/LAPACK
git clone https://github.com/rth/CLAPACK-WA.git
packages/scipy/
CLAPACK-WA
git clone https://github.com/rth/CLAPACK-WA.git CLAPACK-WA
-
restore_cache
:
-
restore_cache
:
keys
:
keys
:
...
...
Makefile
View file @
ccdadc6e
...
@@ -64,7 +64,11 @@ all: build/pyodide.asm.js \
...
@@ -64,7 +64,11 @@ all: build/pyodide.asm.js \
build/pyodide.asm.js
:
src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.bc
\
build/pyodide.asm.js
:
src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.bc
\
src/pyimport.bc src/pyproxy.bc src/python2js.bc
\
src/pyimport.bc src/pyproxy.bc src/python2js.bc
\
<<<<<<< HEAD
src/runpython.bc src/hiwire.bc
src/runpython.bc src/hiwire.bc
=======
src/runpython.bc
src/hiwire.bc
$(CLAPACK)
>>>>>>>
Move
CLAPACK_WA
to
the
root
folder
[
-d
build
]
||
mkdir
build
[
-d
build
]
||
mkdir
build
$(CXX)
-s
EXPORT_NAME
=
"'pyodide'"
-o
build/pyodide.asm.html
$(
filter
%.bc,
$^
)
\
$(CXX)
-s
EXPORT_NAME
=
"'pyodide'"
-o
build/pyodide.asm.html
$(
filter
%.bc,
$^
)
\
$(LDFLAGS)
-s
FORCE_FILESYSTEM
=
1
$(LDFLAGS)
-s
FORCE_FILESYSTEM
=
1
...
@@ -207,17 +211,21 @@ $(LZ4LIB):
...
@@ -207,17 +211,21 @@ $(LZ4LIB):
make
-C
lz4
make
-C
lz4
something
:
cd
packages/scipy/build/scipy-0.17.1
&&
emcc
-O3
-s
BINARYEN_METHOD
=
native-wasm
-Werror
-s
EMULATED_FUNCTION_POINTERS
=
1
-s
EMULATE_FUNCTION_POINTER_CASTS
=
1
-s
SIDE_MODULE
=
1
-s
WASM
=
1
-s
BINARYEN_TRAP_MODE
=
clamp
--memory-init-file
0
-Wall
-g
-Wall
-g
-shared
build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/_fblasmodule.bc build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/fortranobject.bc build/temp.linux-x86_64-3.7/src/packages/scipy/build/scipy-0.17.1/scipy/_build_utils/src/wrap_dummy_g77_abi.bc build/temp.linux-x86_64-3.7/src/packages/scipy/build/scipy-0.17.1/scipy/_build_utils/src/wrap_dummy_accelerate.bc build/temp.linux-x86_64-3.7/build/src.linux-x86_64-3.7/build/src.linux-x86_64-3.7/scipy/linalg/_fblas-f2pywrappers.bc ../../../../CLAPACK-WA/F2CLIBS/libf2c.bc
-lblas_WA
-llapack_WA
-disable-verify
-Lbuild
/temp.linux-x86_64-3.7
-lgfortran
-o
build/lib.linux-x86_64-3.7/scipy/linalg/_fblas.cpython-37m-x86_64-linux-gnu.wasm
$(SIX_LIBS)
:
$(CPYTHONLIB)
$(SIX_LIBS)
:
$(CPYTHONLIB)
make
-C
six
make
-C
six
clapack
:
$(CPYTHONLIB)
$(CLAPACK)
:
$(CPYTHONLIB)
# We build BLAS/LAPACK only for target.
# We build BLAS/LAPACK only for target.
# On host we include -LCLAPACK-WA path which has no effect on host.
# 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
# On target it gets rewritten by pywasmcross to the full patch of
# blas_WA.bc, lapack_WA.bc which are linked statically in scipy
# blas_WA.bc, lapack_WA.bc which are linked statically in scipy
# in each module that needs them.
# in each module that needs them.
make
-C
$(LAPACK_DIR)
F2CLIBS/libf2c/
arith.h
make
-C
CLAPACK-WA/F2CLIBS/libf2c
arith.h
emmake make
-C
$(LAPACK_DIR)
emmake make
-C
CLAPACK-WA/
$(CLAPACK)
:
$(CPYTHONLIB)
$(CLAPACK)
:
$(CPYTHONLIB)
make
-C
CLAPACK
make
-C
CLAPACK
...
...
packages/scipy/meta.yaml
View file @
ccdadc6e
...
@@ -26,7 +26,7 @@ source:
...
@@ -26,7 +26,7 @@ source:
-
patches/fix_mmap.patch
-
patches/fix_mmap.patch
build
:
build
:
cflags
:
-I../../CLAPACK-WA/INCLUDE -Wno-implicit-function-declaration
cflags
:
-I../../
../../
CLAPACK-WA/INCLUDE -Wno-implicit-function-declaration
cxxflags
:
cxxflags
:
requirements
:
requirements
:
...
...
packages/scipy/patches/fix-blas.patch
View file @
ccdadc6e
commit
926f2e3cf302f2e04717675bb8e6cb77c1c9ee3d
commit
eba70f7602827851012acd1b836b5a56a3e70e32
Author: Roman Yurchak <rth.yurchak@pm.me>
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Mon Oct 8 10:53:11 2018 +0200
Date: Mon Oct 8 10:53:11 2018 +0200
Partial fixes for BLAS/LAPACK
Partial fixes for BLAS/LAPACK
diff --git a/scipy/linalg/setup.py b/scipy/linalg/setup.py
diff --git a/scipy/linalg/setup.py b/scipy/linalg/setup.py
index 2c9b9ba22..
f52f775d6
100755
index 2c9b9ba22..
6a0c4fa65
100755
--- a/scipy/linalg/setup.py
--- a/scipy/linalg/setup.py
+++ b/scipy/linalg/setup.py
+++ b/scipy/linalg/setup.py
@@ -14,7 +14,1
4
@@
def configuration(parent_package='', top_path=None):
@@ -14,7 +14,1
3
@@
def configuration(parent_package='', top_path=None):
config = Configuration('linalg', parent_package, top_path)
config = Configuration('linalg', parent_package, top_path)
- lapack_opt = get_info('lapack_opt')
- lapack_opt = get_info('lapack_opt')
+ # lapack_opt = get_info('lapack_opt')
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
+ 'libraries': [],
+ 'libraries': [],
+ 'include_dirs': [],
+ 'include_dirs': [],
+ 'library_dirs': ['../../CLAPACK-WA/'],
+ 'library_dirs': ['../../
../../
CLAPACK-WA/'],
+ 'language': '
c
',
+ 'language': '
f77
',
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ ('HAVE_CBLAS', None)]}
+ ('HAVE_CBLAS', None)]}
if not lapack_opt:
if not lapack_opt:
raise NotFoundError('no lapack/blas resources found')
raise NotFoundError('no lapack/blas resources found')
@@ -117,9 +12
4
,22 @@
def configuration(parent_package='', top_path=None):
@@ -117,9 +12
3
,22 @@
def configuration(parent_package='', top_path=None):
fnames = split_fortran_files(join(dirname, 'src', 'id_dist', 'src'),
fnames = split_fortran_files(join(dirname, 'src', 'id_dist', 'src'),
routines_to_split)
routines_to_split)
fnames = [join('src', 'id_dist', 'src', f) for f in fnames]
fnames = [join('src', 'id_dist', 'src', f) for f in fnames]
...
@@ -51,41 +50,38 @@ index 2c9b9ba22..f52f775d6 100755
...
@@ -51,41 +50,38 @@ index 2c9b9ba22..f52f775d6 100755
# _calc_lwork:
# _calc_lwork:
config.add_extension('_calc_lwork',
config.add_extension('_calc_lwork',
diff --git a/scipy/sparse/linalg/eigen/arpack/setup.py b/scipy/sparse/linalg/eigen/arpack/setup.py
diff --git a/scipy/sparse/linalg/eigen/arpack/setup.py b/scipy/sparse/linalg/eigen/arpack/setup.py
index a8175a9d5..
f7af2f0d9
100755
index a8175a9d5..
0fafd82b3
100755
--- a/scipy/sparse/linalg/eigen/arpack/setup.py
--- a/scipy/sparse/linalg/eigen/arpack/setup.py
+++ b/scipy/sparse/linalg/eigen/arpack/setup.py
+++ b/scipy/sparse/linalg/eigen/arpack/setup.py
@@ -11,7 +11,1
5
@@
def configuration(parent_package='',top_path=None):
@@ -11,7 +11,1
3
@@
def configuration(parent_package='',top_path=None):
config = Configuration('arpack',parent_package,top_path)
config = Configuration('arpack',parent_package,top_path)
- lapack_opt = get_info('lapack_opt')
- lapack_opt = get_info('lapack_opt')
+ # lapack_opt = get_info('lapack_opt')
+
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
+ 'libraries': [],
+ 'libraries': [],
+ 'include_dirs': [],
+ 'include_dirs': [],
+ 'library_dirs': ['../../CLAPACK-WA/'],
+ 'library_dirs': ['../../
../../
CLAPACK-WA/'],
+ 'language': '
c
',
+ 'language': '
f77
',
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ ('HAVE_CBLAS', None)]}
+ ('HAVE_CBLAS', None)]}
if not lapack_opt:
if not lapack_opt:
raise NotFoundError('no lapack/blas resources found')
raise NotFoundError('no lapack/blas resources found')
diff --git a/scipy/sparse/linalg/isolve/setup.py b/scipy/sparse/linalg/isolve/setup.py
diff --git a/scipy/sparse/linalg/isolve/setup.py b/scipy/sparse/linalg/isolve/setup.py
index becb9237a..
971e85b6b
100755
index becb9237a..
c9d4379b1
100755
--- a/scipy/sparse/linalg/isolve/setup.py
--- a/scipy/sparse/linalg/isolve/setup.py
+++ b/scipy/sparse/linalg/isolve/setup.py
+++ b/scipy/sparse/linalg/isolve/setup.py
@@ -11,7 +11,1
4
@@
def configuration(parent_package='',top_path=None):
@@ -11,7 +11,1
3
@@
def configuration(parent_package='',top_path=None):
config = Configuration('isolve',parent_package,top_path)
config = Configuration('isolve',parent_package,top_path)
- lapack_opt = get_info('lapack_opt')
- lapack_opt = get_info('lapack_opt')
+ # lapack_opt = get_info('lapack_opt')
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
+ 'libraries': [],
+ 'libraries': [],
+ 'include_dirs': [],
+ 'include_dirs': [],
+ 'library_dirs': ['../../CLAPACK-WA/'],
+ 'library_dirs': ['../../
../../
CLAPACK-WA/'],
+ 'language': '
c
',
+ 'language': '
f77
',
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ ('HAVE_CBLAS', None)]}
+ ('HAVE_CBLAS', None)]}
...
...
pyodide_build/pywasmcross.py
View file @
ccdadc6e
...
@@ -263,7 +263,8 @@ def handle_command(line, args, dryrun=False):
...
@@ -263,7 +263,8 @@ def handle_command(line, args, dryrun=False):
if
arg
.
startswith
(
'-L'
)
and
'CLAPACK-WA'
in
arg
:
if
arg
.
startswith
(
'-L'
)
and
'CLAPACK-WA'
in
arg
:
lapack_dir
=
arg
.
replace
(
'-L'
,
''
)
lapack_dir
=
arg
.
replace
(
'-L'
,
''
)
for
lib_name
in
[
'F2CLIBS/libf2c.bc'
,
for
lib_name
in
[
'F2CLIBS/libf2c.bc'
,
'blas_WA.bc'
,
'lapack_WA.bc'
]:
'blas_WA.bc'
,
'lapack_WA.bc'
]:
arg
=
os
.
path
.
join
(
lapack_dir
,
f"
{
lib_name
}
"
)
arg
=
os
.
path
.
join
(
lapack_dir
,
f"
{
lib_name
}
"
)
new_args
.
append
(
arg
)
new_args
.
append
(
arg
)
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment