Skip to main content

Access to ECCO

The Economics Compute Cluster (ECCO) has migrated to the BioHPC environment, and accounts are not handled on this website anymore. See the BioHPC User Guide.

Latest Tweets

Error: Could not authenticate you.

Using Knitro on ECCO

Print Friendly, PDF & Email

Where to run knitro

We have a license for Knitro ( on ECCO. It only works on a single node (compute-0-8).

How to submit knitro jobs

Unlike for some other software, there's no "qknitro". Here's how to submit Knitro jobs:

  1. Write your Matlab-Knitro or Knitro job
  2. Write your qsub job (see generic instructions), but be certain to include
    module load matlab/(YOUR VERSION)
    module load knitro

    (this ensures that knitro can find its license, and its libraries)

  3. From the command line, submit to the 'knitro' queue:

    qsub [other parameters] -q knitro myjob.qsub
  4. You could add

    #PBS -q knitro

    to your qsub job and omit the -q knitro part

Complete example qsub

#PBS -l mem=32768mb
#PBS -l ncpus=4
#PBS -q knitro
source /etc/profile.d/
module load matlab/R2014b
module load knitro
matlab -nojvm -nodesktop -nosplash < test.m

You then should add the following code to your Matlab program test.m:

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

before invoking the knitro functions.


Occassionally, things break down. Some things you may be able to fix yourself, others you will need help.

  • Test with a simple call to knitro [ref]:

    [x fval] = knitromatlab(@(x)cos(x),1)
  • If the error message is something like this:

    Undefined function 'knitromatlab' for input arguments of type

    then you forgot to add the module load knitro commands, you are on the wrong server (did not submit to knitro queue), something else changed, etc. Check again. It means that Matlab cannot find the knitro functions.
  • If the output is like this:

    ### Could not find a valid license.
    Your machine ID is xx-xx-xx-xx-xx.
    Please contact or your local distributor to obtain a license.
    If you already have a license, please execute `get_machine_ID -v` and send the output to support.
    Failed to find a Ziena license.
    Fatal: KTR_set_int_param() passed NULL for knitro context pointer.
    Error using knitromatlab_mex
    KNITRO failed while attempting to set parameters.

    then you are on the right server, but forgot to do module load knitro
  • The correct output should be something like this

    Academic Ziena License (NOT FOR COMMERCIAL USE)
    KNITRO 9.0.1
    Ziena Optimization
    [snip] x =
    fval =

Changes of note

  • The function is no longer called ktrlink() !!
  • In previous versions of this setup on ECCO, you could omit the "addpath()" part. That is no longer true.