Advanced Features

Kernel Routines

The SNOPT kernel routines live one level below the main subroutines snoptA, snoptB, and snoptC and expose additional input arguments in the subroutine calls.

For each solver call, there are 4 additional external arguments snLog, snLog2, sqLog, and snSTOP listed after the user-defined subroutines. Each of these arguments is an external subroutine. The first three subroutines can be used to customize the output logging routines for major SQP iterations, minor SQP iterations, and QP iterations, respectively. snSTOP is a subroutine that is called every major iteration of the SQP method and can be used to abort the run.

snSTOP

subroutine snSTOP
&   ( iAbort,
&     KTcond, mjrPrtlvl, minimize,
&     m, maxS, n, nb, nnCon0, nnCon, nnObj0, nnObj, nS,
&     itn, nMajor, nMinor, nSwap, nInfE, sInfE,
&     condZHZ, iObj, scaleObj, objAdd,
&     fObj, fMerit, penParm, step,
&     primalInf, dualInf, maxVi, maxViRel, hs,
&     neJ, nlocJ, locJ, indJ, Jcol, negCon,
&     scales, bl, bu, Fx, fCon, gCon, gObj,
&     yCon, pi, rc, rg, x,
&     cu, lencu, iu, leniu, ru, lenru,
&     cw, lencw, iw, leniw, rw, lenrw )

 logical
&     KTcond(2)
 integer
&     iAbort, iObj, itn,
&     lencu, lencw, leniu, leniw, lenru, lenrw,
&     mjrPrtlvl, minimize, m, maxS, n, nb, neJ, negCon, nlocJ,
&     nnCon0, nnCon, nnObj0, nnObj, nInfE,
&     nMajor, nMinor, nS, nSwap,
&     hs(nb), locJ(nlocJ), indJ(neJ), iu(leniu), iw(leniw)
 double precision
&     condZHZ, scaleObj, objAdd, fObj, fMerit, penParm(4),
&     maxViRel, maxVi, step, primalInf, dualInf, sInfE,
&     scales(nb), bl(nb), bu(nb), Fx(nnCon0),
&     fCon(nnCon0), gCon(negCon), gObj(nnObj0), Jcol(neJ), pi(m),
&     rc(nb), rg(maxS), yCon(nnCon0), x(nb), ru(lenru), rw(lenrw)
 character
&     cu(lencu)*8, cw(lencw)*8

The snSTOP subroutine is called every major iteration. snSTOP can be used to examine or print information at the current iteration. A nonzero value of iAbort will terminate SNOPT at this iteration. Otherwise, SNOPT continues until some termination criteria is met.