Skip to content

Commit

Permalink
Fix the compilation of the tests in 64-bit integer
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Aug 28, 2024
1 parent 7081ed6 commit 4ff9919
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/test/ctest.F90
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ PROGRAM CUTEST_test_constrained_tools

WRITE( out, "( ' CALL CUTEST_csetup ' )" )
CALL CUTEST_csetup_r( status, input, out, buffer, n, m, X, X_l, X_u, &
Y, C_l, C_u, EQUATION, LINEAR, 1, 1, 1 )
Y, C_l, C_u, EQUATION, LINEAR, 1_ip_, 1_ip_, 1_ip_ )
IF ( status /= 0 ) GO TO 900
CALL WRITE_X( out, n, X, X_l, X_u )
CALL WRITE_Y( out, m, Y, C_l, C_u, EQUATION, LINEAR )
Expand Down Expand Up @@ -876,7 +876,7 @@ PROGRAM CUTEST_test_constrained_tools

WRITE( out, "( ' CALL CUTEST_csetup ' )" )
CALL CUTEST_csetup_r( status, input, out, buffer, n, m, X, X_l, X_u, &
Y, C_l, C_u, EQUATION, LINEAR, 1, 1, 1 )
Y, C_l, C_u, EQUATION, LINEAR, 1_ip_, 1_ip_, 1_ip_ )
IF ( status /= 0 ) GO TO 900

! ... and terminal exit
Expand Down
2 changes: 1 addition & 1 deletion src/test/ctest2.F90
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ PROGRAM CUTEST_test_constrained_tools

WRITE( out, "( ' CALL CUTEST_csetup ' )" )
CALL CUTEST_csetup_r( status, input, out, buffer, n, m, X, X_l, X_u, &
Y, C_l, C_u, EQUATION, LINEAR, 1, 1, 1 )
Y, C_l, C_u, EQUATION, LINEAR, 1_ip_, 1_ip_, 1_ip_ )
IF ( status /= 0 ) GO TO 900
CALL WRITE_X( out, n, X, X_l, X_u )
CALL WRITE_Y( out, m, Y, C_l, C_u, EQUATION, LINEAR )
Expand Down
4 changes: 2 additions & 2 deletions src/test/ctest_threaded.F90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ PROGRAM CUTEST_test_constrained_tools
WRITE( out, "( ' CALL CUTEST_csetup ' )" )
CALL CUTEST_csetup_threaded_r( status, input, out, threads, BUFFER, &
n, m, X, X_l, X_u, &
Y, C_l, C_u, EQUATION, LINEAR, 1, 1, 1 )
Y, C_l, C_u, EQUATION, LINEAR, 1_ip_, 1_ip_, 1_ip_ )
IF ( status /= 0 ) GO to 900
CALL WRITE_X( out, n, X, X_l, X_u )
CALL WRITE_Y( out, m, Y, C_l, C_u, EQUATION, LINEAR )
Expand Down Expand Up @@ -826,7 +826,7 @@ PROGRAM CUTEST_test_constrained_tools
! calls and time report

! WRITE( out, "( ' CALL CUTEST_creport for thread 1' )" )
! CALL CUTEST_creport_threaded_r( status, CALLS, CPU, 1 )
! CALL CUTEST_creport_threaded_r( status, CALLS, CPU, 1_ip_ )
! WRITE( out, "( ' CALLS(1-7) =', 7( 1X, I0 ) )" ) INT( CALLS( 1 : 7 ) )
! WRITE( out, "( ' CPU(1-4) =', 4F7.2 )" ) CPU( 1 : 4 )

Expand Down
12 changes: 6 additions & 6 deletions src/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ cutest_tests += [['cutest', 'single', 'ctest_single' , files('ctest.F90'
['cutest', 'double', 'utest_threaded_double', files('utest_threaded.F90', 'u_elfun_double.f', 'u_group_double.f', 'u_range_double.f')]]

# u_elfun_quadruple.f is missing in src/test
# if build_quadruple
# cutest_tests += [['cutest', 'quadruple', 'ctest_quadruple' , files('ctest.F90' , 'c_elfun_quadruple.f', 'c_group_quadruple.f', 'c_range_quadruple.f')],
# ['cutest', 'quadruple', 'ctest_threaded_quadruple', files('ctest_threaded.F90', 'c_elfun_quadruple.f', 'c_group_quadruple.f', 'c_range_quadruple.f')],
# ['cutest', 'quadruple', 'utest_quadruple' , files('utest.F90' , 'u_elfun_quadruple.f', 'u_group_quadruple.f', 'u_range_quadruple.f')],
# ['cutest', 'quadruple', 'utest_threaded_quadruple', files('utest_threaded.F90', 'u_elfun_quadruple.f', 'u_group_quadruple.f', 'u_range_quadruple.f')]]
# endif
if build_quadruple
cutest_tests += [['cutest', 'quadruple', 'ctest_quadruple' , files('ctest.F90' , 'c_elfun_quadruple.f', 'c_group_quadruple.f', 'c_range_quadruple.f')],
['cutest', 'quadruple', 'ctest_threaded_quadruple', files('ctest_threaded.F90', 'c_elfun_quadruple.f', 'c_group_quadruple.f', 'c_range_quadruple.f')]]
# ['cutest', 'quadruple', 'utest_quadruple' , files('utest.F90' , 'u_elfun_quadruple.f', 'u_group_quadruple.f', 'u_range_quadruple.f')],
# ['cutest', 'quadruple', 'utest_threaded_quadruple', files('utest_threaded.F90', 'u_elfun_quadruple.f', 'u_group_quadruple.f', 'u_range_quadruple.f')]]
endif
3 changes: 2 additions & 1 deletion src/test/utest.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ PROGRAM CUTEST_test_unconstrained_tools
INTEGER ( KIND = ip_ ) :: i, n, HE_nel, HE_val_ne, HE_row_ne, status
INTEGER ( KIND = ip_ ) :: l_h2_1, l_h, lhe_ptr, H_ne, lhe_val, lhe_row
INTEGER ( KIND = ip_ ) :: nnz_vector, nnz_result, maxsbw, alloc_stat
INTEGER ( KIND = ip_ ) :: nsemib, lbandh
REAL ( KIND = rp_ ) :: f
LOGICAL :: grad, byrows, goth
CHARACTER ( len = 10 ) :: p_name
Expand Down Expand Up @@ -512,7 +513,7 @@ END SUBROUTINE WRITE_SRESULT

! SUBROUTINE WRITE_H_BAND( out, n, lbandh, H_band, nsemib, maxsbw )
SUBROUTINE WRITE_H_BAND( out, n, lbandh, H_band, nsemib )
INTEGER ( KIND = ip_ ) :: n, lbandh, out
INTEGER ( KIND = ip_ ) :: n, lbandh, nsemib, out
! INTEGER ( KIND = ip_ ) :: maxsbw
REAL ( KIND = rp_ ), DIMENSION( 0 : lbandh, n ):: H_band
INTEGER ( KIND = ip_ ) :: i, j
Expand Down
3 changes: 2 additions & 1 deletion src/test/utest_threaded.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ PROGRAM CUTEST_test_unconstrained_tools
INTEGER ( KIND = ip_ ) :: i, n, HE_nel, HE_val_ne, HE_row_ne, status
INTEGER ( KIND = ip_ ) :: l_h2_1, l_h, lhe_ptr, H_ne, lhe_val, lhe_row
INTEGER ( KIND = ip_ ) :: nnz_vector, nnz_result, maxsbw, alloc_stat
INTEGER ( KIND = ip_ ) :: nsemib, lbandh
REAL ( KIND = rp_ ) :: f
LOGICAL :: grad, byrows, goth
CHARACTER ( len = 10 ) :: p_name
Expand Down Expand Up @@ -517,7 +518,7 @@ END SUBROUTINE WRITE_SRESULT

! SUBROUTINE WRITE_H_BAND( out, n, lbandh, H_band, nsemib, maxsbw )
SUBROUTINE WRITE_H_BAND( out, n, lbandh, H_band, nsemib )
INTEGER ( KIND = ip_ ) :: n, lbandh, out
INTEGER ( KIND = ip_ ) :: n, lbandh, nsemib, out
! INTEGER ( KIND = ip_ ) :: maxsbw
REAL ( KIND = rp_ ), DIMENSION( 0 : lbandh, n ):: H_band
INTEGER ( KIND = ip_ ) :: i, j
Expand Down

0 comments on commit 4ff9919

Please sign in to comment.