Skip to content

Commit

Permalink
MUMPS runs fine - iterations show the same behavior as MA57 until MUM…
Browse files Browse the repository at this point in the history
…PS breaks
  • Loading branch information
zanellia committed Aug 23, 2022
1 parent f7341e1 commit bb7976f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/qrecipeSchur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int main( )
qrecipeSchur.getPrimalSolution(x3);
qrecipeSchur.getDualSolution(y3);

fprintf(stdFile, "Solved sparse problem (Schur complement approach) in %d iterations, %.3f seconds.\n", (int)nWSR, toc-tic);
fprintf(stdFile, "Solved sparse problem (Schur complement approach) in %d iterations, %.3f seconds.\n", (int)nWSR, toc-tic);

/* check distance of solutions */
errP1 = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion make_linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ endif
# If choice is not 'NONE', BLAS and LAPACK replacements must not be used
# USE_SOLVER = NONE
USE_SOLVER = MUMPS
# USE_SOLVER = MA57


ifeq ($(USE_SOLVER), MA57)
# LIB_SOLVER = ${MATLAB_LIBDIR}/libmwma57.so
Expand Down
19 changes: 16 additions & 3 deletions src/SparseSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,9 +1155,22 @@ MumpsSparseSolver::MumpsSparseSolver( ) : SparseSolver()
mumps_->icntl[1] = 0;
mumps_->icntl[2] = 0; //QUIETLY!
mumps_->icntl[3] = 0;
mumps_ptr_ = (void*) mumps_;


// these values are just copied from Ipopt: better values might exist
mem_percent_ = 1000;
mumps_permuting_scaling_ = 7;
mumps_pivot_order_ = 7;
mumps_scaling_ = 77;
mumps_dep_tol_ = 0.0;

// Reset all private data
initialized_ = false;
pivtol_changed_ = false;
refactorize_ = false;
have_symbolic_factorization_ = false;
mumps_ptr_ = (void*) mumps_;

}


Expand Down Expand Up @@ -1302,9 +1315,9 @@ returnValue MumpsSparseSolver::factorize( )

// dump_matrix(mumps_data);

MyPrintf("Calling MUMPS-1 for symbolic factorization.\n");
// MyPrintf("Calling MUMPS-1 for symbolic factorization.\n");
mumps_c(mumps_data);
MyPrintf("Done with MUMPS-1 for symbolic factorization.\n");
// MyPrintf("Done with MUMPS-1 for symbolic factorization.\n");
int error = mumps_data->info[0];
const int& mumps_permuting_scaling_used = mumps_data->infog[22];
const int& mumps_pivot_order_used = mumps_data->infog[6];
Expand Down

0 comments on commit bb7976f

Please sign in to comment.