Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zn_poly passes all tests on on Solaris 10 64-bit SPARC, but fails to install #9358

Closed
sagetrac-drkirkby mannequin opened this issue Jun 28, 2010 · 13 comments
Closed

Comments

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Jun 28, 2010

Hardware & associated software

  • Sun Blade 1000
  • 2 x 900 MHz UltraSPARC III+ CPUs
  • 2 GB RAM
  • 8 GB swap
  • Solaris 10 03/2005 (first release of Solaris 10)
  • 147 GB SEAGATE-ST3146807FC 2 Gbit/s 15,000 rpm fiber channel disk (FCAL)
  • UFS local file systems.
  • gcc 4.4.3 (uses Sun linker and assembler)
  • 64-bit build - SAGE64 was exported to "yes"

How GCC was configured

GCC can be configured several ways on Solaris. For Solaris 10 SPARC, use of both the Sun linker and Sun assembler are usually recommended, which is what was done here.

drkirkby@redstart:~$ gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: ../gcc-4.4.3/configure --prefix=/usr/local/gcc-4.4.3 --with-mpfr=/usr/local/gcc-4.4.3 --with-build-time-tools=/usr/ccs/bin --with-gmp=/usr/local/gcc-4.4.3 --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.4.3 (GCC)

The problem

znpoly passes about 40 self-tests, but fails to install properly.

zn_array_mulmid_fft()... ok
zn_array_mul_fft_dft()... ok
zn_array_invert()... ok

All tests passed.
gcc -O3 -g -m64 -fPIC -L. -I/export/home/drkirkby/sage-4.5.alpha0/local/include 
-I./include -DNDEBUG -o src/tuning.o -c src/tuning.c
In file included from ./include/zn_poly.h:75,
                 from ./include/zn_poly_internal.h:41,
                 from src/tuning.c:28:
./include/wide_arith.h:297:2: warning: #warning No assembly implementation of wi
de multiplication available for this machine; using generic C code instead.
ar -r libzn_poly.a src/array.o src/invert.o src/ks_support.o src/mulmid.o src/mu
lmid_ks.o src/misc.o src/mpn_mulmid.o src/mul.o src/mul_fft.o src/mul_fft_dft.o 
src/mul_ks.o src/nuss.o src/pack.o src/pmf.o src/pmfvec_fft.o src/tuning.o src/z
n_mod.o
ar: creating libzn_poly.a
ranlib libzn_poly.a
gcc -shared -m64  -Wl,-soname,libzn_poly-`cat VERSION`.so -o libzn_poly-`cat VER
SION`.so src/array.o src/invert.o src/ks_support.o src/mulmid.o src/mulmid_ks.o 
src/misc.o src/mpn_mulmid.o src/mul.o src/mul_fft.o src/mul_fft_dft.o src/mul_ks
.o src/nuss.o src/pack.o src/pmf.o src/pmfvec_fft.o src/tuning.o src/zn_mod.o -L
/export/home/drkirkby/sage-4.5.alpha0/local/lib -lgmp -lm
ld: warning: option -o appears more than once, first setting taken
ld: fatal: file libzn_poly-0.9.so: unknown file type
ld: fatal: File processing errors. No output written to libzn_poly-0.9.so
collect2: ld returned 1 exit status
make: *** [libzn_poly.so] Error 1
Error building zn_poly shared library.

real 1m38.825s
user 1m34.368s
sys 0m3.849s
sage: An error occurred while installing zn_poly-0.9.p4

This looks like a problem in spkg-install, which was written to consider two Solaris/64-bit releated possibilities.

  • A 64-bit build
  • A Solaris build with the Sun linker.

It does not cover the possibility of a 64-bit build on Solaris with the Sun linker. Clearly that was an oversight on my part.

Likely solution

This should be hopefully quite easy to fix. spkg-install needs to consider the possibility of a 64-bit Solaris build with the Sun linker.

CC: @jhpalmieri @jaapspies

Component: porting: Solaris

Author: David Kirkby

Reviewer: John Palmieri

Merged: sage-4.5.3.alpha1

Issue created by migration from https://trac.sagemath.org/ticket/9358

@sagetrac-drkirkby sagetrac-drkirkby mannequin added this to the sage-4.5.3 milestone Jun 28, 2010
@sagetrac-drkirkby sagetrac-drkirkby mannequin self-assigned this Jun 28, 2010
@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Jun 28, 2010

Attachment: zn_poly-0.9.p4.log

Log file of building on a Sun Blade 1000 SPARC (64-bit build)

@sagetrac-drkirkby

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:2

This also fails with a 64-bit build on fulvia (Solaris on x86), by the way.

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Aug 4, 2010

comment:3

Replying to @jhpalmieri:

This also fails with a 64-bit build on fulvia (Solaris on x86), by the way.

You do not surprise me.

I have a patch, but I'm working on improving spkg-install and spkg-check. Currently spkg-install runs a quick test suite with make check. That does not seem such a bad idea, so I'm not changing that. With SAGE_CHECK unset, this takes 46 seconds to build and run the quick test suite on my Sun Ultra 27 to build.

However, spkg-check currently runs the same test suite for a second time, which is clearly pointless. I'm changing spkg-check to run run the more extensive test suite. That increases the time to 7 minutes and 37 seconds on my 3.33 GHz Sun Ultra 27. That will probably close to hour on the Sun T5240 't2.math.washington.edu', so if you run with SAGE_CHECK=yes, bear that in mind.

Dave

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Aug 4, 2010

comment:4

Whilst looking at the zn_poly package, I found what I think is a serious flaw in the dependencies for the package - see #9681. I'd appreciate a second pair of eyes on that one.

Dave

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Aug 7, 2010

comment:5

A fix can now be found.

http://boxen.math.washington.edu/home/kirkby/patches/zn_poly-0.9.p5.spkg

A much more extensive test suite can now be run if SAGE_CHECK is exported to "yes".

Dave

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Aug 7, 2010

comment:6

Attachment: 9358-zn_poly.patch.gz

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Aug 7, 2010

Author: David Kirkby

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@jhpalmieri
Copy link
Member

comment:7

Looks good to me. Builds successfully on lots of different platforms with SAGE_CHECK='yes' including t2 (both 32- and 64-bit) and fulvia (32-bit, and according to SAGE_CHECK, 64-bit -- since I don't have a working 64-bit build because of maxima, it's hard to be positive).

@qed777
Copy link
Mannequin

qed777 mannequin commented Aug 15, 2010

Merged: sage-4.5.3.alpha0

@qed777 qed777 mannequin removed the s: positive review label Aug 15, 2010
@qed777 qed777 mannequin closed this as completed Aug 15, 2010
@qed777
Copy link
Mannequin

qed777 mannequin commented Aug 15, 2010

Changed merged from sage-4.5.3.alpha0 to sage-4.5.3.alpha1

@fchapoton

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants