Skip to content

Commit

Permalink
Fix Fortran integer issue coin-or#121
Browse files Browse the repository at this point in the history
  • Loading branch information
apotschka committed Jun 9, 2021
1 parent 3a57d04 commit 268b2f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/SparseSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,8 @@ returnValue Ma57SparseSolver::factorize( )
* Call MA57AD for symbolic factorization *
******************************************/

fint_t lkeep_ma57 = 5*dim + numNonzeros + getMax(numNonzeros,dim) + 42;
fint_t max_nnz = numNonzeros > dim ? numNonzeros : dim;
fint_t lkeep_ma57 = 5*dim + numNonzeros + max_nnz + 42;
fint_t *keep_ma57 = new fint_t[lkeep_ma57];
fint_t *iwork_ma57 = new fint_t[5*dim];

Expand Down Expand Up @@ -806,7 +807,7 @@ returnValue Ma57SparseSolver::factorize( )
fact_ma57 = new double[lfact_ma57];

lifact_ma57 = (fint_t)(lfact_factor * (double)(info_ma57[9]));
ifact_ma57 = new int_t[lifact_ma57];
ifact_ma57 = new fint_t[lifact_ma57];

/*******************************************
* Call MA57BD for numerical factorization *
Expand Down

0 comments on commit 268b2f2

Please sign in to comment.