ENH: tr_newton_bounded works on arrays of any array-API namespace, e.g. CuPy
arrays on a GPU: the iteration stays in the namespace and on the device of x0,
and only reduced scalars come to the host
ENH: Reduction reduces arrays of other namespaces completely in their own
namespace and returns the result on the host
ENH: gpu extra (CuPy); a GPU CI job tests the trust region on CuPy arrays
BUILD: Requires array-api-compat
BUG: Reduction recognizes CuPy arrays (whose class does not carry
__array_namespace__) as arrays of another namespace; before, they took the
NumPy path, where max/min failed and sum handed MPI a device buffer
BUG: The default Steihaug tolerance of tr_newton_bounded is measured relative to
the projected gradient at the first iterate, so it no longer depends on the units
of the objective; for gradients of order 1/N it had demanded a nearly exact
subproblem solve from the first iteration on
ENH: tr_newton_bounded(hessp_tol=True) passes the Steihaug tolerance to
hessp, so an inexactly evaluated Hessian product need only be as accurate as
the subproblem it serves
API: Requires Python 3.10 or later; support for Python 3.8 and 3.9 is
dropped
BUG: load_npy and save_npy failed for data in non-native byte order
(e.g. big-endian files) when mpi4py is installed; such files now load and
save with their data type preserved, like with numpy.load and numpy.save
BUG: load_npy and save_npy failed with mpi4py for data types the MPI
library does not provide (e.g. half precision with Ubuntu's Open MPI)
BUG: save_npy wrote the header length in native byte order, which
produced invalid files on big-endian machines
ENH: NuMPI.FFT with FFT engines that share the interface and conventions
of muGrid's FFTEngine (muGrid >= 1.6.0). NumpyFFTEngine runs serially
on 1D, 2D and 3D grids and needs only numpy; make_fft_engine returns it
for a single process and muGrid's engine for multiple processes, so codes
written for muGrid's FFTs run serially without muGrid installed.
ENH: Testing.Fixtures.MPITestFixture falls back to the MPI stub if mpi4py
is not installed, so downstream test suites no longer need their own
fallback; new serial_only marker for tests that must run on one process
BUILD: New fft extra installing muGrid (requires Python >= 3.10); muGrid
must be compiled with MPI support for parallel FFTs
ENH: Reduction (and with it the optimizers and Testing.Assertions)
accepts communicators that are not mpi4py's, such as muGrid's
Communicator, through a small protocol: allreduce(array, op) with op
one of "sum", "max", "min", compare, size and rank. mpi4py
communicators work as before; mpi4py is not needed for the new path.
API: Reduction.any and Reduction.all reduce as max/min over 0/1, which
every communicator supports, instead of logical or/and; results are unchanged.
ENH: The callback of l_bfgs_bounded can stop the optimization by
returning True, which ends it as successful; use it for a custom stopping
criterion
BUG: tr_newton_bounded kept iterating after it had converged whenever
every step was trust-region-limited (near-zero curvature along the
gradient), because the convergence test was skipped after a boundary-limited
step. It ran to maxiter and returned a result that depended on the
iteration budget.
ENH: Added the pickle-based (lowercase) object communication methods
gather, allgather, bcast, scatter, reduce and allreduce to the
MPI stub's Intracomm
BUG: load_npy no longer requires the subdomains to tile the global grid,
restoring partial (sub-region) reads that were rejected since v0.11.0
(closes #85). The tiling check is still enforced on save_npy, where gaps
or overlaps would corrupt the output file.
ENH: MPI-parallelized the bound constrained conjugate gradient with restart
(Polonsky & Keer 1999) and exposed it as
constrained_conjugate_gradients_with_restart; it now supports jac,
callback, arbitrary lower bounds and a communicator, matching the
without-restart variant
BUG: Fixed a 0 * inf = nan in the restart variant's conjugate-direction
update when the free set empties, and switched its convergence test to the
projected (KKT) residual so it converges on fully bound-active solutions