Commit Graph
90 Commits
Author SHA1 Message Date
Simon Maertens 92dd179c2b CBLAS: Fix the expected routine name in xerbla tests for extended API builds 2026-07-30 16:59:48 +02:00
Simon Maertens 25fa8f2f6b Merge branch 'master' into cblas_testing_counts 2026-07-30 13:14:51 +02:00
langou c08a083be7 Merge pull request #1340 from ACSimon33/cblas_xerbla_unify
CBLAS: unify the XERBLA name/INFO logic between the library and the test harness
2026-07-29 19:27:08 -06:00
Simon MaertensandClaude Opus 5 a88a328c9f CBLAS: count tests in the Level 1 drivers
Like their BLAS counterparts, the Level 1 testers print only a PASS line
or a bare FAIL per subprogram, with no counts and no footer. Report:

     CBLAS_SDOT      COMPUTATIONAL TESTS:       16 RUN,        0 FAILED

One test is one element comparison in STEST or ITEST1; CTEST delegates
to STEST and is not counted separately. The counters travel in a new
/CNTBLA/ block and the subprogram name reaches the main program from
HEADER through /NAMBLA/, matching the BLAS Level 1 drivers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:08 +01:00
Simon MaertensandClaude Opus 5 8250cb5ce2 CBLAS: count error-exit tests
The C error-exit checkers report only a pass/fail verdict per routine.
Report the counts too, matching the Fortran drivers:

     cblas_sgemv      ERROR-EXIT TESTS:       13 RUN,        0 FAILED

One test is one chkxer() call. A test fails either because the routine
never reached xerbla, which chkxer already detects through cblas_lerr,
or because c_xerbla.c was reached with the wrong routine name, which
clears cblas_ok without chkxer noticing. The extended API build hits
exactly that second case, reporting cblas_sgemv_64 against an expected
cblas_sgemv, so a new cblas_xbad flag carries it across and the counts
agree with the verdict.

The Windows path that skips the xerbla tests returns before printing a
verdict and so prints no counts either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:07 +01:00
Simon MaertensandClaude Opus 5 1be34149cb CBLAS: count computational tests in the Level 2 and 3 drivers
Report how many tests each routine ran and how many failed, in the same
shape as the BLAS drivers, tagged with the data layout so the two passes
stay distinguishable:

     cblas_sgemv      COLUMN-MAJOR COMPUTATIONAL TESTS:  3456 RUN, 0 FAILED
     cblas_sgemv      ROW-MAJOR    COMPUTATIONAL TESTS:  3456 RUN, 0 FAILED

As in the BLAS drivers, NTESTS and NFAILS sit beside the existing
ERRMAX, are incremented where ERRMAX accumulates, and are reported at
the common exit so every verdict path carries them. The paths that set
FATAL bump them too, so an aborting routine cannot report zero failures.

Existing output lines are unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:06 +01:00
Simon MaertensandClaude Opus 5 6d6643bdb5 CBLAS: report the data layout in the complex Level 2 verdicts
c_sblat2.f, c_dblat2.f and all four Level 3 drivers dispatch on IORDER
and report the column-major and row-major passes with distinct wording.
c_cblat2.f and c_zblat2.f never got that dispatch, so they print two
textually identical lines per routine:

     cblas_cgemv  PASSED THE COMPUTATIONAL TESTS (  3460 CALLS)
     cblas_cgemv  PASSED THE COMPUTATIONAL TESTS (  3460 CALLS)

There is no way to tell which layout a verdict belongs to, or to notice
that one of the two is missing. Add the dispatch, reusing the wording
and the 10000..10003 labels the other drivers already use. Those labels
also name the layout banner in the main program, which is fine: FORMAT
labels are local to a program unit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 16:04:02 +01:00
Simon Maertens d270dac898 Apply const where possible. Use CBLAS_XERBLA_API_PREFIX instead of plain "cblas_" 2026-07-29 12:52:44 +02:00
Simon Maertens 745782750e Report the cblas routine in xerbla with the _64 suffix in extended API builds 2026-07-29 12:38:57 +02:00
Simon Maertens 3cd79c329f Remove unnecessary (int) casts of info return values in CBLAS tests 2026-07-28 21:59:49 +02:00
Simon MaertensandClaude Opus 5 e2fd85389f CBLAS: use the shared XERBLA helper in the xerbla sources
Switch cblas_xerbla(), F77_xerbla_base() and the test harness over to
cblas_xerbla_internal.h. Two diagnostic bugs go away with the duplicated
code:

  - the row-major remap keyed off strstr(rout, "gemm"), which also
    matches gemmtr and so wrongly swapped its arguments 4 and 5;

  - the six-character name buffer truncated cblas_sgemmtr and
    cblas_sskewsyr2k in the library, while the harness used an
    eleven-character buffer and did not, so the two disagreed about the
    same routine.

The Fortran entry points now take FCHAR and read the argument number
through F77_INT consistently, honour the hidden string length instead of
assuming six characters, and carry doxygen comments.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 21:35:14 +02:00
Simon MaertensandClaude Fable 5 cf265acf5a CBLAS: test error exits under row-major layout
The error-exit testers only exercised the option arguments (Side,
Uplo, Trans, Diag) with CblasColMajor, so the diagnostics in the
row-major branches of the level-3 routines were never tested. Mirror
every column-major option-argument test under CblasRowMajor, add the
missing row-major N/K dimension tests for the syrk/herk/syr2k/her2k/
skewsyr2k families, turn the duplicated column-major blocks in the
spr/hpr sections into the intended row-major tests, and make the
mislabelled gemmtr ldb "row major" tests actually use CblasRowMajor.

The new tests expose wrong INFO values in the row-major branches of
cgemm (TransB) and the syrk/syr2k/herk/skewsyr2k families (Uplo), and
silently accepted invalid Trans values in the row-major branches of
the complex herk/her2k/syrk/syr2k routines; these are fixed in the
following commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 15:46:28 +02:00
Simon Maertens f3a91b74f6 Remove redefined macros 2026-07-22 16:59:31 +01:00
Simon Maertens 549f4a6299 Fix mixed enum and integer sign change warnings by using explicitly typed invalid values in CBLAS tests. 2026-07-22 16:47:26 +01:00
Simon Maertens d12f7ad148 Fix extended API CBLAS tests 2026-07-21 16:24:00 +02:00
Simon Maertens f012b82fd9 Merge branch 'master' into refactor_ext_64_api 2026-07-20 22:45:22 +02:00
langou 1954919f2f Merge pull request #1260 from ACSimon33/export_import_cblas_globals
Fix CBLAS tests for shared Windows builds
2026-07-15 03:28:26 -06:00
langou bceadf3238 Merge pull request #1278 from ACSimon33/index_64_conversion_errors
Fix Index-64 conversion errors
2026-07-15 03:25:51 -06:00
Simon Lukas Märtens 1068fdbe9c Merge branch 'master' into fix-external-declarations 2026-07-13 18:19:35 +02:00
Simon Maertens 5da24275b9 Some reformatting to shorten lines below 72 characters with preprocessor replacements 2026-05-13 12:54:05 +02:00
Simon Maertens 57e7ee9724 Add missing external declarations in CBLAS/TESTING 2026-05-12 16:58:18 +01:00
Simon Maertens acdcf84b5c Fix -Wconversion errors in CBLAS/testing during Index-64 builds 2026-05-12 12:01:26 +01:00
Simon MaertensandCopilot a32aa4b33d Added _64 suffixed CBLAS tests
Co-authored-by: Copilot <copilot@github.com>
2026-05-04 15:05:05 +02:00
Simon Maertens b4ba901b29 Added API_SUFFIX to CBLAS tests 2026-05-02 18:05:38 +02:00
Simon Maertens d4fbf36e37 Add missing external declarations in CBLAS/TESTING 2026-05-02 18:05:38 +02:00
Simon Maertens 7cca0ea223 Skip cblas xerbla tests for shared Windows builds, since weak symbols are not supported and the trick to load the test xerbla first doesn't work on Windows when using shared libraries. 2026-05-02 18:05:02 +02:00
Simon Maertens 1092f35f41 Remove complex ?asum and ?nrm2 routines from real tests since they are already tested in the complex tests 2026-05-02 18:05:01 +02:00
Simon Maertens cd40e85a40 Remove unnecessary test_inlude directory in the build folder 2026-05-02 18:05:01 +02:00
Simon Maertens 3afa8276ef Fix export & import of global CBLAS symbols for shared Windows builds 2026-05-02 18:05:01 +02:00
Simon Maertens c59b28a9d1 Fixed all lines that were longer than 72 characters. That caused the Intel Classic compiler to fail on Windows 2026-04-24 13:35:31 +02:00
Simon Maertens 59a4d448f0 Skip cblas xerbla tests for shared Windows builds, since weak symbols are not supported and the trick to load the test xerbla first doesn't work on Windows when using shared libraries. 2026-04-23 16:32:39 +02:00
Simon Maertens f484d0ef41 Remove complex ?asum and ?nrm2 routines from real tests since they are already tested in the complex tests 2026-04-23 16:31:29 +02:00
Simon Maertens 793ab6b649 Remove unnecessary test_inlude directory in the build folder 2026-04-23 16:29:51 +02:00
Simon Maertens 58c4bc1d30 Fix export & import of global CBLAS symbols for shared Windows builds 2026-04-23 01:36:22 +02:00
NAKATA Maho ac82605ea9 refactor: rename ABS1 statement function to CABS1 for consistency
Several LAPACK, BLAS, and CBLAS source files defined a local statement
function named ABS1 for the complex 1-norm approximation:

    ABS1( X ) = ABS( REAL( X ) ) + ABS( AIMAG( X ) )
    ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) )

The majority of the codebase already uses CABS1 for this identical
purpose. This commit renames ABS1 to CABS1 in all remaining files
(definition line, declaration line, and all call sites within the
same file) to make the naming consistent across the repository.

A small number of fixed-form lines required continuation-line splits
to stay within the 72-column limit after the rename.

No numerical change. Statement functions are file-local in Fortran,
so there is no ABI or interface impact.

This is a preparatory cleanup before inlining these statement
functions (see issue #1200).
2026-03-28 14:46:42 +09:00
Mark Gates 0dddb40aaf fix indentation 2026-03-24 20:43:58 -04:00
sh-zheng fc2a4fd659 Add skew-symmetric cblas subroutines and tests 2025-11-27 01:15:36 +08:00
Simon Maertens 9630b23c4f Fixed FORMAT lines that were longerthan 72 characters 2025-10-02 16:42:00 +02:00
langou 6b92a7affa Merge pull request #1048 from grisuthedragon/implement-axpby 2025-09-19 09:11:21 -06:00
Mark Gates 83ed564b46 implicit none in CBLAS 2025-08-26 23:27:58 -04:00
Martin Köhler 426641c372 Fix wrong calls do dchk6 and schk6 and string length in xerbla 2025-07-30 10:40:41 +02:00
Martin Köhler e3951fbc25 fix linkage of cblas_xerbla 2025-07-29 15:47:57 +02:00
Martin Köhler 0ab775d65b Merge branch 'master' into implement-axpby 2025-06-17 09:11:54 +02:00
Martin Köhler 3e9035955f Add typecasts to outputs 2025-04-23 23:38:11 +02:00
Martin Köhler a077ce6f53 Fix warnings in CBLAS testing and examples 2025-04-23 23:27:09 +02:00
Martin Köhler 4b9693f8f1 Add CBLAS for AXPBY 2024-08-26 16:27:18 +02:00
Martin Köhler 34adaba0e6 Add tests for cblas_s/d/zgemmtr 2024-06-24 15:18:22 +02:00
Martin Köhler 85717807e9 Working error tests on cblas_cgemmtr 2024-06-24 15:12:49 +02:00
Martin Köhler 63d2b3af58 add cblas_sgemmtr tests 2024-06-24 14:04:03 +02:00
Martin Köhler b681b1eaec Add cblas_dgemmtr test 2024-06-24 14:04:03 +02:00