#11705: Port Sage to SUSE Linux Power 7 (ppc64).
---------------------------------------------------+------------------------
Reporter: was | Owner: drkirkby
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.0
Component: porting | Resolution:
Keywords: sd32 sd35.5 | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Paul Zimmermann, Jeroen Demeyer | Merged in:
Dependencies: #12829, #12832 | Stopgaps:
---------------------------------------------------+------------------------
Comment (by leif):
Replying to [comment:104 zimmerma]:
> Leif, if you make a patch for mulredc1.asm, maybe I could figure out
what is needed in the m4
> generating file.
I've attached [http://trac.sagemath.org/sage_trac/raw-
attachment/ticket/11705/GMP-ECM_PPC64_ELF_function_descriptors.patch a
patch] to the three `.asm` / `.m4` files all PPC64 assembly files are
generated from. (FWIW, also applies clean to GMP-ECM 6.4.2.)
While the original files seem partially over-autoconf'd to me (e.g.
`TEXT`, defined in `config.m4` after `configure`), I've currently
"hardcoded" the ELF function descriptors, i.e., haven't used new macros
for them at all. Even if GMP-ECM currently only supports systems ''using
ELF'' on PPC64 (I think; Darwin PPC is 32-bit, and `asm-redc` is disabled
on it, although it IMHO wouldn't have to be), one could at least write
some `m4` macros for [PowerPC] ELF![64] for convenience and put them into
(e.g.) `powerpc64/elf.m4`, then probably only "enable" them if `configure`
determines it's an ELF system. (I didn't want to mess with the `autoconf`
files anyway.)
One could also add some debugging info to the functions, i.e. traceback
tables.
I haven't changed the broken indentation of `redc.asm`, to keep the patch
small and readable.
[[BR]]
A preliminary GMP-ECM 6.3.p8 spkg (applying my patches) is
[http://boxen.math.washington.edu/home/leif/Sage/spkgs/ecm-6.3.p8.spkg
here]. Note that it is based on the p7 from #12830, which still needs
review.
=== Patches ===
* ...
* mulredc.m4.patch, mulredc_1_2.m4.patch:
Add function descriptors to PPC64 assembler code to support dynamic
linking.
(Even with a static `libecm.a`, Sage segfaulted with `--enable-asm-
redc` on
Linux PPC64, because the [static] GMP-ECM library gets linked into a
shared
library, namely the Python extension module "libecm".)
We patch the two `m4` files the twenty `.asm` files (in
`src/powerpc64/`)
are generated from; the latter are again macroprocessor files from
which the
(only temporary) real assembly files ( `.s`) are created during build.
* redc.asm.patch:
Also add a function descriptor here, although apparently this code
isn't
used by Sage, nor GMP-ECM's test suite, at least not currently (as of
GMP-ECM 6.3 / ecm-6.3.p8). (The function it provides is
`ecm_redc3()`.)
=== ecm-6.3.p8 (Leif Leonhardy, April 24th 2012) ===
* #12830: Add patches to `src/powerpc64/{mulredc,mulredc_1_2}.m4` to
support
dynamic linking, otherwise the Python extension module "libecm"
segfaults
with `--enable-asm-redc` on [Linux] PPC64, regardless of whether we
build a
shared and/or static GMP-ECM library.
For consistency, also patch `src/powerpc64/redc.asm` in the same way,
al-
though it doesn't seem that this code was currently used.
(See also the Linux PPC64 meta-ticket #11705.)
I've only tested it on Silius, with `--enable-shared` and `--disable-
shared` (`--enable-asm-redc` is the default), with Sage 5.0.beta9 (plus
some replacement spkgs and #12829) and GCC 4.6.3, FWIW.
Perhaps François could test the attached patch with vanilla GMP-ECM on
AIX.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11705#comment:105>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.