Skip to content

Interfacing SPRAL with IPOPT #151

Description

@bharswami

I am trying to interface SPRAL with IPOPT. I am running into some issues with getting the right output for a simple optimization problem too. The sequence of function calls that are made in IpSpralSolverInterface.cpp is:

spral_ssids_analyse_ptr32(false, ndim_, NULL, ia, ja, val_, &akeep_, &control_, &info);
spral_ssids_factor_ptr32(false, ia, ja, val_, scaling_, akeep_, &fkeep_, &control_, &info);
spral_ssids_solve(0, nrhs, rhs_vals, ndim_, akeep_, fkeep_, &control_, &info);

This is different from the calls made in ssids.c that comes with SPRAL Git repository.

/* Perform analyse and factorise with data checking */
bool check = true;
spral_ssids_analyse(check, n, NULL, ptr, row, NULL, &akeep, &options,
      &inform);
if(inform.flag<0) {
   spral_ssids_free(&akeep, &fkeep);
   exit(1);
}
spral_ssids_factor(posdef, NULL, NULL, val, NULL, akeep, &fkeep, &options,
      &inform);
if(inform.flag<0) {
   spral_ssids_free(&akeep, &fkeep);
   exit(1);
}
/* Solve */
spral_ssids_solve1(0, x, akeep, fkeep, &options, &inform);
if(inform.flag<0) {
   spral_ssids_free(&akeep, &fkeep);
   exit(1);
}

Could someone please clarify as to which function calls are more appropriate?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions