Skip to content

Commit

Permalink
skip solve tests if factorize fails for sbls
Browse files Browse the repository at this point in the history
  • Loading branch information
dalekopera committed Feb 7, 2024
1 parent 51036b0 commit 29903fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/makedefs/intermediaries
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ make_sls_deps_single: make_dummy make_specfile make_sort make_zd11 \
make_smt make_svt make_space make_sils make_ma57 \
make_ma77 make_ma86 make_ma87 make_ma97 \
make_mc61 make_mc64 make_mc68 make_copyright \
make_spralrb make_amd make_ssids_dum
make_spralrb make_amd make_$(SSIDS)
# make_spralrb make_amd make_ssids_dum
make_sls_deps_double: make_dummy make_specfile make_sort make_zd11 \
make_smt make_svt make_space make_sils make_ma57 \
make_ma77 make_ma86 make_ma87 make_ma97 \
Expand Down
15 changes: 10 additions & 5 deletions src/sbls/sblst.F90
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ PROGRAM GALAHAD_SBLS_EXAMPLE

! control%print_level = 4
CALL SBLS_form_and_factorize( n, m, H, A, C, data, control, info )
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
IF ( info%status == 0 ) &
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
! write(6,"('x=', 2ES12.4)") X
IF ( info%status == 0 ) THEN
WRITE( 6, "( I5, I9, A9 )" ) &
Expand Down Expand Up @@ -763,7 +764,8 @@ PROGRAM GALAHAD_SBLS_EXAMPLE
control%sls_control%ordering = 7
OPEN( UNIT = scratch_out, STATUS = 'SCRATCH' )
CALL SBLS_form_and_factorize( n, m, H, A, C, data, control, info )
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
IF ( info%status == 0 ) &
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
CLOSE( UNIT = scratch_out )
IF ( info%status == 0 ) THEN
WRITE( 6, "( I5, I9, A9 )" ) &
Expand Down Expand Up @@ -815,7 +817,8 @@ PROGRAM GALAHAD_SBLS_EXAMPLE
! control%sls_control%ordering = 7
! control%unsymmetric_linear_solver = 'getr'
CALL SBLS_form_and_factorize( n, m, H, A, C, data, control, info )
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
IF ( info%status == 0 ) &
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
IF ( info%status == 0 ) THEN
WRITE( 6, "( I5, I9, A9 )" ) &
2, info%status, type_residual( info%norm_residual )
Expand Down Expand Up @@ -880,7 +883,8 @@ PROGRAM GALAHAD_SBLS_EXAMPLE
control%preconditioner = 2 ; control%factorization = 1
control%min_diagonal = 1.0_rp_
CALL SBLS_form_and_factorize( n, m, H, A, C, data, control, info )
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
IF ( info%status == 0 ) &
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
! ALLOCATE( SOL1( n + m ) )
! SOL1 = SOL
! WRITE( 6, "( ' solution ', /, ( 3ES24.16 ) )" ) SOL
Expand Down Expand Up @@ -934,7 +938,8 @@ PROGRAM GALAHAD_SBLS_EXAMPLE
control%preconditioner = 2 ; control%factorization = 3
control%min_diagonal = 1.0_rp_
CALL SBLS_form_and_factorize( n, m, H, A, C, data, control, info )
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
IF ( info%status == 0 ) &
CALL SBLS_solve( n, m, A, C, data, control, info, SOL )
! WRITE( 6, "( ' solution ', /, ( 3ES24.16 ) )" ) SOL
! WRITE(6,*) ' diff ', MAXVAL( ABS( SOL - SOL1 ) )
! WRITE( 25,"( ' solution ', /, ( 5ES24.16 ) )" ) SOL
Expand Down

0 comments on commit 29903fd

Please sign in to comment.