Commit Graph

29 Commits

Author SHA1 Message Date
Hood Chatham 73a5b29a6e
Fix scipy import failure #2338 (#2348) 2022-04-06 08:12:06 -07:00
Hood Chatham e865b77040
Fix scipy linking errors (#2289)
With newer versions of emscripten, linker errors surface eariler.
This makes it easier to find function pointer cast errors without
having to execute the bad code path -- the errors happen when the
wasm modules are linked (at load time in the browser)

Anyways, this fixes more linker errors. Mostly the problems have
to do with LAPACK functions that take string arguments. Most
LAPACK functions that take string arguments use them as enums and
only care about the first character of the string. Because of the
way that f2c works, we need to replace these strings with the ascii
code of the first character so we should replace:

sTRSV( 'UPPER', 'NOTRANS', 'NONUNIT', J, H, LDH, Y, 1 )
==>
CALL sTRSV( 85, 78, 78, J, H, LDH, Y, 1 )

where 85 and 78 are the ascii codes of U and N. Various character
variables are subbed into being integer variables. The two
functions `ilaenv` and `xerbla` expect actual C strings as an
argument, but it is very annoying to produce C strings so instead
I added wrapper functions ilaenvf2c and xerblaf2c to clapack and
instead of calling ilaenv and xerbla we call the f2c versions.
2022-03-23 23:17:29 -07:00
Hood Chatham c8f8718ad6
FIX scipy Templated_PyUFunc (#2109) 2022-01-16 12:30:42 -08:00
Hood Chatham 5309d21371
Update to Scipy 1.7.3 (#2065) 2022-01-03 23:07:13 +01:00
Roman Yurchak d175636851
Update to numpy 1.17.5 (#887) 2021-03-23 22:49:38 +01:00
Roman Yurchak 16fd8e4b91
MAINT Simplify scipy patches in make-int-return-values.patch (#1291) 2021-02-27 08:44:52 +01:00
Dexter Chua cce7b66b0d
Replace some scipy patches with sed (#1224) 2021-02-12 12:59:47 +01:00
Roman Yurchak e5672449f9
F2C, CLAPACK, scipy and numpy fixes for the upstream backend (#1193)
Co-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>
2021-02-05 10:54:12 +01:00
Dexter Chua e706dd4223
Document f2c patches (#1087) 2021-01-10 17:12:48 +08:00
joemarshall 6cc7f9c46d
Make f2c functions return int
This patch makes everything in numpy, scipy and CLAPACK that began life as a fortran subroutine return int, whereas before they were a smattering of void plus lots of int, with a bunch of conflicts where the same function was defined as int in some and void in others. This matters because on upstream emscripten, these packages will not build due to linker conflicts, as the wasm linker can't link a function returning int to a function returning void.

Annoyingly, this has to be int return not void, because whereas a normal fortran subroutine doesn't return anything, there's an obscure feature of fortran 77 called alternative returns which allows subroutines to say they want to return by jumping to some other place in the code. f2c handles this with integer return values.
2021-01-09 17:44:41 +08:00
Dexter Chua ac3f1a358e
Build C libraries with the Python build system (#1027) 2021-01-03 22:09:40 +01:00
Roman Yurchak 41b9ad1a7b
Remove threading patches and don't remove multiprocessing module (#796) 2020-11-22 11:25:36 +01:00
Roman Yurchak bcc4f6b521
MNT Clean-up root folder (#714)
* Move six

* Move jedi and parso

* Move lz4

* Move CLAPACK

* Move zlib and libxslt

* Move libiconv and libxml

* Remobe netlify/state.json and move remove_modules to cpython

* Move bumpversion.cfg to setup.cfg

* Reset cache

* Fix test_common.py
2020-07-08 16:58:10 +02:00
Roman Yurchak 6898c871f3
Add mmap module (#468) 2019-06-18 17:55:28 -07:00
Roman Yurchak 66fe5feb2c Better refactoring 2018-11-15 13:24:27 +01:00
Roman Yurchak d6bc94ef53 Refactor scipy tests 2018-11-15 13:24:27 +01:00
Roman Yurchak ead14ef33e More fixes 2018-11-15 13:22:36 +01:00
Roman Yurchak ccdadc6e93 Move CLAPACK_WA to the root folder 2018-11-15 13:22:36 +01:00
Roman Yurchak 3747c6dbeb Patch mmap 2018-11-15 13:22:36 +01:00
Roman Yurchak 7358049baa Skip scipy.optimize._cobyla missing import 2018-11-15 13:22:36 +01:00
Roman Yurchak 3e1d6348a7 Statically link BLAS/LAPACK 2018-11-15 13:22:36 +01:00
Roman Yurchak 9482984268 More patches for ellip_harm_2.pyx that uses ctypes 2018-11-15 13:22:36 +01:00
Roman Yurchak 862f257423 Use dummy threading + re-enable C++ files that failed due to a gloabl
namespace
2018-11-15 13:22:36 +01:00
Roman Yurchak 858e6e0a6e Re-enable scipy.interpolate._interpolate 2018-11-15 13:22:36 +01:00
Roman Yurchak 56e8a1767a Increase FuncCastEmulation NUM_PARAMS further 2018-11-15 13:22:36 +01:00
Roman Yurchak 27319bc675 Fix build in Docker 2018-11-15 13:22:36 +01:00
Roman Yurchak 3b906e4b68 More patches 2018-11-15 13:22:36 +01:00
Roman Yurchak ad94658e68 Force malloc 2018-11-15 13:22:36 +01:00
Roman Yurchak 40605620f8 Use scipy 0.17.1 2018-11-15 13:22:36 +01:00