onemkl linear solver doesn't have a default difference quotient jacobian?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 686
- Forks
- 167
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 17
Description
Hello again,
I finally was able to compile link and execute my model with the onemkl dense linear solver.
The problem now is that at initialization time I get this error
```
[CVLS ERROR] cvLsInitialize
No Jacobian constructor available for SUNMatrix type
[CVODE ERROR] cvInitialSetup
The linear solver's init routine failed.
```
I'm using the following initialization code:
```
/* Create dense SUNMatrix for use in linear solves */
A = SUNMatrix_OneMklDense(y_len, y_len, SUNMEMTYPE_DEVICE, memhelper, &s->qspccQueue, s->sunctx);
if (check_flag((void *)A, "SUNMatrix_OneMklDense", 0)) return s;
s->matrix = A; /* save for deallocation */
// Create the SUNLinearSolver object for use by CVode
LS = SUNLinSol_OneMklDense(s->y, A, s->sunctx);
if (check_flag((void *)LS, "SUNLinSol_OneMklDense", 0)) return s;
s->flag = CVodeSetLinearSolver(s->cvode_mem, LS, A);
if(check_flag(&s->flag, "CVodeSetLinearSolver", 1)) return s;
```
It looks like onemkldense solver doesn't have a default difference-quotient jacobian, like the standard dense/band/lapack solvers.
Is this true? Users are forced to provide a Jacobian through CVodeSetJacFn to use this solver?
As always thank you very much for your help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SUNMatrix_OneMklDense and SUNLinSol_OneMklDense entry points, then trace CVodeSetLinearSolver initialization and the CVodeSetJacFn path. Confirm whether this solver provides a default difference-quotient Jacobian like the standard dense, band, and LAPACK solvers; done means the behavior is established and the missing support is addressed if required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100