Skip to content

Commit

Permalink
update hash C interface for preprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Gould committed Jan 13, 2025
1 parent cc07f2d commit dc5f3c6
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 112 deletions.
37 changes: 37 additions & 0 deletions src/glrt/glrtdt.output
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
MR = 00
MR = 00 glrt_solve_problem exit status = 0, f = -7.57
MR = 01
MR = 01 glrt_solve_problem exit status = 0, f = -3.34
MR = 10
MR = 10 glrt_solve_problem exit status = 0, f = -9.63
MR = 11

stopping tolerance = 1.0537E-07, sigma = 1.0000E+00

Iter objective pgnorm lambda gamma it info
0 0.00000000E+00 7.07E+00 - - - -
1 -7.56564165E+00 1.29E-01 1.84420637007342E+00 7.00E-02 2 0d
2 -7.56857169E+00 2.27E-02 1.84514276637603E+00 5.00E-01 3 0d
3 -7.56866504E+00 4.11E-03 1.84519734730030E+00 5.00E-01 2 0d
4 -7.56866811E+00 7.47E-04 1.84519998470893E+00 5.00E-01 2 0d
5 -7.56866821E+00 1.35E-04 1.84520009936154E+00 5.00E-01 2 0d
6 -7.56866821E+00 2.46E-05 1.84520010405336E+00 5.00E-01 2 0d
7 -7.56866821E+00 4.46E-06 1.84520010423805E+00 5.00E-01 2 0d
8 -7.56866821E+00 8.10E-07 1.84520010424513E+00 5.00E-01 2 0d
9 -7.56866821E+00 1.47E-07 1.84520010424513E+00 5.00E-01 1 0d
10 -7.56866821E+00 2.67E-08 1.84520010424513E+00 5.00E-01 1 0d

stopping tolerance = 1.4901E-07, sigma = 1.0000E+00

Iter objective pgnorm lambda gamma it info
0 0.00000000E+00 1.00E+01 - - - -
1 -9.61921723E+00 2.44E-01 1.74632172062310E+00 1.40E-01 2 0d
2 -9.62719764E+00 6.53E-02 1.74847790614645E+00 1.00E+00 3 0d
3 -9.62780907E+00 1.87E-02 1.74879664044715E+00 1.00E+00 3 0d
4 -9.62785977E+00 5.41E-03 1.74883686433044E+00 1.00E+00 2 0d
5 -9.62786401E+00 1.56E-03 1.74884138743299E+00 1.00E+00 2 0d
6 -9.62786436E+00 4.52E-04 1.74884186268817E+00 1.00E+00 2 0d
7 -9.62786439E+00 1.31E-04 1.74884191052577E+00 1.00E+00 2 0d
8 -9.62786439E+00 3.77E-05 1.74884191520131E+00 1.00E+00 2 0d
9 -9.62786439E+00 1.09E-05 1.74884191564860E+00 1.00E+00 2 0d
10 -9.62786439E+00 3.15E-06 1.74884191569070E+00 1.00E+00 2 0d
11 -9.62786439E+00 9.11E-07 1.74884191569462E+00 1.00E+00 2 0d
12 -9.62786439E+00 2.63E-07 1.74884191569462E+00 1.00E+00 1 0d
13 -9.62786439E+00 7.61E-08 1.74884191569462E+00 1.00E+00 1 0d
MR = 11 glrt_solve_problem exit status = 0, f = -5.02
10 changes: 5 additions & 5 deletions src/hash/C/hash_ciface.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! THIS VERSION: GALAHAD 4.1 - 2023-01-24 AT 09:30 GMT.
! THIS VERSION: GALAHAD 5.2 - 2025-01-13 AT 08:40 GMT.

#include "galahad_modules.h"
#include "galahad_cfunctions.h"
Expand Down Expand Up @@ -31,20 +31,20 @@ MODULE GALAHAD_HASH_ciface
! D e r i v e d t y p e d e f i n i t i o n s
!-------------------------------------------------

TYPE, BIND( C ) :: HASH_control_type
TYPE, BIND( C ) :: hash_control_type
INTEGER ( KIND = ipc_ ) :: error
INTEGER ( KIND = ipc_ ) :: out
INTEGER ( KIND = ipc_ ) :: print_level
LOGICAL ( KIND = C_BOOL ) :: space_critical
LOGICAL ( KIND = C_BOOL ) :: deallocate_error_fatal
CHARACTER ( KIND = C_CHAR ), DIMENSION( 31 ) :: prefix
END TYPE HASH_control_type
END TYPE hash_control_type

TYPE, BIND( C ) :: HASH_inform_type
TYPE, BIND( C ) :: hash_inform_type
INTEGER ( KIND = ipc_ ) :: status
INTEGER ( KIND = ipc_ ) :: alloc_status
CHARACTER ( KIND = C_CHAR ), DIMENSION( 81 ) :: bad_alloc
END TYPE HASH_inform_type
END TYPE hash_inform_type

!----------------------
! P r o c e d u r e s
Expand Down
14 changes: 7 additions & 7 deletions src/qpb/qpbdt.output
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

basic tests of qp storage formats

C: 10 iterations. Optimal objective value = 3.11 status = 0
R: 10 iterations. Optimal objective value = 3.11 status = 0
D: 10 iterations. Optimal objective value = 3.11 status = 0
L: 10 iterations. Optimal objective value = 3.11 status = 0
S: 10 iterations. Optimal objective value = 3.11 status = 0
I: 10 iterations. Optimal objective value = 3.11 status = 0
Z: 5 iterations. Optimal objective value = 1.00 status = 0
C: 10 iterations. Optimal objective value = 3.11 status = 0
R: 10 iterations. Optimal objective value = 3.11 status = 0
D: 10 iterations. Optimal objective value = 3.11 status = 0
L: 10 iterations. Optimal objective value = 3.11 status = 0
S: 10 iterations. Optimal objective value = 3.11 status = 0
I: 10 iterations. Optimal objective value = 3.11 status = 0
Z: 5 iterations. Optimal objective value = 1.00 status = 0
32 changes: 16 additions & 16 deletions src/rqs/rqsdt.output
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

basic tests of storage formats

format C : RQS_solve_problem exit status = 0, f = -1.12
format R : RQS_solve_problem exit status = 0, f = -1.12
format D : RQS_solve_problem exit status = 0, f = -1.12
format L : RQS_solve_problem exit status = 0, f = -0.93
format CM : RQS_solve_problem exit status = 0, f = -0.96
format RM : RQS_solve_problem exit status = 0, f = -0.96
format DM : RQS_solve_problem exit status = 0, f = -0.96
format LM : RQS_solve_problem exit status = 0, f = -0.16
format CA : RQS_solve_problem exit status = 0, f = -1.10
format RA : RQS_solve_problem exit status = 0, f = -1.10
format DA : RQS_solve_problem exit status = 0, f = -1.10
format LA : RQS_solve_problem exit status = 0, f = -0.11
format CMA: RQS_solve_problem exit status = 0, f = -0.95
format RMA: RQS_solve_problem exit status = 0, f = -0.95
format DMA: RQS_solve_problem exit status = 0, f = -0.95
format LMA: RQS_solve_problem exit status = 0, f = 0.17
format C : RQS_solve_problem exit status = 0, f = -4.31
format R : RQS_solve_problem exit status = 0, f = -4.31
format D : RQS_solve_problem exit status = 0, f = -4.31
format L : RQS_solve_problem exit status = 0, f = -1.87
format CM : RQS_solve_problem exit status = 0, f = -4.15
format RM : RQS_solve_problem exit status = 0, f = -4.15
format DM : RQS_solve_problem exit status = 0, f = -4.15
format LM : RQS_solve_problem exit status = 0, f = -0.72
format CA : RQS_solve_problem exit status = 0, f = -4.39
format RA : RQS_solve_problem exit status = 0, f = -4.39
format DA : RQS_solve_problem exit status = 0, f = -4.39
format LA : RQS_solve_problem exit status = 0, f = -0.52
format CMA: RQS_solve_problem exit status = 0, f = -4.11
format RMA: RQS_solve_problem exit status = 0, f = -4.11
format DMA: RQS_solve_problem exit status = 0, f = -4.11
format LMA: RQS_solve_problem exit status = 0, f = -0.16
84 changes: 0 additions & 84 deletions src/sbls/sblsdt.output
Original file line number Diff line number Diff line change
Expand Up @@ -9,87 +9,3 @@ L: residual = 7.0e-310 status = 0
S: residual = 7.0e-310 status = 0
I: residual = 7.0e-310 status = 0
Z: residual = 7.0e-310 status = 0

n = 3, m = 2
preconditioner = 2, factorization = 2, solver = ssids
augmented matrix used
preconditioner: G = H

Using SLS(ssids) to factorize the augmented matrix
SLS: analysis complete: status = 0, ordering = 7
K n = 5, nnz(prec,predicted factors) = 10, 15
SLS: factorization complete: status = 0, pivoting = 1
K nnz(prec,factors) = 10, 15
time to form and factorize explicit preconditioner 0.01

n = 3, m = 2
preconditioner = 2, factorization = 2, solver = ssids
augmented matrix used
preconditioner: G = H

Using SLS(ssids) to factorize the augmented matrix
SLS: analysis complete: status = 0, ordering = 7
K n = 5, nnz(prec,predicted factors) = 10, 15
SLS: factorization complete: status = 0, pivoting = 1
K nnz(prec,factors) = 10, 15
time to form and factorize explicit preconditioner 0.01

n = 3, m = 2
preconditioner = 2, factorization = 2, solver = ssids
augmented matrix used
preconditioner: G = H

Using SLS(ssids) to factorize the augmented matrix
SLS: analysis complete: status = 0, ordering = 7
K n = 5, nnz(prec,predicted factors) = 15, 15
SLS: factorization complete: status = 0, pivoting = 1
K nnz(prec,factors) = 15, 15
time to form and factorize explicit preconditioner 0.01

n = 3, m = 2
preconditioner = 2, factorization = 2, solver = ssids
augmented matrix used
preconditioner: G = H

Using SLS(ssids) to factorize the augmented matrix
SLS: analysis complete: status = 0, ordering = 7
K n = 5, nnz(prec,predicted factors) = 11, 15
SLS: factorization complete: status = 0, pivoting = 1
K nnz(prec,factors) = 11, 15
time to form and factorize explicit preconditioner 0.01

n = 3, m = 2
preconditioner = 2, factorization = 2, solver = ssids
augmented matrix used
preconditioner: G = H

Using SLS(ssids) to factorize the augmented matrix
SLS: analysis complete: status = 0, ordering = 7
K n = 5, nnz(prec,predicted factors) = 11, 15
SLS: factorization complete: status = 0, pivoting = 1
K nnz(prec,factors) = 11, 15
time to form and factorize explicit preconditioner 0.01

n = 3, m = 2
preconditioner = 2, factorization = 2, solver = ssids
augmented matrix used
preconditioner: G = H

Using SLS(ssids) to factorize the augmented matrix
SLS: analysis complete: status = 0, ordering = 7
K n = 5, nnz(prec,predicted factors) = 11, 15
SLS: factorization complete: status = 0, pivoting = 1
K nnz(prec,factors) = 11, 15
time to form and factorize explicit preconditioner 0.01

n = 3, m = 2
preconditioner = 2, factorization = 2, solver = ssids
augmented matrix used
preconditioner: G = H

Using SLS(ssids) to factorize the augmented matrix
SLS: analysis complete: status = 0, ordering = 7
K n = 5, nnz(prec,predicted factors) = 9, 15
SLS: factorization complete: status = 0, pivoting = 1
K nnz(prec,factors) = 9, 15
time to form and factorize explicit preconditioner 0.01

0 comments on commit dc5f3c6

Please sign in to comment.