KNITRO 10.1.1

· KNITRO models/solves mixed-integer programming (MIP) models and mathematical programs with equilibrium constraints (MPEC) (see the KNITRO Documentation for details).

· KNITRO can use OpenMP (local host multi-processing) for some types of algorithms, as well as multistart and Parallel Finite-Difference Gradients. For more details see the KNITRO Documentation.

We are working on documentation of KNITRO OpenMP jobs. Please get in touch if you need details on KNITRO+OpenMP.

Using KNITRO on Wharton’s HPCC

Take a look at /usr/local/demo/optimization/knitro/, for some examples, a knitro.opt file (for setting your own options), etc.


KNITRO for Python is available for your use across the cluster. Just add /usr/local/knitro/examples/Python to your PYTHONPATH environment variable by adding the following to either in your job startup script, or globally in your ~/.bashrc file:

export PYTHONPATH=/usr/local/knitro/examples/Python:$PYTHONPATH

For further details:


The KnitroR library is available for your use across the cluster. Just import the library in your R code to use:


To test functionality, in R:

knitro(objective=function(x) x[1]*x[2], x0=c(1,1))

For further details:


KNITRO Matlab is available for your use across the cluster.

As of v9, the command to use it has changed to knitromatlab (from KNITRO) instead of ktrlink (from MATLAB). In theory it should work ‘out of the box’, but some of the knitro options may have changed (if you’re loading a knitro.opt file, or something), and there are a good number of expanded bits as well.

 To activate in your MATLAB, add the addpath (below) to one of the following:

  • matlab code
  • ~/Documents/MATLAB/startup.m
addpath /usr/local/knitro/knitromatlab

You can test functionality with the old test from Matlab, but substituting knitromatlab for ktrlink, like:

[x fval] = knitromatlab(@(x)cos(x),1)

For further details:


See the examples in /usr/local/knitro/examples/C or C++ or Java directories. For the C examples, just change the makefileKNDIR = /usr/local/knitro, and all should compile with a make.

For further details with C:

For further details with C++ & Java