Check shared library (DLL/.so) of a compiled model.
checkDLL.RdCheck shared library (DLL/.so) of a compiled model and create a list of symbols.
Arguments
- func
character: name of the derivative function.
- jacfunc
an R function, that computes the Jacobian of the system of differential equations \(\partial\dot{y}_i/\partial y_j\), or a string giving the name of a function or subroutine in
dllnamethat computes the Jacobian.- dllname
a string giving the name of the shared library (without extension) that contains all the compiled function or subroutine definitions refered to in
funcandjacfunc.- initfunc
the name of the initialisation function (which initialises values of parameters), as provided in
dllname. See package vignette"compiledCode".- verbose
reserved for future extensions.
- nout
only used if
dllnameis specified and the model is defined in compiled code: the number of output variables calculated in the compiled functionfunc, present in the shared library. Note: it is not automatically checked whether this is indeed the number of output variables calculated in the dll - you have to perform this check in the code.- outnames
only used if
dllnameis specified andnout> 0: the names of output variables calculated in the compiled functionfunc, present in the shared library. These names will be used to label the output matrix.- JT
integer specifying the type of the Jacobian. The default value of 1 must be set to 2 for solver
lsodesif `func` is specified in a DLL or inline compiled and if a `jacfunc` is provided.
Details
The function checkDLL is normally called internally by the solver
functions. It can be used to avoid overhead, when a small compiled
model with a low number of integration steps is repeatedly called.
The feature is currently only available for the lsoda solver.
Value
List of class deSolve.symbols with:
- ModelInit
pointer to the init function of the DLL (class "externalptr").
- Func
pointer to the derivative function in the DLL (class "externalptr").
- JacFunc
pointer to the Jacobi function in the DLL (class "externalptr").
- Nglobal
number of output variables calculated in the compiled function.
- Nmtot
list of names of derivatives and output variables.