Julia's CUTEst Interface
Clone or download


CUTEst.jl: Julia's CUTEst Interface

This package provides an interface to CUTEst, a repository of constrained and unconstrained nonlinear programming problems for testing and comparing optimization algorithms, derived from the abstract model on NLPModels.

Stable release Github release DOI

  • Documentation: Documentation
  • Package Evaluator: CUTEst.jl CUTEst.jl
  • Chat: Gitter

Development version

  • Documentation: Documentation
  • Tests: Build Status Coverage Status


This package should detect your existing CUTEst installation, and will install its private version of CUTEst otherwise. The gfortran compiler is required. We currently do not support other Fortran compilers.

On OSX, Homebrew.jl will install gfortran if gfortran is not detected on your system. You may either use standard Homebrew to install gfortran yourself from precompiled bottled using brew install gcc or let Homebrew.jl install its private version. In the latter scenario, gcc and gfortran need to be compiled from source.

On Linux, you'll need to install wget and gfortran, and also make libgfortran.so visible by julia. See this page for how to install the requirements on some linux distributions.

The following commands download CUTEst, change to the specific branch, and build CUTEst.

julia> Pkg.add("CUTEst")


After installing, you can create instances of NLPModels models, with the name CUTEstModel:

using CUTEst

nlp = CUTEstModel("BYRDSPHR");

This model accepts the same functions as the other NLPModels, for instance

fx = obj(nlp, nlp.meta.x0)
gx = grad(nlp, nlp.meta.x0)
Hx = hess(nlp, nlp.meta.x0)

Run multiple models in parallel

First, decode each of the problems in serial.

function decodemodel(name)

broadcast(decodemodel, probs)

Then, call functions handling models in parallel. It is important to pass decode=false to CUTEstModel.

@everywhere using CUTEst
@everywhere function evalmodel(name)
   nlp = CUTEstModel(name; decode=false)
   retval = obj(nlp, nlp.meta.x0)

fvals = pmap(evalmodel, probs)

Related Packages

  • NLPModels.jl provides an AbstractModel from which CUTEst.jl derives, and other models deriving from it, such as MathProgNLPModel, which uses MathProgBase.jl, SimpleNLPModel, for user created functions, ADNLPModel with automatic differentiation, and SlackModel, which creates an equality constrained model with bounds on the variables from a given AbstractModel.
  • AmplNLReader.jl provides an interface to AMPL models based on NLPModels.jl.
  • OptimizationProblems.jl provides a collection of optimization problems in JuMP.jl syntax.