Skip to content

Commit

Permalink
potential undefined variable bug in cohprods fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dalekopera committed Jan 19, 2024
1 parent efbfd8f commit 5534b9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/cutest_modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define CUTEST_KINDS_precision CUTEST_KINDS_half_64
#define CUTEST_precision CUTEST_half_64
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_half_64
#define CUTEST_iNTERFACE_precision CUTEST_INTERFACE_half_64
#define CUTEST_INTERFACE_precision CUTEST_INTERFACE_half_64
#define CUTEST_LQP_precision CUTEST_LQP_half_64
#else
#define CUTEST_KINDS_precision CUTEST_KINDS_half
Expand Down Expand Up @@ -62,7 +62,7 @@
#define CUTEST_KINDS_precision CUTEST_KINDS_double_64
#define CUTEST_precision CUTEST_double_64
#define CUTEST_PROBLEM_precision CUTEST_PROBLEM_double_64
#define CUTEST_iNTERFACE_precision CUTEST_INTERFACE_double_64
#define CUTEST_INTERFACE_precision CUTEST_INTERFACE_double_64
#define CUTEST_LQP_precision CUTEST_LQP_double_64
#else
#define CUTEST_KINDS_precision CUTEST_KINDS_double
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ PROGRAM CUTEST_test_main
ELSE
! only_print_small = .TRUE.
only_print_small = n <= 5 .AND. m <= 5
! only_print_small = n <= 100 .AND. m <= 100
only_print_small = n <= 100 .AND. m <= 100
END IF

IF ( m == 0 ) THEN
Expand Down
4 changes: 3 additions & 1 deletion src/tools/cohprods.f90
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ SUBROUTINE CUTEST_cohprods_threadsafe( data, work, status, n, goth, X, &
! set the indices for the nonzeros for the objective Hessian product

CALL CUTEST_cohprodsp( status, nnzohp, lohp, IND )

data%nnzohp = nnzohp
ELSE
nnzohp = data%nnzohp
END IF

! reset IUSED and W_ws to zero
Expand Down
2 changes: 1 addition & 1 deletion src/tools/cutest.F90
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ MODULE CUTEST_precision

TYPE, PUBLIC :: CUTEST_data_type
INTEGER ( KIND = ip_ ) :: n, ng, ng1, nel, nel1, ntotel, nvrels
INTEGER ( KIND = ip_ ) :: nnza, ngpvlu, nepvlu, ngng, out
INTEGER ( KIND = ip_ ) :: nnza, ngpvlu, nepvlu, ngng, nnzohp, out
INTEGER ( KIND = ip_ ) :: nvargp, nvar2, nnonnz, nbprod, ntotin
INTEGER ( KIND = ip_ ) :: lo, ch, lwork, la, lb, nobjgr, lu, ltypee
INTEGER ( KIND = ip_ ) :: ltypeg, lintre, lft, lepvlu, lstep, lstgp
Expand Down

0 comments on commit 5534b9d

Please sign in to comment.