Differences between revisions 2 and 20 (spanning 18 versions)
Revision 2 as of 2020-04-11 19:25:38
Size: 1350
Editor: mkoeppe
Comment: Add notes on spkg-configure
Revision 20 as of 2020-04-17 00:42:59
Size: 9910
Editor: klee
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
The SageMath distribution continues to vendor versions of required software packages ("spkgs")
that work well together.
The SageMath distribution continues to vendor versions of required software packages ("SPKGs") that work well together.
Line 20: Line 19:
has made it possible to use many system packages provided by the OS distribution instead of building
SageMath's own copies. This so-called "spkg-configure" mechanism runs at the beginning of a build
from source, during the `./configure` phase.
has made it possible to '''use many system packages provided by the OS distribution''' instead of building
SageMath's own copies.
Line 24: Line 22:
Sage 9.1 is adding many packages to this mechanism. This so-called "spkg-configure" mechanism runs at the beginning of a build
from source, during the `./configure` phase.
Line 26: Line 25:
(See the sage-devel threads [[https://groups.google.com/d/msg/sage-devel/nTwhCV89FXE/_7GdzGy4BgAJ|"Brainstorming about Sage dependencies from system packages"]] (May 2017) and [[https://groups.google.com/d/msg/sage-devel/1at1p25IHnQ/ZHcpRjtQAwAJ|"conditionalise installation of many spkg's?"]] (Nov 2017) for its origins and [[https://trac.sagemath.org/ticket/24919|Trac #24919]] for its initial implementation.)
Line 27: Line 27:
Sage 9.1 is adding many packages to this mechanism, including `openblas`, `gsl`, `r`, `boost`, `libatomic`, `cddlib`, `tachyon`, `nauty`, `sqlite`, `planarity`, `fplll`, `brial`, `flintqs`, `ppl`, `libbraiding`, `cbc`, `gfan`, and `python3`. As to the latter, '''SageMath will now make use of a suitable installation of Python 3.7.x in your system by setting up a [[https://docs.python.org/3/library/venv.html|venv]]''' (Python 3 virtual environment).
Line 28: Line 29:
== Availability of Sage 9.1 in distributions == New in Sage 9.1 is also a '''database of system packages''' equivalent to our SPKGs. At the end of a `./configure` run, you will see messages like the following:

{{{
  configure: notice: the following SPKGs did not find equivalent system packages: arb boost boost_cropped bzip2 ... yasm zeromq zlib
  checking for the package system in use... debian
  configure: hint: installing the following system packages is recommended and may avoid building some of the above SPKGs from source:
  configure: $ sudo apt-get install libflint-arb-dev ... yasm libzmq3-dev libz-dev
  configure: After installation, re-run configure using:
  configure: $ ./config.status --recheck && ./config.status
}}}

=== For developers ===

For developers who wish to help improve the portability of SageMath, there is a new power tool: A '''tox configuration''' that automatically builds and tests SageMath within Docker containers running various Linux distributions (`ubuntu-trusty` through `-focal`, `debian-jessie` through `-sid`, `linuxmint-17` through `-19.3`, `fedora-26` through `-32`, `centos-7` and `-8`, `archlinux`, `slackware-14.2`), each in several configurations regarding what system packages are installed. Thus, it is no longer necessary for developers to have access to a machine running `fedora-29`, say, to verify whether the Sage distribution works there; instead, you just type:
{{{
  tox -e docker-fedora-29-standard -- build ptest
}}}
The `Dockerfile`s are generated automatically by using the same database of system packages that provides information to users. See the [[https://git.sagemath.org/sage.git/diff?id2=6a4580546f25fa62f38b3490e2d0120975371379&id=99aca39dea0226372a3f12aed3a13301a3380ff4|new section on "portability testing" in the Developer's Guide]] for details.

An entry point for developers who wish to improve the testing infrastructure is the [[https://trac.sagemath.org/ticket/29060|Meta-Ticket #29060: Add Dockerfiles and CI scripts for integration testing]]. See also the broader [[https://trac.sagemath.org/ticket/29133|Meta-Meta-Ticket #29133]].

== Add more here ==

(add more here)

== Easier installation of optional linear and mixed integer linear optimization backends ==

It is no longer necessary to recompile sagelib if you wish to use one of the state-of-the-art LP/MIP solvers COIN-OR CBC, CPLEX, or Gurobi, instead of the default (GLPK). The simplified new installation procedure is explained in the [[https://git.sagemath.org/sage.git/tree/src/doc/en/thematic_tutorials/linear_programming.rst?id=5fa32aa9f8acede36a665baf6b474af886c95956#n438|Thematic Tutorial on Linear Programming]].

(If you cannot update to 9.1 just yet, you can retroactively get the same feature in your installation of Sage too by pip-installing one of the packages [[https://github.com/mkoeppe/sage-numerical-backends-cplex|sage-numerical-backends-cplex]], [[https://github.com/mkoeppe/sage-numerical-backends-coin|sage-numerical-backends-coin]], [[https://github.com/mkoeppe/sage-numerical-backends-gurobi|sage-numerical-backends-gurobi]].)

== Polyhedral Geometry ==

There is now a catalog for common polyhedral cones, e.g.
{{{
sage: cones.nonnegative_orthant(5)
5-d cone in 5-d lattice N
}}}
New features for polyhedra:
{{{
sage: P = polytopes.cube(intervals='zero_one') # obtain others than the standard cube
sage: P = matrix([[0,1,0],[0,1,1],[1,0,0]])*P # linear transformations
sage: it = P.face_generator() # a (fast and efficient) face generator
sage: next(it)
A 3-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 8 vertices
sage: next(it)
A -1-dimensional face of a Polyhedron in ZZ^3
sage: f = next(it)
sage: f.normal_cone() # normal cone for faces
A 1-dimensional polyhedron in ZZ^3 defined as the convex hull of 1 vertex and 1 ray
sage: P.an_affine_basis() # an_affine_basis and a_maximal_chain
[A vertex at (0, 0, 0),
 A vertex at (1, 1, 0),
 A vertex at (0, 0, 1),
 A vertex at (0, 1, 0)]
sage: P = polytopes.hypercube(4)
sage: P.flag_f_vector(0,3) # flag_f_vector is exposed
64
}}}

Regarding the optional package `normaliz` there are some news as well:
{{{
sage: P = polytopes.cube(intervals=[[0,1],[0,2],[0,3]], backend='normaliz')
sage: save(P, '/tmp/this_takes_very_long_so_we_save_it') # saving works now
sage: sage: P.h_star_vector() # compute the h_star_vector with normaliz
[1, 20, 15]
}}}

There are also some bug fixes and other improvements. For more details see the [[https://trac.sagemath.org/wiki/SagePolyhedralGeometry#release_9.1|release notes for optimization and polyhedral geometry softwares interactions in Sage]].

== Improvements in the three.js 3D viewer ==

[[https://doc.sagemath.org/html/en/reference/plot3d/threejs.html|Three.js]] has become the default 3D viewer in SageMath 9.0. In this release, some improvements have been performed:

 * '''bug fixes:''' plot of vectors (Trac ticket [[https://trac.sagemath.org/ticket/29206|#29206]]), plot of a single text ([[https://trac.sagemath.org/ticket/29227|#29227]]), method ''plot3d'' transforming a 2D object into a 3D one ([[https://trac.sagemath.org/ticket/29251|#29251]])
 * '''code cleanup''' to prepare for camera viewpoint option ([[https://trac.sagemath.org/ticket/29250|#29250]])

== Integral curves over finite fields ==

A dream has come true! The integral curves over finite fields are now attached with the global function field machinery of Sage. This is a short tour:
{{{
sage: A.<x,y> = AffineSpace(GF(16),2)
sage: C = Curve(y^3 + x^3*y + x); C # Klein quartic
Affine Plane Curve over Finite Field in z4 of size 2^4 defined by x^3*y + y^3 + x
sage: C.function_field()
Function field in y defined by y^3 + x^3*y + x
sage: C.genus()
3
sage: C.closed_points()
[Point (x, y),
 Point (x + (z4), y + (z4^3 + z4^2)),
 Point (x + (z4^2), y + (z4^3 + z4^2 + z4 + 1)),
 Point (x + (z4^3), y + (z4^2 + z4)),
 Point (x + (z4 + 1), y + (z4^3 + z4)),
 Point (x + (z4^2 + z4), y + (z4^2 + z4 + 1)),
 Point (x + (z4^2 + z4), y + (z4^3 + 1)),
 Point (x + (z4^2 + z4), y + (z4^3 + z4^2 + z4)),
 Point (x + (z4^3 + z4^2), y + (z4^2 + z4 + 1)),
 Point (x + (z4^2 + 1), y + (z4^3)),
 Point (x + (z4^3 + z4), y + (z4^2 + z4 + 1)),
 Point (x + (z4^2 + z4 + 1), y + (z4^2 + z4)),
 Point (x + (z4^2 + z4 + 1), y + (z4^3 + z4 + 1)),
 Point (x + (z4^2 + z4 + 1), y + (z4^3 + z4^2 + 1)),
 Point (x + (z4^3 + z4^2 + z4 + 1), y + (z4^2 + z4))]
sage: p1, p2 = _[:2]
sage: P1 = p1.place()
sage: P2 = p2.place()
sage: D = 5 * P1 - P2
sage: D.basis_function_space() # Riemann-Roch space
[(x + z4)/x, 1/x^2*y + (z4^2 + z4)/x]
sage: D.dimension()
2
sage: f1, f2 = D.basis_function_space()
[(x + z4)/x, 1/x^2*y + (z4^2 + z4)/x]
sage: f1.zeros()
[Place (x + z4, y^2 + (z4^3 + z4^2)*y + z4^2 + z4 + 1),
 Place (x + z4, y + z4^3 + z4^2)]
sage: Q1, Q2 = _
sage: q1 = C.place_to_closed_point(Q1); q1
Point (y^2 + (z4^3 + z4^2)*y + (z4^2 + z4 + 1), x + (z4))
sage: q1.degree()
2
sage: q1 = C.place_to_closed_point(Q1); q1
Point (y^2 + (z4^3 + z4^2)*y + (z4^2 + z4 + 1), x + (z4))
sage: q1.degree()
2
sage: q2 = C.place_to_closed_point(Q2)
sage: q2.degree()
1
sage: q2.rational_point()
(z4, z4^3 + z4^2)
sage: _ in C
True
}}}

== Add more here ==

(add more here)

== Availability of Sage 9.1 and installation help ==

Sage 9.1 has not been released yet. See [[https://groups.google.com/forum/#!forum/sage-release|sage-release]] for announcements of beta versions and release candidates.

=== Availability in distributions ===
Line 32: Line 176:
=== Installation FAQ ===

See [[https://groups.google.com/forum/#!forum/sage-release|sage-release]], [[https://groups.google.com/forum/#!forum/sage-devel|sage-devel]].
Line 34: Line 182:
- Release announcements: See https://groups.google.com/forum/#!forum/sage-release

Sage 9.1 Release Tour

in progress (2020)

Python 3 transition

SageMath 9.0 was the first version of Sage running on Python 3 by default. Sage 9.1 continues to support Python 2.

See Python3-Switch for more details

Portability improvements, increased use of system packages

The SageMath distribution continues to vendor versions of required software packages ("SPKGs") that work well together.

In order to reduce compilation times and the size of the SageMath installation, a development effort ongoing since the 8.x release series has made it possible to use many system packages provided by the OS distribution instead of building SageMath's own copies.

This so-called "spkg-configure" mechanism runs at the beginning of a build from source, during the ./configure phase.

(See the sage-devel threads "Brainstorming about Sage dependencies from system packages" (May 2017) and "conditionalise installation of many spkg's?" (Nov 2017) for its origins and Trac #24919 for its initial implementation.)

Sage 9.1 is adding many packages to this mechanism, including openblas, gsl, r, boost, libatomic, cddlib, tachyon, nauty, sqlite, planarity, fplll, brial, flintqs, ppl, libbraiding, cbc, gfan, and python3. As to the latter, SageMath will now make use of a suitable installation of Python 3.7.x in your system by setting up a venv (Python 3 virtual environment).

New in Sage 9.1 is also a database of system packages equivalent to our SPKGs. At the end of a ./configure run, you will see messages like the following:

  configure: notice: the following SPKGs did not find equivalent system packages: arb boost boost_cropped bzip2 ... yasm zeromq zlib
  checking for the package system in use... debian
  configure: hint: installing the following system packages is recommended and may avoid building some of the above SPKGs from source:
  configure:   $ sudo apt-get install libflint-arb-dev ... yasm libzmq3-dev libz-dev
  configure: After installation, re-run configure using:
  configure:   $ ./config.status --recheck && ./config.status

For developers

For developers who wish to help improve the portability of SageMath, there is a new power tool: A tox configuration that automatically builds and tests SageMath within Docker containers running various Linux distributions (ubuntu-trusty through -focal, debian-jessie through -sid, linuxmint-17 through -19.3, fedora-26 through -32, centos-7 and -8, archlinux, slackware-14.2), each in several configurations regarding what system packages are installed. Thus, it is no longer necessary for developers to have access to a machine running fedora-29, say, to verify whether the Sage distribution works there; instead, you just type:

  tox -e docker-fedora-29-standard -- build ptest

The Dockerfiles are generated automatically by using the same database of system packages that provides information to users. See the new section on "portability testing" in the Developer's Guide for details.

An entry point for developers who wish to improve the testing infrastructure is the Meta-Ticket #29060: Add Dockerfiles and CI scripts for integration testing. See also the broader Meta-Meta-Ticket #29133.

Add more here

(add more here)

Easier installation of optional linear and mixed integer linear optimization backends

It is no longer necessary to recompile sagelib if you wish to use one of the state-of-the-art LP/MIP solvers COIN-OR CBC, CPLEX, or Gurobi, instead of the default (GLPK). The simplified new installation procedure is explained in the Thematic Tutorial on Linear Programming.

(If you cannot update to 9.1 just yet, you can retroactively get the same feature in your installation of Sage too by pip-installing one of the packages sage-numerical-backends-cplex, sage-numerical-backends-coin, sage-numerical-backends-gurobi.)

Polyhedral Geometry

There is now a catalog for common polyhedral cones, e.g.

sage: cones.nonnegative_orthant(5)
5-d cone in 5-d lattice N

New features for polyhedra:

sage: P = polytopes.cube(intervals='zero_one') # obtain others than the standard cube
sage: P = matrix([[0,1,0],[0,1,1],[1,0,0]])*P  # linear transformations
sage: it = P.face_generator()                  # a (fast and efficient) face generator
sage: next(it)
A 3-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 8 vertices
sage: next(it)
A -1-dimensional face of a Polyhedron in ZZ^3
sage: f = next(it)
sage: f.normal_cone()                          # normal cone for faces
A 1-dimensional polyhedron in ZZ^3 defined as the convex hull of 1 vertex and 1 ray
sage: P.an_affine_basis()                      # an_affine_basis and a_maximal_chain
[A vertex at (0, 0, 0),
 A vertex at (1, 1, 0),
 A vertex at (0, 0, 1),
 A vertex at (0, 1, 0)]
sage: P = polytopes.hypercube(4)
sage: P.flag_f_vector(0,3)                     # flag_f_vector is exposed
64

Regarding the optional package normaliz there are some news as well:

sage: P = polytopes.cube(intervals=[[0,1],[0,2],[0,3]], backend='normaliz')
sage: save(P, '/tmp/this_takes_very_long_so_we_save_it')   # saving works now
sage: sage: P.h_star_vector()                              # compute the h_star_vector with normaliz
[1, 20, 15]

There are also some bug fixes and other improvements. For more details see the release notes for optimization and polyhedral geometry softwares interactions in Sage.

Improvements in the three.js 3D viewer

Three.js has become the default 3D viewer in SageMath 9.0. In this release, some improvements have been performed:

  • bug fixes: plot of vectors (Trac ticket #29206), plot of a single text (#29227), method plot3d transforming a 2D object into a 3D one (#29251)

  • code cleanup to prepare for camera viewpoint option (#29250)

Integral curves over finite fields

A dream has come true! The integral curves over finite fields are now attached with the global function field machinery of Sage. This is a short tour:

sage: A.<x,y> = AffineSpace(GF(16),2)
sage: C = Curve(y^3 + x^3*y + x); C  # Klein quartic
Affine Plane Curve over Finite Field in z4 of size 2^4 defined by x^3*y + y^3 + x
sage: C.function_field()
Function field in y defined by y^3 + x^3*y + x
sage: C.genus()
3
sage: C.closed_points()
[Point (x, y),
 Point (x + (z4), y + (z4^3 + z4^2)),
 Point (x + (z4^2), y + (z4^3 + z4^2 + z4 + 1)),
 Point (x + (z4^3), y + (z4^2 + z4)),
 Point (x + (z4 + 1), y + (z4^3 + z4)),
 Point (x + (z4^2 + z4), y + (z4^2 + z4 + 1)),
 Point (x + (z4^2 + z4), y + (z4^3 + 1)),
 Point (x + (z4^2 + z4), y + (z4^3 + z4^2 + z4)),
 Point (x + (z4^3 + z4^2), y + (z4^2 + z4 + 1)),
 Point (x + (z4^2 + 1), y + (z4^3)),
 Point (x + (z4^3 + z4), y + (z4^2 + z4 + 1)),
 Point (x + (z4^2 + z4 + 1), y + (z4^2 + z4)),
 Point (x + (z4^2 + z4 + 1), y + (z4^3 + z4 + 1)),
 Point (x + (z4^2 + z4 + 1), y + (z4^3 + z4^2 + 1)),
 Point (x + (z4^3 + z4^2 + z4 + 1), y + (z4^2 + z4))]
sage: p1, p2 = _[:2]
sage: P1 = p1.place()
sage: P2 = p2.place()
sage: D = 5 * P1 - P2
sage: D.basis_function_space()  # Riemann-Roch space
[(x + z4)/x, 1/x^2*y + (z4^2 + z4)/x]
sage: D.dimension()
2
sage: f1, f2 = D.basis_function_space()
[(x + z4)/x, 1/x^2*y + (z4^2 + z4)/x]
sage: f1.zeros()
[Place (x + z4, y^2 + (z4^3 + z4^2)*y + z4^2 + z4 + 1),
 Place (x + z4, y + z4^3 + z4^2)]
sage: Q1, Q2 = _
sage: q1 = C.place_to_closed_point(Q1); q1
Point (y^2 + (z4^3 + z4^2)*y + (z4^2 + z4 + 1), x + (z4))
sage: q1.degree()
2
sage: q1 = C.place_to_closed_point(Q1); q1
Point (y^2 + (z4^3 + z4^2)*y + (z4^2 + z4 + 1), x + (z4))    
sage: q1.degree()
2
sage: q2 = C.place_to_closed_point(Q2)
sage: q2.degree()
1
sage: q2.rational_point()
(z4, z4^3 + z4^2)
sage: _ in C
True

Add more here

(add more here)

Availability of Sage 9.1 and installation help

Sage 9.1 has not been released yet. See sage-release for announcements of beta versions and release candidates.

Availability in distributions

(TBD)

Installation FAQ

See sage-release, sage-devel.

More details

- Trac tickets with milestone 9.1