Skip to content

Commit

Permalink
double blunder for /cohprods corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
dalekopera committed Jan 19, 2024
1 parent 5534b9d commit 2d7f418
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 647 deletions.
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
31 changes: 17 additions & 14 deletions src/tools/cohprods.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! THIS VERSION: CUTEST 2.2 - 2023-11-12 AT 10:30 GMT.
! THIS VERSION: CUTEST 2.2 - 2024-01-17 AT 15:10 GMT.

#include "cutest_modules.h"
#include "cutest_routines.h"
Expand Down Expand Up @@ -56,7 +56,7 @@ END SUBROUTINE CUTEST_Cint_cohprods_r
! moden fortran version released in CUTEst, 29th October 2023

SUBROUTINE CUTEST_cohprods_r( status, n, goth, X, VECTOR, &
nnzohp, lohp, RESULT, IND )
nnzohp, lohp, RESULT, IND )
USE CUTEST_KINDS_precision
USE CUTEST_precision

Expand All @@ -80,9 +80,9 @@ SUBROUTINE CUTEST_cohprods_r( status, n, goth, X, VECTOR, &
! ---------------------------------------------------------------------------

CALL CUTEST_cohprods_threadsafe_r( CUTEST_data_global, &
CUTEST_work_global( 1 ), &
status, n, goth, X, VECTOR, &
nnzohp, lohp, RESULT, IND )
CUTEST_work_global( 1 ), &
status, n, goth, X, VECTOR, &
nnzohp, lohp, RESULT, IND )
RETURN

! end of subroutine CUTEST_cohprods_r
Expand All @@ -98,7 +98,7 @@ END SUBROUTINE CUTEST_cohprods_r
! moden fortran version released in CUTEst, 29th October 2023

SUBROUTINE CUTEST_cohprods_threaded_r( status, n, goth, X, VECTOR, &
nnzohp, lohp, RESULT, IND, thread )
nnzohp, lohp, RESULT, IND, thread )
USE CUTEST_KINDS_precision
USE CUTEST_precision

Expand Down Expand Up @@ -133,9 +133,9 @@ SUBROUTINE CUTEST_cohprods_threaded_r( status, n, goth, X, VECTOR, &
! evaluate using specified thread

CALL CUTEST_cohprods_threadsafe_r( CUTEST_data_global, &
CUTEST_work_global( thread ), &
status, n, goth, X, VECTOR, &
nnzohp, lohp, RESULT, IND )
CUTEST_work_global( thread ), &
status, n, goth, X, VECTOR, &
nnzohp, lohp, RESULT, IND )
RETURN

! end of subroutine CUTEST_cohprods_threaded_r
Expand All @@ -150,8 +150,9 @@ END SUBROUTINE CUTEST_cohprods_threaded_r
! History -
! moden fortran version released in CUTEst, 29th October 2023

SUBROUTINE CUTEST_cohprods_threadsafe_r( data, work, status, n, goth, X, &
VECTOR, nnzohp, lohp, RESULT, IND )
SUBROUTINE CUTEST_cohprods_threadsafe_r( data, work, status, n, goth, &
X, VECTOR, nnzohp, lohp, &
RESULT, IND )
USE CUTEST_KINDS_precision
USE CUTEST_precision

Expand Down Expand Up @@ -264,9 +265,11 @@ SUBROUTINE CUTEST_cohprods_threadsafe_r( data, work, status, n, goth, X, &

! set the indices for the nonzeros for the objective Hessian product

CALL CUTEST_cohprodsp_r( status, nnzohp, lohp, IND )

END IF
CALL CUTEST_cohprodsp_r( status, nnzohp, lohp, IND )
work%nnzohp = nnzohp
ELSE
nnzohp = work%nnzohp
END IF

! reset IUSED and W_ws to zero

Expand Down
Loading

0 comments on commit 2d7f418

Please sign in to comment.