From 110029ae74f9c21632d10462494e4982b8e6d4dc Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Tue, 25 Aug 2026 18:56:36 +0200 Subject: [PATCH 01/18] Make the tests in the test suite fatal; the testsuites in the JUnit files are now differentiated between the jobs. --- .github/workflows/compilers.yml | 7 ++- .github/workflows/special.yml | 11 ++++- CMakeLists.txt | 52 ++++++++++++++++++++++ TESTING/CMakeLists.txt | 20 --------- lapack_testing.py | 77 ++++++++++++++++++++++++++++----- 5 files changed, 133 insertions(+), 34 deletions(-) diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index db0f0e54c..050f32b76 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -70,6 +70,7 @@ jobs: CC: ${{ matrix.toolchain.CC }} FFLAGS: ${{ matrix.toolchain.FFLAGS }} CFLAGS: ${{ matrix.toolchain.CFLAGS }} + JOB_ID: ${{ matrix.toolchain.os }}-${{ matrix.toolchain.FC }}-${{ matrix.lib_type }} strategy: fail-fast: false @@ -380,6 +381,7 @@ jobs: -D BUILD_TESTING:BOOL=ON \ -D LAPACKE_WITH_TMG:BOOL=ON \ -D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }} \ + -D LAPACK_TESTING_JUNIT_JOB_ID="${JOB_ID}" \ "${extra[@]}" - name: Build @@ -409,7 +411,8 @@ jobs: -D LAPACKE:BOOL=ON ^ -D BUILD_TESTING:BOOL=ON ^ -D LAPACKE_WITH_TMG:BOOL=ON ^ - -D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }} + -D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }} ^ + -D LAPACK_TESTING_JUNIT_JOB_ID=%JOB_ID% - name: Build (Windows) if: ${{ runner.os == 'Windows' }} @@ -453,7 +456,7 @@ jobs: files: build/lapack_testing_junit.xml # The report is named above, so there is nothing to search the tree for. disable_search: true - flags: tests-${{ matrix.toolchain.os }}-${{ matrix.toolchain.FC }}-${{ matrix.lib_type }} + flags: tests-${{ env.JOB_ID }} name: ${{ matrix.toolchain.os }}-${{ matrix.toolchain.FC }} (${{ matrix.lib_type }}) fail_ci_if_error: true verbose: true diff --git a/.github/workflows/special.yml b/.github/workflows/special.yml index 0dc7bad0d..7d9698110 100644 --- a/.github/workflows/special.yml +++ b/.github/workflows/special.yml @@ -67,6 +67,7 @@ jobs: FFLAGS: "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp" FC: ${{ matrix.toolchain.FC }} CC: ${{ matrix.toolchain.CC }} + JOB_ID: openmp-${{ matrix.toolchain.os }}-${{ matrix.lib_type }} strategy: fail-fast: false @@ -102,6 +103,8 @@ jobs: -D BUILD_TESTING:BOOL=ON -D LAPACKE_WITH_TMG:BOOL=ON -D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }} + -D LAPACK_TESTING_JUNIT_JOB_ID="${JOB_ID}" + ${{ startsWith(matrix.toolchain.os, 'macos') && matrix.lib_type == 'shared' && '-D USE_FLAT_NAMESPACE:BOOL=ON' || '' }} - name: Build run: cmake --build build -j2 @@ -137,7 +140,7 @@ jobs: files: build/lapack_testing_junit.xml # The report is named above, so there is nothing to search the tree for. disable_search: true - flags: tests-openmp-${{ matrix.toolchain.os }}-${{ matrix.lib_type }} + flags: tests-${{ env.JOB_ID }} name: openmp-${{ matrix.toolchain.os }}-${{ matrix.toolchain.FC }} (${{ matrix.lib_type }}) fail_ci_if_error: true verbose: true @@ -169,6 +172,9 @@ jobs: name: codecov deployment: false + env: + JOB_ID: extended-api-${{ matrix.lib_type }} + strategy: fail-fast: false matrix: @@ -190,6 +196,7 @@ jobs: -D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }} -D BUILD_DEFAULT_API:BOOL=OFF -D BUILD_INDEX64_EXT_API:BOOL=ON + -D LAPACK_TESTING_JUNIT_JOB_ID="${JOB_ID}" - name: Build run: cmake --build build -j2 @@ -223,7 +230,7 @@ jobs: files: build/lapack_testing_junit.xml # The report is named above, so there is nothing to search the tree for. disable_search: true - flags: tests-extended-api-${{ matrix.lib_type }} + flags: tests-${{ env.JOB_ID }} name: extended-api-only (${{ matrix.lib_type }}) fail_ci_if_error: true verbose: true diff --git a/CMakeLists.txt b/CMakeLists.txt index 72fac4209..19e40471f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,9 @@ endfunction() # Use valgrind if it is found option( LAPACK_TESTING_USE_PYTHON "Use Python for testing. Disable it on memory checks." ON ) +set( LAPACK_TESTING_JUNIT_JOB_ID "" CACHE STRING + "Identifier of the job running the tests, prefixed to the JUnit report's names." ) +mark_as_advanced( LAPACK_TESTING_JUNIT_JOB_ID ) find_program( MEMORYCHECK_COMMAND valgrind ) if( MEMORYCHECK_COMMAND ) message( STATUS "Found valgrind: ${MEMORYCHECK_COMMAND}" ) @@ -408,6 +411,55 @@ if(LAPACKE) endif() +#------------------------------------- +# Test summary +# +# The summary parses the .out files the LAPACK, BLAS and CBLAS drivers leave +# behind, so it has to run after all of them. set_property(TEST) only reaches +# tests added in the calling directory, hence the top level. +if(BUILD_TESTING AND Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON) + message(STATUS "Enabling LAPACK test summary (see TESTING/testing_results.txt and lapack_testing_junit.xml)") + + # Every test registered anywhere below the source root, so that adding a + # test directory never needs a matching edit here. Collected before the + # summary itself is added, so that it does not depend on itself. + function(_collect_tests dir out) + get_property(_tests DIRECTORY "${dir}" PROPERTY TESTS) + get_property(_subdirs DIRECTORY "${dir}" PROPERTY SUBDIRECTORIES) + foreach(_subdir IN LISTS _subdirs) + _collect_tests("${_subdir}" _subdir_tests) + list(APPEND _tests ${_subdir_tests}) + endforeach() + set(${out} "${_tests}" PARENT_SCOPE) + endfunction() + + _collect_tests("${LAPACK_SOURCE_DIR}" _all_tests) + + # Without a job identifier the report keeps the plain suite and class names. + set(_summary_job_option "") + if(LAPACK_TESTING_JUNIT_JOB_ID) + set(_summary_job_option "--junit-job" "${LAPACK_TESTING_JUNIT_JOB_ID}") + endif() + + file(COPY ${LAPACK_SOURCE_DIR}/lapack_testing.py DESTINATION ${LAPACK_BINARY_DIR}) + # The test drivers report a numerical failure in their output and still exit + # with a status of 0, so this is the test that fails the run when one of them + # found something: --fail-on-error turns any failure or error they reported + # into a nonzero exit status of the summary. + add_test( + NAME LAPACK_Test_Summary + WORKING_DIRECTORY ${LAPACK_BINARY_DIR} + COMMAND ${Python3_EXECUTABLE} "lapack_testing.py" + "--fail-on-error" "--fail-if-empty" "--fail-on-unrecognized" "--merge-apis" + "--junit-xml" "lapack_testing_junit.xml" ${_summary_job_option} + ) + + if(_all_tests) + set_property(TEST LAPACK_Test_Summary APPEND PROPERTY DEPENDS ${_all_tests}) + endif() +endif() + + #------------------------------------- # BLAS++ / LAPACK++ option(BLAS++ "Build BLAS++" OFF) diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt index 89d6fa9c3..b7a78aa4c 100644 --- a/TESTING/CMakeLists.txt +++ b/TESTING/CMakeLists.txt @@ -14,19 +14,6 @@ add_subdirectory(LIN) add_subdirectory(EIG) -# Only run this test if python 3 is found -if(Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON) - message(STATUS "Enabling LAPACK test summary (see TESTING/testing_results.txt and lapack_testing_junit.xml)") - file(COPY ${LAPACK_SOURCE_DIR}/lapack_testing.py DESTINATION ${LAPACK_BINARY_DIR}) - add_test( - NAME LAPACK_Test_Summary - WORKING_DIRECTORY ${LAPACK_BINARY_DIR} - COMMAND ${Python3_EXECUTABLE} "lapack_testing.py" - "--fail-if-empty" "--fail-on-unrecognized" "--merge-apis" - "--junit-xml" "lapack_testing_junit.xml" - ) -endif() - function(_add_lapack_test output input target) set(TEST_INPUT "${LAPACK_SOURCE_DIR}/TESTING/${input}") set(TEST_OUTPUT "${LAPACK_BINARY_DIR}/TESTING/${output}") @@ -39,13 +26,6 @@ function(_add_lapack_test output input target) -DOUTPUT=${TEST_OUTPUT} -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") - - if(Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON) - set_property( - TEST LAPACK_Test_Summary - APPEND PROPERTY DEPENDS LAPACK-${testName} - ) - endif() endif() endfunction() diff --git a/lapack_testing.py b/lapack_testing.py index 6becddd0b..61bf7e3e9 100755 --- a/lapack_testing.py +++ b/lapack_testing.py @@ -44,6 +44,11 @@ Print only the summary table and also write a JUnit XML report of the analyzed output files, e.g. for GitLab CI test reports. + ./lapack_testing.py --junit-xml results.xml --junit-job linux-gfortran + Write a JUnit XML report whose suite and class names carry the + name of the job that ran the tests, so that the reports of + several jobs stay apart where they are collected. + ./lapack_testing.py -s --markdown summary.md Print only the summary table and also write a GitHub-flavored Markdown report of the test results, e.g. for GitHub Actions @@ -1235,7 +1240,31 @@ def output_mtime(path: Path) -> "Optional[float]": return None -def junit_testcase(outcome: CaseOutcome) -> "ET.Element": +def junit_scoped_name(job: "Optional[str]", name: str, separator: str) -> str: + """Prefix a JUnit name with the identifier of the job that ran it. + + The same test suite is run by many CI jobs, and a report collector + that gathers all of them keys a test case on its suite, class and + test name alone. Without the job in those names the reports of the + jobs collapse onto one another; with it they stay apart, and a + failure names the job it came from. + + Args: + job: The job identifier passed to ``--junit-job``, or None when + the report is not scoped to a job. + name: The name to prefix. + separator: What to put between the two: ``"."`` for the dotted + class names, ``" / "`` for the free-text suite names. + + Returns: + The prefixed name, or the name unchanged when there is no job. + """ + if not job: + return name + return "{}{}{}".format(job, separator, name) + + +def junit_testcase(outcome: CaseOutcome, job: "Optional[str]" = None) -> "ET.Element": """Build the JUnit ```` element of one analyzed test case. The element carries at most one status child: an ```` when @@ -1250,6 +1279,7 @@ def junit_testcase(outcome: CaseOutcome) -> "ET.Element": Args: outcome: The analysis outcome of the test case. + job: The job identifier to prefix to the class name, or None. Returns: The ```` element. @@ -1258,7 +1288,11 @@ def junit_testcase(outcome: CaseOutcome) -> "ET.Element": element = ET.Element( "testcase", { - "classname": "{}{}.{}".format(case.library, outcome.suffix, case.family), + "classname": junit_scoped_name( + job, + "{}{}.{}".format(case.library, outcome.suffix, case.family), + ".", + ), "name": "{} ({} {})".format( case.suffixed_output(outcome.suffix), PRECISION_NAMES[case.precision], @@ -1307,7 +1341,9 @@ def junit_testcase(outcome: CaseOutcome) -> "ET.Element": def build_junit_tree( - outcomes: "Sequence[CaseOutcome]", unrecognized: "Sequence[str]" + outcomes: "Sequence[CaseOutcome]", + unrecognized: "Sequence[str]", + job: "Optional[str]" = None, ) -> "ET.ElementTree": """Build the JUnit XML document for the analyzed test cases. @@ -1333,9 +1369,14 @@ def build_junit_tree( output file behind falls back to the time the report was built, so that the attribute is always present. + A job identifier prefixes every suite and class name, so that the + reports of the CI jobs that all run this one test suite do not + collapse onto one another where they are collected. + Args: outcomes: The analysis outcomes, in analysis order. unrecognized: The names of the unrecognized ``.out`` files. + job: The job identifier to prefix to the names, or None. Returns: The document; its root is a ```` element. @@ -1359,7 +1400,7 @@ def build_junit_tree( root, "testsuite", { - "name": section_title(library, [suffix]), + "name": junit_scoped_name(job, section_title(library, [suffix]), " / "), "timestamp": junit_timestamp(min(starts) if starts else report_time), }, ) @@ -1370,7 +1411,7 @@ def build_junit_tree( suite_time = 0.0 timed = False for outcome in suite_outcomes: - element = junit_testcase(outcome) + element = junit_testcase(outcome, job) suite.append(element) if element.find("failure") is not None: failures += 1 @@ -1410,7 +1451,7 @@ def build_junit_tree( root, "testsuite", { - "name": "lapack_testing.py", + "name": junit_scoped_name(job, "lapack_testing.py", " / "), "timestamp": junit_timestamp(report_time), "tests": "1", "failures": "1", @@ -1424,7 +1465,7 @@ def build_junit_tree( suite, "testcase", { - "classname": "lapack_testing", + "classname": junit_scoped_name(job, "lapack_testing", "."), "name": "unrecognized .out files", "time": "0.000", }, @@ -1446,7 +1487,10 @@ def build_junit_tree( def write_junit_xml( - path: Path, outcomes: "Sequence[CaseOutcome]", unrecognized: "Sequence[str]" + path: Path, + outcomes: "Sequence[CaseOutcome]", + unrecognized: "Sequence[str]", + job: "Optional[str]" = None, ) -> "Optional[str]": """Write the JUnit XML report requested via ``--junit-xml``. @@ -1459,6 +1503,7 @@ def write_junit_xml( are created. outcomes: The analysis outcomes, in analysis order. unrecognized: The names of the unrecognized ``.out`` files. + job: The job identifier to prefix to the names, or None. Returns: An error message if the report could not be written, otherwise @@ -1467,7 +1512,7 @@ def write_junit_xml( # Path.with_name below would raise ValueError for such a path. if not path.name: return "cannot write {}: the path has no file name".format(path) - tree = build_junit_tree(outcomes, unrecognized) + tree = build_junit_tree(outcomes, unrecognized, job) # ET.indent is Python 3.9+; without it the report is one long line, # which every consumer accepts just the same. indent = getattr(ET, "indent", None) @@ -1942,6 +1987,16 @@ def parse_args(argv: "Optional[Sequence[str]]" = None) -> argparse.Namespace: "PATH (one testcase per output file), e.g. for GitLab CI test " "reports; written regardless of the display and --fail-* options", ) + parser.add_argument( + "--junit-job", + metavar="NAME", + default=None, + help="identifier of the job that produced the results, e.g. the " + "name or the Codecov flag of a CI job; it is prefixed to the suite " + "and class names of the --junit-xml report, so that the reports of " + "the jobs that all run this one test suite stay apart where they " + "are collected", + ) parser.add_argument( "--markdown", metavar="PATH", @@ -2306,7 +2361,9 @@ def main(argv: "Optional[Sequence[str]]" = None) -> int: junit_error: "Optional[str]" = None if args.junit_xml is not None: - junit_error = write_junit_xml(Path(args.junit_xml), outcomes, unrecognized) + junit_error = write_junit_xml( + Path(args.junit_xml), outcomes, unrecognized, args.junit_job + ) if junit_error is not None: print("lapack_testing.py: {}".format(junit_error), file=sys.stderr) From b19c710c40461711d9e1de4ef774b3807d6d2398 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Wed, 9 Sep 2026 15:09:32 +0100 Subject: [PATCH 02/18] Disable error exit tests for shared Windows builds --- BLAS/TESTING/CMakeLists.txt | 3 +- CMAKE/LAPACKTestHelpers.cmake | 75 +++++++++++++++++++++++++++++++++++ CMAKE/RuntestCommand.cmake | 37 ----------------- CMakeLists.txt | 2 +- TESTING/CMakeLists.txt | 2 +- TESTING/EIG/cchkee.F | 7 +++- TESTING/EIG/dchkee.F | 7 +++- TESTING/EIG/schkee.F | 7 +++- TESTING/EIG/zchkee.F | 7 +++- TESTING/cec.in | 1 + TESTING/ced.in | 8 ++-- TESTING/dec.in | 1 + TESTING/ded.in | 8 ++-- TESTING/sec.in | 1 + TESTING/sed.in | 8 ++-- TESTING/zec.in | 1 + TESTING/zed.in | 8 ++-- 17 files changed, 119 insertions(+), 64 deletions(-) create mode 100644 CMAKE/LAPACKTestHelpers.cmake delete mode 100644 CMAKE/RuntestCommand.cmake diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt index 7e27317c7..11a6070b5 100644 --- a/BLAS/TESTING/CMakeLists.txt +++ b/BLAS/TESTING/CMakeLists.txt @@ -19,7 +19,8 @@ endfunction() function(add_blas_test name source) get_filename_component(baseNAME ${source} NAME_WE) - set(test_input "${CMAKE_CURRENT_SOURCE_DIR}/${baseNAME}.in") + lapack_test_input(test_input + "${CMAKE_CURRENT_SOURCE_DIR}/${baseNAME}.in") if(BUILD_DEFAULT_API) _add_blas_test(${name} ${source} "${test_input}" diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake new file mode 100644 index 000000000..89e679758 --- /dev/null +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -0,0 +1,75 @@ +# The test drivers ship their own XERBLA, which records the expected INFO and +# returns, and rely on it replacing the one in the library, which prints and +# stops. A shared library on Windows always calls the XERBLA it was linked +# with, so the first deliberate illegal argument stops the driver before any +# test runs. CBLAS skips its xerbla tests for the same reason, see +# CBLAS/testing. +if(WIN32 AND BUILD_SHARED_LIBS) + set(LAPACK_SKIP_ERROR_EXIT_TESTS ON) + message(STATUS + "Disabling the error-exit tests: the test suite's XERBLA cannot replace " + "the one in a shared library on Windows") +else() + set(LAPACK_SKIP_ERROR_EXIT_TESTS OFF) +endif() + +# Set ${out_var} to the test input to feed to a test driver. Almost every +# driver reads a TSTERR flag from its input, so where the error-exit tests +# cannot run this is a copy in the build tree with that flag turned off; +# everywhere else, and for the drivers that take no input, it is ${input} +# itself. The drivers that do not read the flag are handled in the source, +# see LAPACK_SKIP_ERROR_EXIT_TESTS in TESTING/EIG/xchkee.F. +function(lapack_test_input out_var input) + if(NOT LAPACK_SKIP_ERROR_EXIT_TESTS OR NOT EXISTS "${input}") + set(${out_var} "${input}" PARENT_SCOPE) + return() + endif() + + file(READ "${input}" content) + string(REGEX REPLACE + "\n[ \t]*(T|\\.TRUE\\.)([ \t]+[^\n]*(Put T to test the error exits|LOGICAL FLAG, T TO TEST ERROR EXITS))" + "\nF\\2" content "${content}") + + get_filename_component(name "${input}" NAME) + set(rewritten "${CMAKE_CURRENT_BINARY_DIR}/${name}") + file(WRITE "${rewritten}" "${content}") + set(${out_var} "${rewritten}" PARENT_SCOPE) +endfunction() + +# Build the ctest COMMAND that runs ${target}, optionally reading standard +# input from INPUT and writing standard output to OUTPUT. +# +# Under LAPACK_MEMORY_CHECK on Unix the command execs the executable, so the +# test runs as a single process. The cmake wrapper used otherwise starts the +# executable with execute_process(), which leaves valgrind with two processes +# writing to the one --log-file it was given, corrupting their records; exec +# replaces the shell instead of forking, so only one process ever writes. +# +# Everything else keeps the cmake wrapper. It needs no shell, it handles the +# per-configuration directory of multi-config generators, and it echoes the +# output of a failing test, which a bare exec cannot do. +function(lapack_runtest_command out_var target) + cmake_parse_arguments(ARG "" "INPUT;OUTPUT" "" ${ARGN}) + + if(UNIX AND LAPACK_MEMORY_CHECK) + set(command "exec \"$\"") + if(ARG_INPUT) + string(APPEND command " < \"${ARG_INPUT}\"") + endif() + if(ARG_OUTPUT) + string(APPEND command " > \"${ARG_OUTPUT}\" 2> \"${ARG_OUTPUT}.err\"") + endif() + set(${out_var} sh -c "${command}" PARENT_SCOPE) + else() + set(command "${CMAKE_COMMAND}" -DTEST=$) + if(ARG_INPUT) + list(APPEND command -DINPUT=${ARG_INPUT}) + endif() + if(ARG_OUTPUT) + list(APPEND command -DOUTPUT=${ARG_OUTPUT}) + endif() + list(APPEND command -DINTDIR=${CMAKE_CFG_INTDIR} + -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") + set(${out_var} ${command} PARENT_SCOPE) + endif() +endfunction() diff --git a/CMAKE/RuntestCommand.cmake b/CMAKE/RuntestCommand.cmake deleted file mode 100644 index ad8fa7a5c..000000000 --- a/CMAKE/RuntestCommand.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# Build the ctest COMMAND that runs ${target}, optionally reading standard -# input from INPUT and writing standard output to OUTPUT. -# -# Under LAPACK_MEMORY_CHECK on Unix the command execs the executable, so the -# test runs as a single process. The cmake wrapper used otherwise starts the -# executable with execute_process(), which leaves valgrind with two processes -# writing to the one --log-file it was given, corrupting their records; exec -# replaces the shell instead of forking, so only one process ever writes. -# -# Everything else keeps the cmake wrapper. It needs no shell, it handles the -# per-configuration directory of multi-config generators, and it echoes the -# output of a failing test, which a bare exec cannot do. -function(lapack_runtest_command out_var target) - cmake_parse_arguments(ARG "" "INPUT;OUTPUT" "" ${ARGN}) - - if(UNIX AND LAPACK_MEMORY_CHECK) - set(command "exec \"$\"") - if(ARG_INPUT) - string(APPEND command " < \"${ARG_INPUT}\"") - endif() - if(ARG_OUTPUT) - string(APPEND command " > \"${ARG_OUTPUT}\" 2> \"${ARG_OUTPUT}.err\"") - endif() - set(${out_var} sh -c "${command}" PARENT_SCOPE) - else() - set(command "${CMAKE_COMMAND}" -DTEST=$) - if(ARG_INPUT) - list(APPEND command -DINPUT=${ARG_INPUT}) - endif() - if(ARG_OUTPUT) - list(APPEND command -DOUTPUT=${ARG_OUTPUT}) - endif() - list(APPEND command -DINTDIR=${CMAKE_CFG_INTDIR} - -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") - set(${out_var} ${command} PARENT_SCOPE) - endif() -endfunction() diff --git a/CMakeLists.txt b/CMakeLists.txt index f869fc5a0..d17ae415c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,7 @@ set(PKG_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig) # Testing option(BUILD_TESTING "Build tests" ${_is_coverage_build}) include(CTest) -include(RuntestCommand) +include(LAPACKTestHelpers) message(STATUS "Build tests: ${BUILD_TESTING}") if(BUILD_TESTING) diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt index 8834ea512..b72fb9ae9 100644 --- a/TESTING/CMakeLists.txt +++ b/TESTING/CMakeLists.txt @@ -15,7 +15,7 @@ add_subdirectory(EIG) function(_add_lapack_test output input target) - set(TEST_INPUT "${LAPACK_SOURCE_DIR}/TESTING/${input}") + lapack_test_input(TEST_INPUT "${LAPACK_SOURCE_DIR}/TESTING/${input}") set(TEST_OUTPUT "${LAPACK_BINARY_DIR}/TESTING/${output}") string(REPLACE "." "_" input_name ${input}) set(testName "${target}_${input_name}") diff --git a/TESTING/EIG/cchkee.F b/TESTING/EIG/cchkee.F index 6b2bca670..396175ab4 100644 --- a/TESTING/EIG/cchkee.F +++ b/TESTING/EIG/cchkee.F @@ -769,7 +769,10 @@ *> printed about each test for which the test ratio is greater *> than or equal to the threshold. *> -*> lines 3-EOF: +*> line 3: TSTERR, LOGICAL +*> Flag indicating whether or not to test the error exits. +*> +*> lines 4-EOF: *> *> Input for testing the eigencondition routines consists of a set of *> specially constructed test cases and their solutions. The data @@ -1264,9 +1267,9 @@ PROGRAM CCHKEE * CEC: Eigencondition estimation * READ( NIN, FMT = * )THRESH + READ( NIN, FMT = * )TSTERR CALL XLAENV( 1, 1 ) CALL XLAENV( 12, 1 ) - TSTERR = .TRUE. CALL CCHKEC( THRESH, TSTERR, NIN, NOUT ) GO TO 380 ELSE diff --git a/TESTING/EIG/dchkee.F b/TESTING/EIG/dchkee.F index 07bb24e9f..9c0538d98 100644 --- a/TESTING/EIG/dchkee.F +++ b/TESTING/EIG/dchkee.F @@ -775,7 +775,10 @@ *> printed about each test for which the test ratio is greater *> than or equal to the threshold. *> -*> lines 3-EOF: +*> line 3: TSTERR, LOGICAL +*> Flag indicating whether or not to test the error exits. +*> +*> lines 4-EOF: *> *> Input for testing the eigencondition routines consists of a set of *> specially constructed test cases and their solutions. The data @@ -1263,13 +1266,13 @@ PROGRAM DCHKEE * DEC: Eigencondition estimation * READ( NIN, FMT = * )THRESH + READ( NIN, FMT = * )TSTERR CALL XLAENV( 1, 1 ) CALL XLAENV( 12, 11 ) CALL XLAENV( 13, 2 ) CALL XLAENV( 14, 0 ) CALL XLAENV( 15, 2 ) CALL XLAENV( 16, 2 ) - TSTERR = .TRUE. CALL DCHKEC( THRESH, TSTERR, NIN, NOUT ) GO TO 10 ELSE diff --git a/TESTING/EIG/schkee.F b/TESTING/EIG/schkee.F index 4fa913e30..83e474d99 100644 --- a/TESTING/EIG/schkee.F +++ b/TESTING/EIG/schkee.F @@ -775,7 +775,10 @@ *> printed about each test for which the test ratio is greater *> than or equal to the threshold. *> -*> lines 3-EOF: +*> line 3: TSTERR, LOGICAL +*> Flag indicating whether or not to test the error exits. +*> +*> lines 4-EOF: *> *> Input for testing the eigencondition routines consists of a set of *> specially constructed test cases and their solutions. The data @@ -1264,13 +1267,13 @@ PROGRAM SCHKEE * SEC: Eigencondition estimation * READ( NIN, FMT = * )THRESH + READ( NIN, FMT = * )TSTERR CALL XLAENV( 1, 1 ) CALL XLAENV( 12, 11 ) CALL XLAENV( 13, 2 ) CALL XLAENV( 14, 0 ) CALL XLAENV( 15, 2 ) CALL XLAENV( 16, 2 ) - TSTERR = .TRUE. CALL SCHKEC( THRESH, TSTERR, NIN, NOUT ) GO TO 10 ELSE diff --git a/TESTING/EIG/zchkee.F b/TESTING/EIG/zchkee.F index 3dc9ab4d8..0ec9af9da 100644 --- a/TESTING/EIG/zchkee.F +++ b/TESTING/EIG/zchkee.F @@ -769,7 +769,10 @@ *> printed about each test for which the test ratio is greater *> than or equal to the threshold. *> -*> lines 3-EOF: +*> line 3: TSTERR, LOGICAL +*> Flag indicating whether or not to test the error exits. +*> +*> lines 4-EOF: *> *> Input for testing the eigencondition routines consists of a set of *> specially constructed test cases and their solutions. The data @@ -1264,9 +1267,9 @@ PROGRAM ZCHKEE * ZEC: Eigencondition estimation * READ( NIN, FMT = * )THRESH + READ( NIN, FMT = * )TSTERR CALL XLAENV( 1, 1 ) CALL XLAENV( 12, 1 ) - TSTERR = .TRUE. CALL ZCHKEC( THRESH, TSTERR, NIN, NOUT ) GO TO 380 ELSE diff --git a/TESTING/cec.in b/TESTING/cec.in index 622f05f1f..ded23c8f8 100644 --- a/TESTING/cec.in +++ b/TESTING/cec.in @@ -1,5 +1,6 @@ CEC Key indicating type of input 20.0E0 Threshold value for test ratios +T Put T to test the error exits 1 1 ( 2.0E0, 0.0E0) ( 2.0E0, 0.0E0) diff --git a/TESTING/ced.in b/TESTING/ced.in index 283debb94..b6e7a9edb 100644 --- a/TESTING/ced.in +++ b/TESTING/ced.in @@ -3,7 +3,7 @@ CES Data for the Complex Nonsymmetric Schur Form Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generate seed 2518 3899 995 397 Seed for random number generator CES 21 Use all matrix types @@ -12,7 +12,7 @@ CEV Data for the Complex Nonsymmetric Eigenvalue Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generate seed 2518 3899 995 397 Seed for random number generator CEV 21 Use all matrix types @@ -21,7 +21,7 @@ CSX Data for the Complex Nonsymmetric Schur Form Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generate seed 2518 3899 995 397 Seed for random number generator CSX 21 Use all matrix types @@ -526,7 +526,7 @@ CVX Data for the Complex Nonsymmetric Eigenvalue Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generate seed 2518 3899 995 397 Seed for random number generator CVX 21 Use all matrix types diff --git a/TESTING/dec.in b/TESTING/dec.in index 4a2aa52a1..42a6f0f9c 100644 --- a/TESTING/dec.in +++ b/TESTING/dec.in @@ -1,5 +1,6 @@ DEC Key indicating type of input 20.0 Threshold value for test ratios +T Put T to test the error exits 8 2 7 1.0D+00 1.0D+00 1.1D+00 1.3D+00 2.0D+00 3.0D+00 -4.7D+00 3.3D+00 -1.0D+00 1.0D+00 3.7D+00 7.9D+00 4.0D+00 5.3D+00 3.3D+00 -9.0D-01 diff --git a/TESTING/ded.in b/TESTING/ded.in index d0c26853d..8dbc76134 100644 --- a/TESTING/ded.in +++ b/TESTING/ded.in @@ -3,7 +3,7 @@ DEV Data file for Real Nonsymmetric Eigenvalue Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator DEV 21 Use all matrix types @@ -12,7 +12,7 @@ DES Data file for Real Nonsymmetric Schur Form Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator DES 21 Use all matrix types @@ -21,7 +21,7 @@ DVX Data file for Real Nonsymmetric Eigenvalue Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator DVX 21 Use all matrix types @@ -546,7 +546,7 @@ DSX Data file for Real Nonsymmetric Schur Form Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator DSX 21 Use all matrix types diff --git a/TESTING/sec.in b/TESTING/sec.in index 0b2f4e68c..3fe304ec9 100644 --- a/TESTING/sec.in +++ b/TESTING/sec.in @@ -1,5 +1,6 @@ SEC Key indicating type of input 20.0 Threshold value for test ratios +T Put T to test the error exits 8 2 7 1.0E+00 1.0E+00 1.1E+00 1.3E+00 2.0E+00 3.0E+00 -4.7E+00 3.3E+00 -1.0E+00 1.0E+00 3.7E+00 7.9E+00 4.0E+00 5.3E+00 3.3E+00 -9.0E-01 diff --git a/TESTING/sed.in b/TESTING/sed.in index 56469179a..3038088f7 100644 --- a/TESTING/sed.in +++ b/TESTING/sed.in @@ -3,7 +3,7 @@ SEV Data file for the Real Nonsymmetric Eigenvalue Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator SEV 21 Use all matrix types @@ -12,7 +12,7 @@ SES Data file for the Real Nonsymmetric Schur Form Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator SES 21 Use all matrix types @@ -21,7 +21,7 @@ SVX Data file for the Real Nonsymmetric Eigenvalue Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator SVX 21 Use all matrix types @@ -546,7 +546,7 @@ SSX Data file for the Real Nonsymmetric Schur Form Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator SSX 21 Use all matrix types diff --git a/TESTING/zec.in b/TESTING/zec.in index 32a1b890c..e72ab512e 100644 --- a/TESTING/zec.in +++ b/TESTING/zec.in @@ -1,5 +1,6 @@ ZEC Key indicating type of input 20.0D0 Threshold value for test ratios +T Put T to test the error exits 1 1 ( 2.0D0, 0.0D0) ( 2.0D0, 0.0D0) diff --git a/TESTING/zed.in b/TESTING/zed.in index 6285a1c20..32420b793 100644 --- a/TESTING/zed.in +++ b/TESTING/zed.in @@ -3,7 +3,7 @@ ZES Data for the Complex Nonsymmetric Schur Form Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator ZES 21 Use all matrix types @@ -12,7 +12,7 @@ ZEV Data for the Complex Nonsymmetric Eigenvalue Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator ZEV 21 Use all matrix types @@ -21,7 +21,7 @@ ZSX Data for the Complex Nonsymmetric Schur Form Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator ZSX 21 Use all matrix types @@ -526,7 +526,7 @@ ZVX Data for Complex Nonsymmetric Eigenvalue Expert Driver 0 1 2 3 5 10 20 Matrix dimensions 3 3 1 11 4 8 2 0 Parameters NB, NBMIN, NXOVER, INMIN, INWIN, INIBL, ISHFTS, IACC22 20.0 Threshold for test ratios -T +T Put T to test the error exits 2 Read another line with random number generator seed 2518 3899 995 397 Seed for random number generator ZVX 21 Use all matrix types From 703bbf20650df5b1bcd14de1f340bd724e7b3ca9 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Wed, 9 Sep 2026 15:14:21 +0100 Subject: [PATCH 03/18] Handle non-existent input files in helper function --- BLAS/TESTING/CMakeLists.txt | 9 ++------- CMAKE/LAPACKTestHelpers.cmake | 4 ++-- TESTING/CMakeLists.txt | 13 ++++--------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt index 11a6070b5..2bced22ba 100644 --- a/BLAS/TESTING/CMakeLists.txt +++ b/BLAS/TESTING/CMakeLists.txt @@ -2,13 +2,8 @@ function(_add_blas_test name src test_input test_output) add_executable(${name} ${src}) target_link_libraries(${name} PRIVATE ${BLASLIB}) lapack_add_coverage(${name}) - if(EXISTS "${test_input}") - lapack_runtest_command(test_command ${name} INPUT "${test_input}") - add_test(NAME BLAS-${name} COMMAND ${test_command}) - else() - lapack_runtest_command(test_command ${name} OUTPUT "${test_output}") - add_test(NAME BLAS-${name} COMMAND ${test_command}) - endif() + lapack_runtest_command(test_command ${name} INPUT "${test_input}" OUTPUT "${test_output}") + add_test(NAME BLAS-${name} COMMAND ${test_command}) # Disable constant propagation for NAG compiler to avoid issues with # special values (Inf, NaN) returned by SXVALS and DXVALS. diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index 89e679758..3a662e534 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -53,7 +53,7 @@ function(lapack_runtest_command out_var target) if(UNIX AND LAPACK_MEMORY_CHECK) set(command "exec \"$\"") - if(ARG_INPUT) + if(ARG_INPUT AND EXISTS "${ARG_INPUT}") string(APPEND command " < \"${ARG_INPUT}\"") endif() if(ARG_OUTPUT) @@ -62,7 +62,7 @@ function(lapack_runtest_command out_var target) set(${out_var} sh -c "${command}" PARENT_SCOPE) else() set(command "${CMAKE_COMMAND}" -DTEST=$) - if(ARG_INPUT) + if(ARG_INPUT AND EXISTS "${ARG_INPUT}") list(APPEND command -DINPUT=${ARG_INPUT}) endif() if(ARG_OUTPUT) diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt index b72fb9ae9..7951440bb 100644 --- a/TESTING/CMakeLists.txt +++ b/TESTING/CMakeLists.txt @@ -17,16 +17,11 @@ add_subdirectory(EIG) function(_add_lapack_test output input target) lapack_test_input(TEST_INPUT "${LAPACK_SOURCE_DIR}/TESTING/${input}") set(TEST_OUTPUT "${LAPACK_BINARY_DIR}/TESTING/${output}") + string(REPLACE "." "_" input_name ${input}) - set(testName "${target}_${input_name}") - if(EXISTS "${TEST_INPUT}") - lapack_runtest_command(test_command ${target} - INPUT "${TEST_INPUT}" OUTPUT "${TEST_OUTPUT}") - add_test(NAME LAPACK-${testName} COMMAND ${test_command}) - else() - lapack_runtest_command(test_command ${target} OUTPUT "${TEST_OUTPUT}") - add_test(NAME LAPACK-${testName} COMMAND ${test_command}) - endif() + lapack_runtest_command(test_command ${target} + INPUT "${TEST_INPUT}" OUTPUT "${TEST_OUTPUT}") + add_test(NAME LAPACK-${target}_${input_name} COMMAND ${test_command}) endfunction() function(add_lapack_test output input target) From 637aa386b4c89e820878f205f82dfa31a97b8543 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Wed, 9 Sep 2026 15:46:46 +0100 Subject: [PATCH 04/18] CMAKE: repair the test suite after the master merge The merge kept both sides of the LAPACK_Test_Summary block, so nothing configured at all: add_test refused the second, duplicate, test name. Keep this branch's copy, which passes --fail-on-error and the job id, and take the mention of LAPACKE from master's comment. Moving the input check into the helper also dropped the rule that a BLAS driver reading an input file must not have its stdout redirected: it takes the name of its summary file from that input and opens it on unit 6 itself, so the redirect opened the one file twice and xBLAT2 died on the second open. Only xBLAT1, which has no input, needs it. Also drop a reference to the preprocessor macro the error-exit tests no longer use. Co-Authored-By: Claude Opus 5 (1M context) --- BLAS/TESTING/CMakeLists.txt | 12 ++++++++++- CMAKE/LAPACKTestHelpers.cmake | 11 +++++----- CMakeLists.txt | 38 ----------------------------------- 3 files changed, 16 insertions(+), 45 deletions(-) diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt index 2bced22ba..010136240 100644 --- a/BLAS/TESTING/CMakeLists.txt +++ b/BLAS/TESTING/CMakeLists.txt @@ -2,7 +2,17 @@ function(_add_blas_test name src test_input test_output) add_executable(${name} ${src}) target_link_libraries(${name} PRIVATE ${BLASLIB}) lapack_add_coverage(${name}) - lapack_runtest_command(test_command ${name} INPUT "${test_input}" OUTPUT "${test_output}") + + # A driver that reads an input file takes the name of its summary file from + # it and opens that itself on unit 6, so redirecting stdout there as well + # would open the one file twice; xBLAT2 fails outright with "Cannot change + # STATUS parameter in OPEN statement". Only xBLAT1, which has no input and + # writes to stdout, needs the redirect. + if(EXISTS "${test_input}") + lapack_runtest_command(test_command ${name} INPUT "${test_input}") + else() + lapack_runtest_command(test_command ${name} OUTPUT "${test_output}") + endif() add_test(NAME BLAS-${name} COMMAND ${test_command}) # Disable constant propagation for NAG compiler to avoid issues with diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index 3a662e534..a9f635f89 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -13,12 +13,11 @@ else() set(LAPACK_SKIP_ERROR_EXIT_TESTS OFF) endif() -# Set ${out_var} to the test input to feed to a test driver. Almost every -# driver reads a TSTERR flag from its input, so where the error-exit tests -# cannot run this is a copy in the build tree with that flag turned off; -# everywhere else, and for the drivers that take no input, it is ${input} -# itself. The drivers that do not read the flag are handled in the source, -# see LAPACK_SKIP_ERROR_EXIT_TESTS in TESTING/EIG/xchkee.F. +# Set ${out_var} to the test input to feed to a test driver. Every driver +# that tests error exits reads a TSTERR flag from its input, so where those +# tests cannot run this is a copy in the build tree with the flag turned +# off; everywhere else, and for the drivers that take no input, it is +# ${input} itself. function(lapack_test_input out_var input) if(NOT LAPACK_SKIP_ERROR_EXIT_TESTS OR NOT EXISTS "${input}") set(${out_var} "${input}" PARENT_SCOPE) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c0af7e61..527e34df2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -446,44 +446,6 @@ if(BUILD_TESTING AND Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON) _collect_tests("${LAPACK_SOURCE_DIR}" _all_tests) - file(COPY ${LAPACK_SOURCE_DIR}/lapack_testing.py DESTINATION ${LAPACK_BINARY_DIR}) - add_test( - NAME LAPACK_Test_Summary - WORKING_DIRECTORY ${LAPACK_BINARY_DIR} - COMMAND ${Python3_EXECUTABLE} "lapack_testing.py" - "--fail-if-empty" "--fail-on-unrecognized" "--merge-apis" - "--junit-xml" "lapack_testing_junit.xml" - ) - - if(_all_tests) - set_property(TEST LAPACK_Test_Summary APPEND PROPERTY DEPENDS ${_all_tests}) - endif() -endif() - -#------------------------------------- -# Test summary -# -# The summary parses the .out files the LAPACK, BLAS and CBLAS drivers leave -# behind, so it has to run after all of them. set_property(TEST) only reaches -# tests added in the calling directory, hence the top level. -if(BUILD_TESTING AND Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON) - message(STATUS "Enabling LAPACK test summary (see TESTING/testing_results.txt and lapack_testing_junit.xml)") - - # Every test registered anywhere below the source root, so that adding a - # test directory never needs a matching edit here. Collected before the - # summary itself is added, so that it does not depend on itself. - function(_collect_tests dir out) - get_property(_tests DIRECTORY "${dir}" PROPERTY TESTS) - get_property(_subdirs DIRECTORY "${dir}" PROPERTY SUBDIRECTORIES) - foreach(_subdir IN LISTS _subdirs) - _collect_tests("${_subdir}" _subdir_tests) - list(APPEND _tests ${_subdir_tests}) - endforeach() - set(${out} "${_tests}" PARENT_SCOPE) - endfunction() - - _collect_tests("${LAPACK_SOURCE_DIR}" _all_tests) - # Without a job identifier the report keeps the plain suite and class names. set(_summary_job_option "") if(LAPACK_TESTING_JUNIT_JOB_ID) From 1941cb3b6ee4a95c1f8f4390a875ba3a45d41dec Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Wed, 9 Sep 2026 17:36:05 +0100 Subject: [PATCH 05/18] Fix error test disabling for LAPACKE tests --- CMAKE/LAPACKTestHelpers.cmake | 23 +++++++++++----- LAPACKE/testing/CMakeLists.txt | 48 +++++++++++++++------------------- 2 files changed, 38 insertions(+), 33 deletions(-) diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index a9f635f89..ea473cc21 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -15,11 +15,19 @@ endif() # Set ${out_var} to the test input to feed to a test driver. Every driver # that tests error exits reads a TSTERR flag from its input, so where those -# tests cannot run this is a copy in the build tree with the flag turned -# off; everywhere else, and for the drivers that take no input, it is -# ${input} itself. +# tests cannot run, or where DISABLE_ERROR_EXIT_TESTS asks for it anyway, +# this is a copy with the flag turned off; everywhere else, and for the +# drivers that take no input, it is ${input} itself. +# +# The copy goes to OUTPUT, or to the name of ${input} in the current binary +# directory. Write it where lapack_testing.py looks for that input, which is +# the directory holding the .out files of the tests that read it, so that +# running the drivers from the script uses the same input ctest does. function(lapack_test_input out_var input) - if(NOT LAPACK_SKIP_ERROR_EXIT_TESTS OR NOT EXISTS "${input}") + cmake_parse_arguments(ARG "DISABLE_ERROR_EXIT_TESTS" "OUTPUT" "" ${ARGN}) + + if(NOT EXISTS "${input}" OR + NOT (LAPACK_SKIP_ERROR_EXIT_TESTS OR ARG_DISABLE_ERROR_EXIT_TESTS)) set(${out_var} "${input}" PARENT_SCOPE) return() endif() @@ -29,8 +37,11 @@ function(lapack_test_input out_var input) "\n[ \t]*(T|\\.TRUE\\.)([ \t]+[^\n]*(Put T to test the error exits|LOGICAL FLAG, T TO TEST ERROR EXITS))" "\nF\\2" content "${content}") - get_filename_component(name "${input}" NAME) - set(rewritten "${CMAKE_CURRENT_BINARY_DIR}/${name}") + set(rewritten "${ARG_OUTPUT}") + if(NOT rewritten) + get_filename_component(name "${input}" NAME) + set(rewritten "${CMAKE_CURRENT_BINARY_DIR}/${name}") + endif() file(WRITE "${rewritten}" "${content}") set(${out_var} "${rewritten}" PARENT_SCOPE) endfunction() diff --git a/LAPACKE/testing/CMakeLists.txt b/LAPACKE/testing/CMakeLists.txt index b52eaae88..226d078d9 100644 --- a/LAPACKE/testing/CMakeLists.txt +++ b/LAPACKE/testing/CMakeLists.txt @@ -40,7 +40,8 @@ endif() # different leading-dimension semantics (LDA >= N instead of LDA >= M), and # the high-level interface ignores the caller's workspace so LWORK error # exits cannot fire. The other flavors read a generated input with the -# error-exit tests disabled. +# error-exit tests disabled, and so does that one where the platform cannot +# run them at all. set(_lapacke_test_out_dir ${LAPACK_BINARY_DIR}/TESTING/lapacke) file(MAKE_DIRECTORY ${_lapacke_test_out_dir}) @@ -58,19 +59,20 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) ${_allowlist_args} NO_STRING_REPLACEMENTS) - file(READ ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in _test_in_content) - string(REPLACE - "T Put T to test the error exits" - "F Put T to test the error exits" - _test_in_noerr_content "${_test_in_content}") - file(WRITE ${_lapacke_test_out_dir}/${_prec}test_noerr.in "${_test_in_noerr_content}") + lapack_test_input(_test_input + ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in + OUTPUT ${_lapacke_test_out_dir}/${_prec}test.in) + lapack_test_input(_test_input_noerr + ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in + DISABLE_ERROR_EXIT_TESTS + OUTPUT ${_lapacke_test_out_dir}/${_prec}test_noerr.in) if(BUILD_DEFAULT_API) add_library(xlintst${_prec}_lapacke_core OBJECT ${_lin_sources_test}) foreach(_layer work high) foreach(_layout cm rm) - set(_driver xlintst${_prec}_lapacke_${_layer}_${_layout}) + set(_driver xlintst${_prec}_${_layer}_${_layout}) add_executable(${_driver} $) @@ -79,18 +81,14 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) lapacke_test_wrappers_${_layer}_${_layout} ${TMGLIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + set(_output ${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}.out) if(_layer STREQUAL "work" AND _layout STREQUAL "cm") - set(_input ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in) + set(_input ${_test_input}) else() - set(_input ${_lapacke_test_out_dir}/${_prec}test_noerr.in) + set(_input ${_test_input_noerr}) endif() - add_test(NAME LAPACK-${_driver}_${_prec}test_in - COMMAND "${CMAKE_COMMAND}" - -DTEST=$ - -DINPUT=${_input} - -DOUTPUT=${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}.out - -DINTDIR=${CMAKE_CFG_INTDIR} - -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") + lapack_runtest_command(_test_command ${_driver} INPUT ${_input} OUTPUT ${_output}) + add_test(NAME LAPACKE-${_driver}_${_prec}test_in COMMAND ${_test_command}) endforeach() endforeach() endif() @@ -110,7 +108,7 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) foreach(_layer work high) foreach(_layout cm rm) - set(_driver xlintst${_prec}_lapacke_${_layer}_${_layout}_64) + set(_driver xlintst${_prec}_${_layer}_${_layout}_64) add_executable(${_driver} $) @@ -119,18 +117,14 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) lapacke_test_wrappers_${_layer}_${_layout}_64 ${TMGLIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + set(_output ${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}_64.out) if(_layer STREQUAL "work" AND _layout STREQUAL "cm") - set(_input ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in) + set(_input ${_test_input}) else() - set(_input ${_lapacke_test_out_dir}/${_prec}test_noerr.in) + set(_input ${_test_input_noerr}) endif() - add_test(NAME LAPACK-${_driver}_${_prec}test_in - COMMAND "${CMAKE_COMMAND}" - -DTEST=$ - -DINPUT=${_input} - -DOUTPUT=${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}_64.out - -DINTDIR=${CMAKE_CFG_INTDIR} - -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") + lapack_runtest_command(_test_command ${_driver} INPUT ${_input} OUTPUT ${_output}) + add_test(NAME LAPACKE-${_driver}_${_prec}test_in COMMAND ${_test_command}) endforeach() endforeach() endif() From be46f39bfca48f754317eb70340d8e657e3658da Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Wed, 9 Sep 2026 19:07:00 +0100 Subject: [PATCH 06/18] CMAKE: disable nagfor constant propagation for ?errcxx_TEST nagfor rejects the SQRT( -ONE ) that creates a NaN, and the LAPACKE test build regenerates the ?errcxx drivers without the -Onopropagate that TESTING/LIN applies, so every nagfor job has failed to build since the LAPACKE LIN tests were merged. Co-Authored-By: Claude Fable 5.1 --- CMAKE/LAPACKTestHelpers.cmake | 19 +++++++++++++++++++ LAPACKE/testing/CMakeLists.txt | 2 ++ TESTING/LIN/CMakeLists.txt | 22 +++------------------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index ea473cc21..7f9ac4bf2 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -13,6 +13,25 @@ else() set(LAPACK_SKIP_ERROR_EXIT_TESTS OFF) endif() +# nagfor folds the SQRT( -ONE ) with which the ?errcxx drivers manufacture +# a NaN and rejects it ("Invalid operand for intrinsic SQRT ... Errors found +# during constant propagation"), so those drivers are compiled with constant +# propagation disabled. Call this with every source list such a driver is +# built from: the generated _64 and _TEST copies need it as much as the +# originals. +function(lapack_nag_disable_constant_propagation) + if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") + return() + endif() + foreach(source IN LISTS ARGN) + get_filename_component(name "${source}" NAME) + if(name MATCHES "^[scdz]errcxx(_[A-Za-z0-9]+)*\\.f$") + set_source_files_properties("${source}" + PROPERTIES COMPILE_OPTIONS "-Onopropagate") + endif() + endforeach() +endfunction() + # Set ${out_var} to the test input to feed to a test driver. Every driver # that tests error exits reads a TSTERR flag from its input, so where those # tests cannot run, or where DISABLE_ERROR_EXIT_TESTS asks for it anyway, diff --git a/LAPACKE/testing/CMakeLists.txt b/LAPACKE/testing/CMakeLists.txt index 226d078d9..f6d610d31 100644 --- a/LAPACKE/testing/CMakeLists.txt +++ b/LAPACKE/testing/CMakeLists.txt @@ -58,6 +58,7 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) SUFFIX "_TEST" ${_allowlist_args} NO_STRING_REPLACEMENTS) + lapack_nag_disable_constant_propagation(${_lin_sources_test}) lapack_test_input(_test_input ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in @@ -101,6 +102,7 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) generate_suffixed_sources(xlintst${_prec}_lapacke_TEST _lin_sources_test _lin_sources_test_64 SUFFIX "_64") + lapack_nag_disable_constant_propagation(${_lin_sources_test_64}) add_library(xlintst${_prec}_lapacke_core_64 OBJECT ${_lin_sources_test_64}) target_compile_options(xlintst${_prec}_lapacke_core_64 diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt index b72a30b32..2313fa0c4 100644 --- a/TESTING/LIN/CMakeLists.txt +++ b/TESTING/LIN/CMakeLists.txt @@ -221,13 +221,8 @@ else() set(ZXLINTST ${ZLINTST_NO_XBLAS}) endif() -# Disable constant propagation for NAG compiler to avoid issues with -# creating NaN values in the CXX error-exit tests. -if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") - set_source_files_properties( - serrcxx.f cerrcxx.f derrcxx.f zerrcxx.f - PROPERTIES COMPILE_OPTIONS "-Onopropagate") -endif() +lapack_nag_disable_constant_propagation( + serrcxx.f cerrcxx.f derrcxx.f zerrcxx.f) set(DSLINTST dchkab.f ddrvab.f ddrvac.f derrab.f derrac.f dget08.f @@ -275,18 +270,7 @@ function(add_lin_executable name) if(BUILD_INDEX64_EXT_API) include(ExtendedAPIHelpers) generate_64bit_suffixed_sources(${name} ext_sources ext_sources_64) - - # Disable constant propagation for NAG compiler to avoid issues with - # creating NaN values in the CXX error-exit tests. - if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") - foreach(source IN LISTS ext_sources_64) - get_filename_component(source_name "${source}" NAME) - if(source_name MATCHES "^[scdz]errcxx_64\\.f$") - set_source_files_properties( - "${source}" PROPERTIES COMPILE_OPTIONS "-Onopropagate") - endif() - endforeach() - endif() + lapack_nag_disable_constant_propagation(${ext_sources_64}) add_executable(${name}_64 ${ext_sources_64}) target_compile_options(${name}_64 PRIVATE ${FOPT_ILP64}) From 9b330400b4963f6a35adf789b55ab5a0198e5adc Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Thu, 10 Sep 2026 22:33:36 +0100 Subject: [PATCH 07/18] TESTING: exit with status 1 from every fatal error path Every STOP in the test drivers was either bare or carried a character stop code, and both exit with status 0. That is not an accident of the implementation: the standard recommends the exit status be taken from an integer stop code, and recommends zero when the stop code is of type character or absent. So a driver that abandoned its run - an unrecognised subprogram name, an input file it could not parse, a failed ALLOCATE, or its own reference arithmetic evaluating wrongly - reported success, and ctest and lapack_testing.py, which both do check the status, saw a passing test. The 177 fatal paths now use STOP 1. A digit string as the stop code is FORTRAN 77, and STOP keeps normal termination, so all units are still flushed and closed; ERROR STOP would need Fortran 2008 and only recommends flushing. The 24 STOPs that end a program normally are left as they are. The ALLOCATE checks printed their message as the stop code, which sends it to standard error where lapack_testing.py never sees it. They now write it to the output unit before stopping. Co-Authored-By: Claude Opus 5 (1M context) --- BLAS/TESTING/cblat1.f | 4 ++-- BLAS/TESTING/cblat2.f | 6 +++--- BLAS/TESTING/cblat3.f | 10 +++++----- BLAS/TESTING/dblat1.f | 8 ++++---- BLAS/TESTING/dblat2.f | 6 +++--- BLAS/TESTING/dblat3.f | 10 +++++----- BLAS/TESTING/sblat1.f | 8 ++++---- BLAS/TESTING/sblat2.f | 6 +++--- BLAS/TESTING/sblat3.f | 10 +++++----- BLAS/TESTING/zblat1.f | 4 ++-- BLAS/TESTING/zblat2.f | 6 +++--- BLAS/TESTING/zblat3.f | 10 +++++----- CBLAS/testing/c_cblat1.f | 4 ++-- CBLAS/testing/c_cblat2.f | 6 +++--- CBLAS/testing/c_cblat3.f | 10 +++++----- CBLAS/testing/c_dblat1.f | 8 ++++---- CBLAS/testing/c_dblat2.f | 6 +++--- CBLAS/testing/c_dblat3.f | 10 +++++----- CBLAS/testing/c_sblat1.f | 8 ++++---- CBLAS/testing/c_sblat2.f | 6 +++--- CBLAS/testing/c_sblat3.f | 10 +++++----- CBLAS/testing/c_zblat1.f | 4 ++-- CBLAS/testing/c_zblat2.f | 6 +++--- CBLAS/testing/c_zblat3.f | 10 +++++----- TESTING/EIG/alareq.f | 2 +- TESTING/EIG/alarqg.f | 2 +- TESTING/EIG/cchkee.F | 32 +++++++++++++++++++++++++------- TESTING/EIG/csyl01.f | 30 ++++++++++++++++++++++++------ TESTING/EIG/dchkee.F | 22 +++++++++++++++++----- TESTING/EIG/dsyl01.f | 30 ++++++++++++++++++++++++------ TESTING/EIG/schkee.F | 22 +++++++++++++++++----- TESTING/EIG/ssyl01.f | 30 ++++++++++++++++++++++++------ TESTING/EIG/zchkee.F | 32 +++++++++++++++++++++++++------- TESTING/EIG/zsyl01.f | 30 ++++++++++++++++++++++++------ TESTING/LIN/alareq.f | 2 +- TESTING/LIN/cchkaa.F | 37 +++++++++++++++++++++++++++++-------- TESTING/LIN/cchkrfp.f | 2 +- TESTING/LIN/dchkaa.F | 37 +++++++++++++++++++++++++++++-------- TESTING/LIN/dchkab.f | 2 +- TESTING/LIN/dchkrfp.f | 2 +- TESTING/LIN/schkaa.F | 37 +++++++++++++++++++++++++++++-------- TESTING/LIN/schkrfp.f | 2 +- TESTING/LIN/zchkaa.F | 37 +++++++++++++++++++++++++++++-------- TESTING/LIN/zchkab.f | 2 +- TESTING/LIN/zchkrfp.f | 2 +- 45 files changed, 393 insertions(+), 177 deletions(-) diff --git a/BLAS/TESTING/cblat1.f b/BLAS/TESTING/cblat1.f index 5071ca6f2..f07e4e189 100644 --- a/BLAS/TESTING/cblat1.f +++ b/BLAS/TESTING/cblat1.f @@ -308,7 +308,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(ICAMAX(N,CX,INCX),ITRUEC(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF * 40 CONTINUE @@ -675,7 +675,7 @@ SUBROUTINE CHECK2(SFAC) CALL CTEST(LENY,CY,CT11(1,KN,KI),CSIZE2(1,KSIZE),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF * 40 CONTINUE diff --git a/BLAS/TESTING/cblat2.f b/BLAS/TESTING/cblat2.f index 8d4fe6d71..e8657213d 100644 --- a/BLAS/TESTING/cblat2.f +++ b/BLAS/TESTING/cblat2.f @@ -277,7 +277,7 @@ PROGRAM CBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -311,7 +311,7 @@ PROGRAM CBLAT2 SAME = LCE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL CMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -319,7 +319,7 @@ PROGRAM CBLAT2 SAME = LCE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/BLAS/TESTING/cblat3.f b/BLAS/TESTING/cblat3.f index 1e8f865bd..d3ff49c42 100644 --- a/BLAS/TESTING/cblat3.f +++ b/BLAS/TESTING/cblat3.f @@ -228,7 +228,7 @@ PROGRAM CBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -265,7 +265,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -274,7 +274,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = REAL( N - J + 1 ) @@ -292,7 +292,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -301,7 +301,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/BLAS/TESTING/dblat1.f b/BLAS/TESTING/dblat1.f index 875dbf53e..43590bd23 100644 --- a/BLAS/TESTING/dblat1.f +++ b/BLAS/TESTING/dblat1.f @@ -266,7 +266,7 @@ SUBROUTINE CHECK0(SFAC) CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK0' - STOP + STOP 1 END IF 20 CONTINUE 40 RETURN @@ -376,7 +376,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(IDAMAX(N,SX,INCX),ITRUEC(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF 60 CONTINUE IF (ICASE.EQ.10) THEN @@ -782,7 +782,7 @@ SUBROUTINE CHECK2(SFAC) $ REAL(DT7(KN,KI)),REAL(SSIZE1(KN)), .3125E-1) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF 100 CONTINUE 120 CONTINUE @@ -898,7 +898,7 @@ SUBROUTINE CHECK3(SFAC) CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK3' - STOP + STOP 1 END IF 40 CONTINUE 60 CONTINUE diff --git a/BLAS/TESTING/dblat2.f b/BLAS/TESTING/dblat2.f index 8092518a3..8fbc4ca3b 100644 --- a/BLAS/TESTING/dblat2.f +++ b/BLAS/TESTING/dblat2.f @@ -279,7 +279,7 @@ PROGRAM DBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -312,7 +312,7 @@ PROGRAM DBLAT2 SAME = LDE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL DMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -320,7 +320,7 @@ PROGRAM DBLAT2 SAME = LDE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/BLAS/TESTING/dblat3.f b/BLAS/TESTING/dblat3.f index 757fb0ece..9449d7749 100644 --- a/BLAS/TESTING/dblat3.f +++ b/BLAS/TESTING/dblat3.f @@ -226,7 +226,7 @@ PROGRAM DBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -262,7 +262,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -271,7 +271,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = N - J + 1 @@ -289,7 +289,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -298,7 +298,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/BLAS/TESTING/sblat1.f b/BLAS/TESTING/sblat1.f index 084e3f141..4ea895abb 100644 --- a/BLAS/TESTING/sblat1.f +++ b/BLAS/TESTING/sblat1.f @@ -265,7 +265,7 @@ SUBROUTINE CHECK0(SFAC) CALL STEST(9,DTEMP,DTRUE(1,K),DTRUE(1,K),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK0' - STOP + STOP 1 END IF 20 CONTINUE 40 RETURN @@ -374,7 +374,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(ISAMAX(N,SX,INCX),ITRUEC(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF 60 CONTINUE IF (ICASE.EQ.10) THEN @@ -781,7 +781,7 @@ SUBROUTINE CHECK2(SFAC) $ ST7B(KN,KI),SSIZE3(KN),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF 100 CONTINUE 120 CONTINUE @@ -896,7 +896,7 @@ SUBROUTINE CHECK3(SFAC) CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK3' - STOP + STOP 1 END IF 40 CONTINUE 60 CONTINUE diff --git a/BLAS/TESTING/sblat2.f b/BLAS/TESTING/sblat2.f index 22483a191..b8cbccc8a 100644 --- a/BLAS/TESTING/sblat2.f +++ b/BLAS/TESTING/sblat2.f @@ -279,7 +279,7 @@ PROGRAM SBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -313,7 +313,7 @@ PROGRAM SBLAT2 SAME = LSE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL SMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -321,7 +321,7 @@ PROGRAM SBLAT2 SAME = LSE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/BLAS/TESTING/sblat3.f b/BLAS/TESTING/sblat3.f index 4f91b1796..d6ca9dce7 100644 --- a/BLAS/TESTING/sblat3.f +++ b/BLAS/TESTING/sblat3.f @@ -226,7 +226,7 @@ PROGRAM SBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -263,7 +263,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -272,7 +272,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = REAL( N - J + 1 ) @@ -290,7 +290,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -299,7 +299,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/BLAS/TESTING/zblat1.f b/BLAS/TESTING/zblat1.f index 0c45936b8..7742590d7 100644 --- a/BLAS/TESTING/zblat1.f +++ b/BLAS/TESTING/zblat1.f @@ -307,7 +307,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(IZAMAX(N,CX,INCX),ITRUEC(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF * 40 CONTINUE @@ -675,7 +675,7 @@ SUBROUTINE CHECK2(SFAC) CALL CTEST(LENY,CY,CT11(1,KN,KI),CSIZE2(1,KSIZE),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF * 40 CONTINUE diff --git a/BLAS/TESTING/zblat2.f b/BLAS/TESTING/zblat2.f index 7aa9e577d..d3fc1dca4 100644 --- a/BLAS/TESTING/zblat2.f +++ b/BLAS/TESTING/zblat2.f @@ -278,7 +278,7 @@ PROGRAM ZBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -311,7 +311,7 @@ PROGRAM ZBLAT2 SAME = LZE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -319,7 +319,7 @@ PROGRAM ZBLAT2 SAME = LZE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/BLAS/TESTING/zblat3.f b/BLAS/TESTING/zblat3.f index f9ecd7ec3..3ee340583 100644 --- a/BLAS/TESTING/zblat3.f +++ b/BLAS/TESTING/zblat3.f @@ -230,7 +230,7 @@ PROGRAM ZBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -266,7 +266,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -275,7 +275,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = N - J + 1 @@ -293,7 +293,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -302,7 +302,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_cblat1.f b/CBLAS/testing/c_cblat1.f index 930ccdbea..75b8ee8ed 100644 --- a/CBLAS/testing/c_cblat1.f +++ b/CBLAS/testing/c_cblat1.f @@ -255,7 +255,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(ICAMAXTEST(N,CX,INCX),ITRUE3(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF * 40 CONTINUE @@ -597,7 +597,7 @@ SUBROUTINE CHECK2(SFAC) CALL CTEST(LENY,CY,CT11(1,KN,KI),CSIZE2(1,KSIZE),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF * 40 CONTINUE diff --git a/CBLAS/testing/c_cblat2.f b/CBLAS/testing/c_cblat2.f index 881580966..3d710868f 100644 --- a/CBLAS/testing/c_cblat2.f +++ b/CBLAS/testing/c_cblat2.f @@ -247,7 +247,7 @@ PROGRAM CBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -288,7 +288,7 @@ PROGRAM CBLAT2 SAME = LCE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL CMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -296,7 +296,7 @@ PROGRAM CBLAT2 SAME = LCE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_cblat3.f b/CBLAS/testing/c_cblat3.f index 3b6c4ba62..0580701e6 100644 --- a/CBLAS/testing/c_cblat3.f +++ b/CBLAS/testing/c_cblat3.f @@ -200,7 +200,7 @@ PROGRAM CBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -244,7 +244,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -253,7 +253,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = REAL( N - J + 1 ) @@ -271,7 +271,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL CMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -280,7 +280,7 @@ PROGRAM CBLAT3 SAME = LCE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_dblat1.f b/CBLAS/testing/c_dblat1.f index c6f074465..6325e4476 100644 --- a/CBLAS/testing/c_dblat1.f +++ b/CBLAS/testing/c_dblat1.f @@ -163,7 +163,7 @@ SUBROUTINE CHECK0(SFAC) CALL STEST1(SS,DS1(K),DS1(K),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK0' - STOP + STOP 1 END IF 20 CONTINUE 40 RETURN @@ -259,7 +259,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(IDAMAXTEST(N,SX,INCX),ITRUE2(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF 60 CONTINUE 80 CONTINUE @@ -448,7 +448,7 @@ SUBROUTINE CHECK2(SFAC) CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0D0) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF 100 CONTINUE 120 CONTINUE @@ -563,7 +563,7 @@ SUBROUTINE CHECK3(SFAC) CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK3' - STOP + STOP 1 END IF 40 CONTINUE 60 CONTINUE diff --git a/CBLAS/testing/c_dblat2.f b/CBLAS/testing/c_dblat2.f index 232f01f20..dd4ac6cf9 100644 --- a/CBLAS/testing/c_dblat2.f +++ b/CBLAS/testing/c_dblat2.f @@ -257,7 +257,7 @@ PROGRAM DBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -297,7 +297,7 @@ PROGRAM DBLAT2 SAME = LDE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL DMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -305,7 +305,7 @@ PROGRAM DBLAT2 SAME = LDE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_dblat3.f b/CBLAS/testing/c_dblat3.f index 87a6f69b9..73fc898ac 100644 --- a/CBLAS/testing/c_dblat3.f +++ b/CBLAS/testing/c_dblat3.f @@ -202,7 +202,7 @@ PROGRAM DBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -245,7 +245,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -254,7 +254,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = N - J + 1 @@ -272,7 +272,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL DMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -281,7 +281,7 @@ PROGRAM DBLAT3 SAME = LDE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_sblat1.f b/CBLAS/testing/c_sblat1.f index d66f23a5c..a397f5d96 100644 --- a/CBLAS/testing/c_sblat1.f +++ b/CBLAS/testing/c_sblat1.f @@ -162,7 +162,7 @@ SUBROUTINE CHECK0(SFAC) CALL STEST1(SS,DS1(K),DS1(K),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK0' - STOP + STOP 1 END IF 20 CONTINUE 40 RETURN @@ -258,7 +258,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(ISAMAXTEST(N,SX,INCX),ITRUE2(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF 60 CONTINUE 80 CONTINUE @@ -445,7 +445,7 @@ SUBROUTINE CHECK2(SFAC) CALL STEST(LENY,SY,STY,SSIZE2(1,1),1.0E0) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF 100 CONTINUE 120 CONTINUE @@ -560,7 +560,7 @@ SUBROUTINE CHECK3(SFAC) CALL STEST(LENY,SY,STY,SSIZE2(1,KSIZE),SFAC) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK3' - STOP + STOP 1 END IF 40 CONTINUE 60 CONTINUE diff --git a/CBLAS/testing/c_sblat2.f b/CBLAS/testing/c_sblat2.f index fbd32188b..3a7719ca7 100644 --- a/CBLAS/testing/c_sblat2.f +++ b/CBLAS/testing/c_sblat2.f @@ -257,7 +257,7 @@ PROGRAM SBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -298,7 +298,7 @@ PROGRAM SBLAT2 SAME = LSE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL SMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -306,7 +306,7 @@ PROGRAM SBLAT2 SAME = LSE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_sblat3.f b/CBLAS/testing/c_sblat3.f index e290bbbb3..750e7e252 100644 --- a/CBLAS/testing/c_sblat3.f +++ b/CBLAS/testing/c_sblat3.f @@ -201,7 +201,7 @@ PROGRAM SBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -245,7 +245,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -254,7 +254,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = REAL( N - J + 1 ) @@ -272,7 +272,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'T' CALL SMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -281,7 +281,7 @@ PROGRAM SBLAT3 SAME = LSE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.ZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_zblat1.f b/CBLAS/testing/c_zblat1.f index a4f6a0a67..5952546ce 100644 --- a/CBLAS/testing/c_zblat1.f +++ b/CBLAS/testing/c_zblat1.f @@ -255,7 +255,7 @@ SUBROUTINE CHECK1(SFAC) CALL ITEST1(IZAMAXTEST(N,CX,INCX),ITRUE3(NP1)) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK1' - STOP + STOP 1 END IF * 40 CONTINUE @@ -596,7 +596,7 @@ SUBROUTINE CHECK2(SFAC) CALL CTEST(LENY,CY,CT10Y(1,KN,KI),CSIZE3,1.0D0) ELSE WRITE (NOUT,*) ' Shouldn''t be here in CHECK2' - STOP + STOP 1 END IF * 40 CONTINUE diff --git a/CBLAS/testing/c_zblat2.f b/CBLAS/testing/c_zblat2.f index cda64d6ad..9de95e7e6 100644 --- a/CBLAS/testing/c_zblat2.f +++ b/CBLAS/testing/c_zblat2.f @@ -247,7 +247,7 @@ PROGRAM ZBLAT2 $ GO TO 70 60 CONTINUE WRITE( NOUT, FMT = 9986 )SNAMET - STOP + STOP 1 70 LTEST( I ) = LTESTT GO TO 50 * @@ -287,7 +287,7 @@ PROGRAM ZBLAT2 SAME = LZE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF TRANS = 'T' CALL ZMVCH( TRANS, N, N, ONE, A, NMAX, X, -1, ZERO, Y, -1, YT, G, @@ -295,7 +295,7 @@ PROGRAM ZBLAT2 SAME = LZE( YY, YT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9985 )TRANS, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/CBLAS/testing/c_zblat3.f b/CBLAS/testing/c_zblat3.f index 6a94941a9..84e9d21dd 100644 --- a/CBLAS/testing/c_zblat3.f +++ b/CBLAS/testing/c_zblat3.f @@ -201,7 +201,7 @@ PROGRAM ZBLAT3 $ GO TO 50 40 CONTINUE WRITE( NOUT, FMT = 9990 )SNAMET - STOP + STOP 1 50 LTEST( I ) = LTESTT GO TO 30 * @@ -244,7 +244,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -253,7 +253,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF DO 120 J = 1, N AB( J, NMAX + 1 ) = N - J + 1 @@ -271,7 +271,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF TRANSB = 'C' CALL ZMMCH( TRANSA, TRANSB, N, 1, N, ONE, AB, NMAX, @@ -280,7 +280,7 @@ PROGRAM ZBLAT3 SAME = LZE( CC, CT, N ) IF( .NOT.SAME.OR.ERR.NE.RZERO )THEN WRITE( NOUT, FMT = 9989 )TRANSA, TRANSB, SAME, ERR - STOP + STOP 1 END IF * * Test each subroutine in turn. diff --git a/TESTING/EIG/alareq.f b/TESTING/EIG/alareq.f index 25ff484e4..fe4e5d596 100644 --- a/TESTING/EIG/alareq.f +++ b/TESTING/EIG/alareq.f @@ -212,7 +212,7 @@ SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT ) 9994 FORMAT( ' ==> Specify ', I4, ' matrix types on this line or ', $ 'adjust NTYPES on previous line' ) WRITE( NOUT, FMT = * ) - STOP + STOP 1 * * End of ALAREQ * diff --git a/TESTING/EIG/alarqg.f b/TESTING/EIG/alarqg.f index 321e8b642..e864b187b 100644 --- a/TESTING/EIG/alarqg.f +++ b/TESTING/EIG/alarqg.f @@ -212,7 +212,7 @@ SUBROUTINE ALARQG( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT ) 9994 FORMAT( ' ==> Specify ', I4, ' matrix types on this line or ', $ 'adjust NTYPES on previous line' ) WRITE( NOUT, FMT = * ) - STOP + STOP 1 * * End of ALARQG * diff --git a/TESTING/EIG/cchkee.F b/TESTING/EIG/cchkee.F index 396175ab4..3d4c50f42 100644 --- a/TESTING/EIG/cchkee.F +++ b/TESTING/EIG/cchkee.F @@ -1141,17 +1141,35 @@ PROGRAM CCHKEE * .. Allocate memory dynamically .. * ALLOCATE ( S(NMAX*NMAX), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( A(NMAX*NMAX,NEED), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B(NMAX*NMAX,5), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C(NCMAX*NCMAX,NCMAX*NCMAX), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( RWORK(LWORK), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK(LWORK), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * @@ -1729,7 +1747,7 @@ PROGRAM CCHKEE * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Read the input lines indicating the test path and its parameters. diff --git a/TESTING/EIG/csyl01.f b/TESTING/EIG/csyl01.f index 8a3cd1ae5..e523caaee 100644 --- a/TESTING/EIG/csyl01.f +++ b/TESTING/EIG/csyl01.f @@ -143,17 +143,35 @@ SUBROUTINE CSYL01( THRESH, NFAIL, RMAX, NINFO, KNT ) * .. * .. Allocate memory dynamically .. ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( SWORK( LDSWORK, 54 ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * diff --git a/TESTING/EIG/dchkee.F b/TESTING/EIG/dchkee.F index 9c0538d98..c62aa2065 100644 --- a/TESTING/EIG/dchkee.F +++ b/TESTING/EIG/dchkee.F @@ -1144,13 +1144,25 @@ PROGRAM DCHKEE * .. Allocate memory dynamically .. * ALLOCATE ( A(NMAX*NMAX,NEED), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B(NMAX*NMAX,5), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C(NCMAX*NCMAX,NCMAX*NCMAX), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK(LWORK), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * @@ -1733,7 +1745,7 @@ PROGRAM DCHKEE * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Read the input lines indicating the test path and its parameters. diff --git a/TESTING/EIG/dsyl01.f b/TESTING/EIG/dsyl01.f index 66fa4c074..05c44d124 100644 --- a/TESTING/EIG/dsyl01.f +++ b/TESTING/EIG/dsyl01.f @@ -140,17 +140,35 @@ SUBROUTINE DSYL01( THRESH, NFAIL, RMAX, NINFO, KNT ) * .. * .. Allocate memory dynamically .. ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( SWORK( LDSWORK, 126 ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * diff --git a/TESTING/EIG/schkee.F b/TESTING/EIG/schkee.F index 83e474d99..e9c560ee9 100644 --- a/TESTING/EIG/schkee.F +++ b/TESTING/EIG/schkee.F @@ -1144,13 +1144,25 @@ PROGRAM SCHKEE * .. Allocate memory dynamically .. * ALLOCATE ( A(NMAX*NMAX,NEED), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B(NMAX*NMAX,5), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C(NCMAX*NCMAX,NCMAX*NCMAX), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK(LWORK), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * @@ -1734,7 +1746,7 @@ PROGRAM SCHKEE * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Read the input lines indicating the test path and its parameters. diff --git a/TESTING/EIG/ssyl01.f b/TESTING/EIG/ssyl01.f index fda30a3c0..6ceab483d 100644 --- a/TESTING/EIG/ssyl01.f +++ b/TESTING/EIG/ssyl01.f @@ -140,17 +140,35 @@ SUBROUTINE SSYL01( THRESH, NFAIL, RMAX, NINFO, KNT ) * .. * .. Allocate memory dynamically .. ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( SWORK( LDSWORK, 54 ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * diff --git a/TESTING/EIG/zchkee.F b/TESTING/EIG/zchkee.F index 0ec9af9da..3db1c10b6 100644 --- a/TESTING/EIG/zchkee.F +++ b/TESTING/EIG/zchkee.F @@ -1141,17 +1141,35 @@ PROGRAM ZCHKEE * .. Allocate memory dynamically .. * ALLOCATE ( S(NMAX*NMAX), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( A(NMAX*NMAX,NEED), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B(NMAX*NMAX,5), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C(NCMAX*NCMAX,NCMAX*NCMAX), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( RWORK(LWORK), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK(LWORK), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * @@ -1729,7 +1747,7 @@ PROGRAM ZCHKEE * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Read the input lines indicating the test path and its parameters. diff --git a/TESTING/EIG/zsyl01.f b/TESTING/EIG/zsyl01.f index 5d26d494c..c15acc4bf 100644 --- a/TESTING/EIG/zsyl01.f +++ b/TESTING/EIG/zsyl01.f @@ -143,17 +143,35 @@ SUBROUTINE ZSYL01( THRESH, NFAIL, RMAX, NINFO, KNT ) * .. * .. Allocate memory dynamically .. ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( SWORK( LDSWORK, 103 ), STAT = AllocateStatus ) - IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF( AllocateStatus /= 0 ) THEN + WRITE( *, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * diff --git a/TESTING/LIN/alareq.f b/TESTING/LIN/alareq.f index e30578c46..c15a0a258 100644 --- a/TESTING/LIN/alareq.f +++ b/TESTING/LIN/alareq.f @@ -212,7 +212,7 @@ SUBROUTINE ALAREQ( PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT ) 9994 FORMAT( ' ==> Specify ', I4, ' matrix types on this line or ', $ 'adjust NTYPES on previous line' ) WRITE( NOUT, FMT = * ) - STOP + STOP 1 * * End of ALAREQ * diff --git a/TESTING/LIN/cchkaa.F b/TESTING/LIN/cchkaa.F index 60d2524c4..ac181df8c 100644 --- a/TESTING/LIN/cchkaa.F +++ b/TESTING/LIN/cchkaa.F @@ -204,19 +204,40 @@ PROGRAM CCHKAA * .. Allocate memory dynamically .. * ALLOCATE ( IWORK( 34*NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( A( ( KDMAX+1 )*NMAX, 8 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B( NMAX*MAXRHS, 4 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK( NMAX, NMAX+MAXRHS+10 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( E( NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( S( 2*NMAX ), STAT = AllocateStatus) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( RWORK( 150*NMAX+2*MAXRHS ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * @@ -400,7 +421,7 @@ PROGRAM CCHKAA * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/cchkrfp.f b/TESTING/LIN/cchkrfp.f index 623656762..5a7a02ade 100644 --- a/TESTING/LIN/cchkrfp.f +++ b/TESTING/LIN/cchkrfp.f @@ -213,7 +213,7 @@ PROGRAM CCHKRFP * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/dchkaa.F b/TESTING/LIN/dchkaa.F index c66d78fc5..d0f7dbcb4 100644 --- a/TESTING/LIN/dchkaa.F +++ b/TESTING/LIN/dchkaa.F @@ -197,19 +197,40 @@ PROGRAM DCHKAA * .. Allocate memory dynamically .. * ALLOCATE ( IWORK( 34*NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( A( ( KDMAX+1 )*NMAX, 8 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B( NMAX*MAXRHS, 4 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK( NMAX, 3*NMAX+MAXRHS+30 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( E( NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( S( 2*NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( RWORK( 5*NMAX+2*MAXRHS ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * * .. Executable Statements .. * @@ -393,7 +414,7 @@ PROGRAM DCHKAA * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/dchkab.f b/TESTING/LIN/dchkab.f index 25f081302..3999f211c 100644 --- a/TESTING/LIN/dchkab.f +++ b/TESTING/LIN/dchkab.f @@ -214,7 +214,7 @@ PROGRAM DCHKAB * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/dchkrfp.f b/TESTING/LIN/dchkrfp.f index c4290ff74..8d265efc1 100644 --- a/TESTING/LIN/dchkrfp.f +++ b/TESTING/LIN/dchkrfp.f @@ -212,7 +212,7 @@ PROGRAM DCHKRFP * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/schkaa.F b/TESTING/LIN/schkaa.F index c3a8bde80..dd3f8de4b 100644 --- a/TESTING/LIN/schkaa.F +++ b/TESTING/LIN/schkaa.F @@ -194,19 +194,40 @@ PROGRAM SCHKAA * .. Allocate memory dynamically .. * ALLOCATE ( IWORK( 34*NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( A( ( KDMAX+1 )*NMAX, 8 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B( NMAX*MAXRHS, 4 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK( NMAX, 3*NMAX+MAXRHS+30 ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( E( NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( S( 2*NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( RWORK( 5*NMAX+2*MAXRHS ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * @@ -390,7 +411,7 @@ PROGRAM SCHKAA * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/schkrfp.f b/TESTING/LIN/schkrfp.f index be26151ad..d552a6584 100644 --- a/TESTING/LIN/schkrfp.f +++ b/TESTING/LIN/schkrfp.f @@ -211,7 +211,7 @@ PROGRAM SCHKRFP * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/zchkaa.F b/TESTING/LIN/zchkaa.F index 81bb6fd96..fb1b5cd59 100644 --- a/TESTING/LIN/zchkaa.F +++ b/TESTING/LIN/zchkaa.F @@ -204,19 +204,40 @@ PROGRAM ZCHKAA * .. Allocate memory dynamically .. * ALLOCATE ( IWORK( 34*NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( A ( (KDMAX+1) * NMAX, 8 ), STAT = AllocateStatus) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( B ( NMAX * MAXRHS, 4 ), STAT = AllocateStatus) - IF (AllocateStatus /= 0 ) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0 ) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( WORK ( NMAX, NMAX+MAXRHS+10 ), STAT = AllocateStatus) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( E( NMAX ), STAT = AllocateStatus ) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( S( 2*NMAX ), STAT = AllocateStatus) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF ALLOCATE ( RWORK( 150*NMAX+2*MAXRHS ), STAT = AllocateStatus) - IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + IF (AllocateStatus /= 0) THEN + WRITE( NOUT, FMT = * )'*** Not enough memory ***' + STOP 1 + END IF * .. * .. Executable Statements .. * @@ -400,7 +421,7 @@ PROGRAM ZCHKAA * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/zchkab.f b/TESTING/LIN/zchkab.f index 253905fea..2f2c92c56 100644 --- a/TESTING/LIN/zchkab.f +++ b/TESTING/LIN/zchkab.f @@ -215,7 +215,7 @@ PROGRAM ZCHKAB * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. diff --git a/TESTING/LIN/zchkrfp.f b/TESTING/LIN/zchkrfp.f index 4c1b0e7a6..bff2192ab 100644 --- a/TESTING/LIN/zchkrfp.f +++ b/TESTING/LIN/zchkrfp.f @@ -213,7 +213,7 @@ PROGRAM ZCHKRFP * IF( FATAL ) THEN WRITE( NOUT, FMT = 9999 ) - STOP + STOP 1 END IF * * Calculate and print the machine dependent constants. From 49b682651d169bca02cd0edd4581acc2f2c26d54 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Thu, 10 Sep 2026 22:36:01 +0100 Subject: [PATCH 08/18] lapack_testing.py: fail when an output file accounts for no tests --fail-if-empty only looked at the grand total, so one driver that wrote its header and then ran nothing passed unnoticed as long as its siblings kept the total above zero. That is the shape of a driver whose input file has stopped lining up with what it reads: the run is not an error by any measure the script applies, the tests simply are not there. Report every analyzed output file whose test count is zero, and let --fail-if-empty fail on it as well. Measured over a clean build, the smallest per-file count is 6 tests and none is zero, so this does not fire on a healthy run. Co-Authored-By: Claude Opus 5 (1M context) --- lapack_testing.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lapack_testing.py b/lapack_testing.py index 2efacbec5..966ffdf8e 100755 --- a/lapack_testing.py +++ b/lapack_testing.py @@ -2089,7 +2089,8 @@ def parse_args(argv: "Optional[Sequence[str]]" = None) -> argparse.Namespace: parser.add_argument( "--fail-if-empty", action="store_true", - help="exit with a nonzero status if no test results were analyzed", + help="exit with a nonzero status if no test results were analyzed, " + "or if any analyzed output file accounted for no tests at all", ) parser.add_argument( "--fail-on-unrecognized", @@ -2419,6 +2420,28 @@ def main(argv: "Optional[Sequence[str]]" = None) -> int: file=sys.stderr, ) + # A file that parses but accounts for no tests at all means a driver + # wrote its header and then ran nothing, which is what happens when + # its input file stops lining up with what it reads. Neither of the + # other checks notices: such a driver exits with status 0, and its + # sibling files keep the grand total nonzero. + empty_outputs = [ + outcome + for outcome in outcomes + if outcome.report is not None and outcome.report.counts.runs == 0 + ] + if empty_outputs: + print( + "lapack_testing.py: {} output file(s) accounted for no tests at " + "all:".format(len(empty_outputs)), + file=sys.stderr, + ) + for outcome in empty_outputs: + print( + " {}".format(outcome.case.suffixed_output(outcome.suffix)), + file=sys.stderr, + ) + unrecognized = find_unrecognized_outputs(directories) if unrecognized: print( @@ -2454,7 +2477,7 @@ def main(argv: "Optional[Sequence[str]]" = None) -> int: if markdown_error is not None: print("lapack_testing.py: {}".format(markdown_error), file=sys.stderr) - if args.fail_if_empty and grand_total.runs == 0: + if args.fail_if_empty and (grand_total.runs == 0 or empty_outputs): return 1 if args.fail_on_unrecognized and unrecognized: return 1 From 2568dcca018616a6756f2cd3a9d3ac9a7779553d Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:42:30 +0200 Subject: [PATCH 09/18] lapack_testing.py: fix the LAPACKE driver names The drivers lost their _lapacke segment when the testing CMakeLists was reworked, so --run could not find any of them. Co-Authored-By: Claude Opus 5 (1M context) --- lapack_testing.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lapack_testing.py b/lapack_testing.py index 966ffdf8e..268812cd8 100755 --- a/lapack_testing.py +++ b/lapack_testing.py @@ -8,14 +8,14 @@ precision (s/d/c/z). With ``--run`` it executes the testing drivers first and then analyzes their output. -The LAPACKE (``xlintst?_lapacke_*``), BLAS (``xblat[123]?``) and CBLAS -(``x?cblat[123]``) test drivers are analyzed too, from their own testing -directories, and are reported in their own summary sections. The -LAPACKE drivers are the linear equation tests rebuilt with the routine -calls routed through LAPACKE, one driver per precision and (API layer, -matrix layout) flavor; their output uses the classic LAPACK summary -format. The BLAS and CBLAS drivers report their test counts in -lines of the form:: +The LAPACKE (``xlintst?_{work,high}_{cm,rm}``), BLAS (``xblat[123]?``) +and CBLAS (``x?cblat[123]``) test drivers are analyzed too, from their +own testing directories, and are reported in their own summary +sections. The LAPACKE drivers are the linear equation tests rebuilt +with the routine calls routed through LAPACKE, one driver per precision +and (API layer, matrix layout) flavor; their output uses the classic +LAPACK summary format. The BLAS and CBLAS drivers report their test +counts in lines of the form:: SGEMV COMPUTATIONAL TESTS: 3456 RUN, 0 FAILED SGEMV ERROR-EXIT TESTS: 6 RUN, 0 FAILED @@ -547,7 +547,7 @@ def build_test_cases(letters: str, families: "Sequence[str]") -> "List[TestCase] source_input=None if error_exits else "{}test.in".format(letter), - executable="xlintst{}_lapacke_{}_{}".format( + executable="xlintst{}_{}_{}".format( letter, layer, layout ), parser=PARSER_STANDARD, From f9cf59372420421b50a9c4c5a858afd9c59443c6 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:43:12 +0200 Subject: [PATCH 10/18] lapack_testing.py: separate the empty-output check --fail-if-empty gated both "no results at all" and "some output file ran nothing", with no way to ask for one without the other. Co-Authored-By: Claude Opus 5 (1M context) --- CMakeLists.txt | 3 ++- lapack_testing.py | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 527e34df2..c8ec8da9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -461,7 +461,8 @@ if(BUILD_TESTING AND Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON) NAME LAPACK_Test_Summary WORKING_DIRECTORY ${LAPACK_BINARY_DIR} COMMAND ${Python3_EXECUTABLE} "lapack_testing.py" - "--fail-on-error" "--fail-if-empty" "--fail-on-unrecognized" "--merge-apis" + "--fail-on-error" "--fail-if-empty" "--fail-on-empty-output" + "--fail-on-unrecognized" "--merge-apis" "--junit-xml" "lapack_testing_junit.xml" ${_summary_job_option} ) diff --git a/lapack_testing.py b/lapack_testing.py index 268812cd8..6918b1d02 100755 --- a/lapack_testing.py +++ b/lapack_testing.py @@ -2089,8 +2089,14 @@ def parse_args(argv: "Optional[Sequence[str]]" = None) -> argparse.Namespace: parser.add_argument( "--fail-if-empty", action="store_true", - help="exit with a nonzero status if no test results were analyzed, " - "or if any analyzed output file accounted for no tests at all", + help="exit with a nonzero status if no test results were analyzed " + "at all", + ) + parser.add_argument( + "--fail-on-empty-output", + action="store_true", + help="exit with a nonzero status if any analyzed output file " + "accounted for no tests at all", ) parser.add_argument( "--fail-on-unrecognized", @@ -2109,10 +2115,10 @@ def main(argv: "Optional[Sequence[str]]" = None) -> int: Returns: int: The process exit status. This is 2 for usage errors, 1 if a - condition requested via ``--fail-on-error``, ``--fail-if-empty`` - or ``--fail-on-unrecognized`` occurred or a report requested via - ``--junit-xml`` or ``--markdown`` could not be written, and 0 - otherwise. + condition requested via ``--fail-on-error``, ``--fail-if-empty``, + ``--fail-on-empty-output`` or ``--fail-on-unrecognized`` occurred + or a report requested via ``--junit-xml`` or ``--markdown`` + could not be written, and 0 otherwise. """ args = parse_args(argv) short_summary: bool = args.short or args.number @@ -2477,7 +2483,9 @@ def main(argv: "Optional[Sequence[str]]" = None) -> int: if markdown_error is not None: print("lapack_testing.py: {}".format(markdown_error), file=sys.stderr) - if args.fail_if_empty and (grand_total.runs == 0 or empty_outputs): + if args.fail_if_empty and grand_total.runs == 0: + return 1 + if args.fail_on_empty_output and empty_outputs: return 1 if args.fail_on_unrecognized and unrecognized: return 1 From 5e9d370fd880d63599ebc78a4a58d935634544f2 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:43:38 +0200 Subject: [PATCH 11/18] lapack_testing.py: keep the job id one segment of the class name Job ids carry the runner image version, so their dots split one job across two levels of the JUnit hierarchy. Co-Authored-By: Claude Opus 5 (1M context) --- lapack_testing.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lapack_testing.py b/lapack_testing.py index 6918b1d02..4591c6d1a 100755 --- a/lapack_testing.py +++ b/lapack_testing.py @@ -1313,13 +1313,20 @@ def junit_scoped_name(job: "Optional[str]", name: str, separator: str) -> str: the report is not scoped to a job. name: The name to prefix. separator: What to put between the two: ``"."`` for the dotted - class names, ``" / "`` for the free-text suite names. + class names, which also replaces any dot in ``job``, + ``" / "`` for the free-text suite names. Returns: The prefixed name, or the name unchanged when there is no job. """ if not job: return name + if separator == ".": + # A dotted name is read as a path, one package or class per + # segment. Job identifiers carry the runner image version + # ("ubuntu-26.04-gfortran-shared"), so left alone their dots + # would split one job across two levels of that hierarchy. + job = job.replace(".", "_") return "{}{}{}".format(job, separator, name) From 678f31583f6c882daf87b3d546a8ecfe3f6c3625 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:44:23 +0200 Subject: [PATCH 12/18] TESTING: exit with status 1 from the DMD failure paths The four ?chkdmd drivers printed FAILED and stopped with status 0, so ctest saw a clean run; the STOP that ends the program keeps status 0. Co-Authored-By: Claude Opus 5 (1M context) --- TESTING/EIG/cchkdmd.f90 | 8 ++++---- TESTING/EIG/dchkdmd.f90 | 4 ++-- TESTING/EIG/schkdmd.f90 | 2 +- TESTING/EIG/zchkdmd.f90 | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/TESTING/EIG/cchkdmd.f90 b/TESTING/EIG/cchkdmd.f90 index bef8771cb..79a4a5f6e 100644 --- a/TESTING/EIG/cchkdmd.f90 +++ b/TESTING/EIG/cchkdmd.f90 @@ -147,7 +147,7 @@ PROGRAM DMD_TEST ! Test the dimensions IF ( ( MIN(M,N) == 0 ) .OR. ( M < N ) ) THEN WRITE(*,*) 'Bad dimensions. Required: M >= N > 0.' - STOP + STOP 1 END IF !............. ! The seed inside the LLOOP so that each pass can be reproduced easily. @@ -352,7 +352,7 @@ PROGRAM DMD_TEST WRITE(*,*) 'The input parameters were ', & SCALE, JOBZ, RESIDS, JOBREF, WHTSVD, & M, N, LDX, LDY, NRNK, TOL, LDZ, LDAU, LDW, LDS - STOP + STOP 1 ELSE !WRITE(*,*) '... done. Workspace length computed.' END IF @@ -376,7 +376,7 @@ PROGRAM DMD_TEST WRITE(*,*) 'The input parameters were ',& SCALE, JOBZ, RESIDS, JOBREF, WHTSVD, & M, N, LDX, LDY, NRNK, TOL - STOP + STOP 1 END IF SINGVX(1:N) = WORK(1:N) @@ -527,7 +527,7 @@ PROGRAM DMD_TEST WRITE(*,*) 'The input parameters were ',& SCALE, JOBZ, RESIDS, WANTQ, WANTR, WHTSVD, & M, N, LDX, LDY, NRNK, TOL - STOP + STOP 1 END IF SINGVQX(1:N) =WORK(1:N) diff --git a/TESTING/EIG/dchkdmd.f90 b/TESTING/EIG/dchkdmd.f90 index 5213008b2..dbabc7e7a 100644 --- a/TESTING/EIG/dchkdmd.f90 +++ b/TESTING/EIG/dchkdmd.f90 @@ -156,7 +156,7 @@ PROGRAM DMD_TEST ! ... Test the dimensions IF ( ( MIN(M,N) == 0 ) .OR. ( M < N ) ) THEN WRITE(*,*) 'Bad dimensions. Required: M >= N > 0.' - STOP + STOP 1 END IF !............. ! The seed inside the LLOOP so that each pass can be reproduced easily. @@ -660,7 +660,7 @@ PROGRAM DMD_TEST NFAIL_REZQ = NFAIL_REZQ + 1 WRITE(*,*) '................ DGEDMDQ FAILED!', & 'Check the code for implementation errors.' - STOP + STOP 1 END IF END IF diff --git a/TESTING/EIG/schkdmd.f90 b/TESTING/EIG/schkdmd.f90 index f21dd2447..2a708dfd8 100644 --- a/TESTING/EIG/schkdmd.f90 +++ b/TESTING/EIG/schkdmd.f90 @@ -156,7 +156,7 @@ PROGRAM DMD_TEST ! ... Test the dimensions IF ( ( MIN(M,N) == 0 ) .OR. ( M < N ) ) THEN WRITE(*,*) 'Bad dimensions. Required: M >= N > 0.' - STOP + STOP 1 END IF !............. ! The seed inside the LLOOP so that each pass can be reproduced easily. diff --git a/TESTING/EIG/zchkdmd.f90 b/TESTING/EIG/zchkdmd.f90 index a6b1ec519..ff67175c0 100644 --- a/TESTING/EIG/zchkdmd.f90 +++ b/TESTING/EIG/zchkdmd.f90 @@ -147,7 +147,7 @@ PROGRAM DMD_TEST ! ... Test the dimensions IF ( ( MIN(M,N) == 0 ) .OR. ( M < N ) ) THEN WRITE(*,*) 'Bad dimensions. Required: M >= N > 0.' - STOP + STOP 1 END IF !............. ! The seed inside the LLOOP so that each pass can be reproduced easily. @@ -355,7 +355,7 @@ PROGRAM DMD_TEST WRITE(*,*) 'The input parameters were ', & SCALE, JOBZ, RESIDS, JOBREF, WHTSVD, & M, N, LDX, LDY, NRNK, TOL, LDZ, LDAU, LDW, LDS - STOP + STOP 1 END IF LZWORK = INT(ZDUMMY(LWMINOPT)) @@ -379,7 +379,7 @@ PROGRAM DMD_TEST WRITE(*,*) 'The input parameters were ',& SCALE, JOBZ, RESIDS, JOBREF, WHTSVD, & M, N, LDX, LDY, NRNK, TOL - STOP + STOP 1 END IF SINGVX(1:N) = WORK(1:N) @@ -535,7 +535,7 @@ PROGRAM DMD_TEST WRITE(*,*) 'The input parameters were ',& SCALE, JOBZ, RESIDS, WANTQ, WANTR, WHTSVD, & M, N, LDX, LDY, NRNK, TOL - STOP + STOP 1 END IF SINGVQX(1:N) = WORK(1:N) @@ -606,7 +606,7 @@ PROGRAM DMD_TEST NFAIL_REZQ = NFAIL_REZQ + 1 WRITE(*,*) '................ ZGEDMDQ FAILED!', & 'Check the code for implementation errors.' - STOP + STOP 1 END IF END IF From a0a3a815ef79b5e7f09ddf1c9c16e155ed9a9844 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:49:48 +0200 Subject: [PATCH 13/18] CMAKE: stop the generated test inputs going stale The rewrite runs at configure time, so a copy outlived both edits to its source and the build flipping back to running the error exits. An input with no flag to turn off now gets no copy at all. Co-Authored-By: Claude Opus 5 (1M context) --- CMAKE/LAPACKTestHelpers.cmake | 40 +++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index 7f9ac4bf2..f42263d5f 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -45,24 +45,38 @@ endfunction() function(lapack_test_input out_var input) cmake_parse_arguments(ARG "DISABLE_ERROR_EXIT_TESTS" "OUTPUT" "" ${ARGN}) - if(NOT EXISTS "${input}" OR - NOT (LAPACK_SKIP_ERROR_EXIT_TESTS OR ARG_DISABLE_ERROR_EXIT_TESTS)) - set(${out_var} "${input}" PARENT_SCOPE) - return() - endif() - - file(READ "${input}" content) - string(REGEX REPLACE - "\n[ \t]*(T|\\.TRUE\\.)([ \t]+[^\n]*(Put T to test the error exits|LOGICAL FLAG, T TO TEST ERROR EXITS))" - "\nF\\2" content "${content}") - set(rewritten "${ARG_OUTPUT}") if(NOT rewritten) get_filename_component(name "${input}" NAME) set(rewritten "${CMAKE_CURRENT_BINARY_DIR}/${name}") endif() - file(WRITE "${rewritten}" "${content}") - set(${out_var} "${rewritten}" PARENT_SCOPE) + + set(content "") + set(disabled "") + if(EXISTS "${input}" AND + (LAPACK_SKIP_ERROR_EXIT_TESTS OR ARG_DISABLE_ERROR_EXIT_TESTS)) + # The rewrite happens at configure time, so ask CMake to re-run when + # ${input} changes; otherwise the build tree goes on serving a copy + # made from a version of it that no longer exists. + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${input}") + file(READ "${input}" content) + string(REGEX REPLACE + "\n[ \t]*(T|\\.TRUE\\.)([ \t]+[^\n]*(Put T to test the error exits|LOGICAL FLAG, T TO TEST ERROR EXITS))" + "\nF\\2" disabled "${content}") + endif() + + # Only a copy that differs is worth having. Everywhere else -- a build + # that runs the error exits, an input with no flag to turn off -- uses + # ${input} itself, and any copy an earlier configure left behind goes: + # lapack_testing.py --run prefers the copy in the build tree, so a stale + # one would feed the drivers what ctest never sees. + if(disabled STREQUAL content) + file(REMOVE "${rewritten}") + set(${out_var} "${input}" PARENT_SCOPE) + else() + file(WRITE "${rewritten}" "${disabled}") + set(${out_var} "${rewritten}" PARENT_SCOPE) + endif() endfunction() # Build the ctest COMMAND that runs ${target}, optionally reading standard From c469bd8085b0d8c69ecc595863b4b8df0d01a83d Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:50:51 +0200 Subject: [PATCH 14/18] CMAKE: let LAPACK_SKIP_ERROR_EXIT_TESTS be set, and cover macOS An unconditional else() clobbered -D, and a shared macOS build without USE_FLAT_NAMESPACE hits the same XERBLA override failure as Windows. The warning that replaced it also tested BUILD_TESTING before the option declaring it. Co-Authored-By: Claude Opus 5 (1M context) --- CMAKE/LAPACKTestHelpers.cmake | 30 ++++++++++++++++++++++-------- CMakeLists.txt | 6 ------ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index f42263d5f..0dbca346f 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -3,14 +3,28 @@ # stops. A shared library on Windows always calls the XERBLA it was linked # with, so the first deliberate illegal argument stops the driver before any # test runs. CBLAS skips its xerbla tests for the same reason, see -# CBLAS/testing. -if(WIN32 AND BUILD_SHARED_LIBS) - set(LAPACK_SKIP_ERROR_EXIT_TESTS ON) - message(STATUS - "Disabling the error-exit tests: the test suite's XERBLA cannot replace " - "the one in a shared library on Windows") -else() - set(LAPACK_SKIP_ERROR_EXIT_TESTS OFF) +# CBLAS/testing. macOS binds a shared library with a two-level namespace by +# default, which keeps the override from taking effect in the same way; +# USE_FLAT_NAMESPACE restores it, see the top-level CMakeLists.txt. +# +# Recomputed on every configure, so that toggling BUILD_SHARED_LIBS in an +# existing build tree is picked up, but left alone when it was asked for on +# the command line: -D puts it in the cache, which defines it here. +if(NOT DEFINED LAPACK_SKIP_ERROR_EXIT_TESTS) + if(WIN32 AND BUILD_SHARED_LIBS) + set(LAPACK_SKIP_ERROR_EXIT_TESTS ON) + message(STATUS + "Disabling the error-exit tests: the test suite's XERBLA cannot replace " + "the one in a shared library on Windows") + elseif(APPLE AND BUILD_SHARED_LIBS AND NOT USE_FLAT_NAMESPACE) + set(LAPACK_SKIP_ERROR_EXIT_TESTS ON) + message(STATUS + "Disabling the error-exit tests: the test suite's XERBLA cannot replace " + "the one in a shared library bound with the default two-level namespace; " + "configure with -D USE_FLAT_NAMESPACE=ON to run them") + else() + set(LAPACK_SKIP_ERROR_EXIT_TESTS OFF) + endif() endif() # nagfor folds the SQRT( -ONE ) with which the ?errcxx drivers manufacture diff --git a/CMakeLists.txt b/CMakeLists.txt index c8ec8da9b..9a3fcb34b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,12 +165,6 @@ if(APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-flat_namespace") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-flat_namespace") - else() - if(BUILD_SHARED_LIBS AND BUILD_TESTING) - message(WARNING - "LAPACK test suite might fail with shared libraries and the default two-level namespace. " - "Disable shared libraries or enable flat namespace for symbol resolution via -DUSE_FLAT_NAMESPACE=ON.") - endif() endif() endif() From 8b7839918126c728bb73f32b417e62baf2a32c7f Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:51:30 +0200 Subject: [PATCH 15/18] LAPACKE: quote the test input and output paths A build directory with a space in it split them into extra arguments, which cmake_parse_arguments then discarded. Co-Authored-By: Claude Opus 5 (1M context) --- LAPACKE/testing/CMakeLists.txt | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/LAPACKE/testing/CMakeLists.txt b/LAPACKE/testing/CMakeLists.txt index f6d610d31..9c33201c7 100644 --- a/LAPACKE/testing/CMakeLists.txt +++ b/LAPACKE/testing/CMakeLists.txt @@ -61,12 +61,12 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) lapack_nag_disable_constant_propagation(${_lin_sources_test}) lapack_test_input(_test_input - ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in - OUTPUT ${_lapacke_test_out_dir}/${_prec}test.in) + "${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in" + OUTPUT "${_lapacke_test_out_dir}/${_prec}test.in") lapack_test_input(_test_input_noerr - ${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in + "${LAPACK_SOURCE_DIR}/TESTING/${_prec}test.in" DISABLE_ERROR_EXIT_TESTS - OUTPUT ${_lapacke_test_out_dir}/${_prec}test_noerr.in) + OUTPUT "${_lapacke_test_out_dir}/${_prec}test_noerr.in") if(BUILD_DEFAULT_API) add_library(xlintst${_prec}_lapacke_core OBJECT ${_lin_sources_test}) @@ -82,13 +82,14 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) lapacke_test_wrappers_${_layer}_${_layout} ${TMGLIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - set(_output ${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}.out) + set(_output "${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}.out") if(_layer STREQUAL "work" AND _layout STREQUAL "cm") - set(_input ${_test_input}) + set(_input "${_test_input}") else() - set(_input ${_test_input_noerr}) + set(_input "${_test_input_noerr}") endif() - lapack_runtest_command(_test_command ${_driver} INPUT ${_input} OUTPUT ${_output}) + lapack_runtest_command(_test_command ${_driver} + INPUT "${_input}" OUTPUT "${_output}") add_test(NAME LAPACKE-${_driver}_${_prec}test_in COMMAND ${_test_command}) endforeach() endforeach() @@ -119,13 +120,14 @@ foreach(_prec IN LISTS LAPACKE_TEST_PRECISIONS) lapacke_test_wrappers_${_layer}_${_layout}_64 ${TMGLIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - set(_output ${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}_64.out) + set(_output "${_lapacke_test_out_dir}/${_prec}test_${_layer}_${_layout}_64.out") if(_layer STREQUAL "work" AND _layout STREQUAL "cm") - set(_input ${_test_input}) + set(_input "${_test_input}") else() - set(_input ${_test_input_noerr}) + set(_input "${_test_input_noerr}") endif() - lapack_runtest_command(_test_command ${_driver} INPUT ${_input} OUTPUT ${_output}) + lapack_runtest_command(_test_command ${_driver} + INPUT "${_input}" OUTPUT "${_output}") add_test(NAME LAPACKE-${_driver}_${_prec}test_in COMMAND ${_test_command}) endforeach() endforeach() From 8927e811a3a1c6d43215d33aa8f72c14640d1c47 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 14:55:19 +0200 Subject: [PATCH 16/18] CMAKE: keep the NAG constant-propagation flag in one place BLAS/TESTING hand-rolled the same compiler-id test and flag the helper was added to hold, for its own set of drivers. Co-Authored-By: Claude Opus 5 (1M context) --- BLAS/TESTING/CMakeLists.txt | 8 +++----- CMAKE/LAPACKTestHelpers.cmake | 35 +++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt index 010136240..0241f2df5 100644 --- a/BLAS/TESTING/CMakeLists.txt +++ b/BLAS/TESTING/CMakeLists.txt @@ -15,11 +15,9 @@ function(_add_blas_test name src test_input test_output) endif() add_test(NAME BLAS-${name} COMMAND ${test_command}) - # Disable constant propagation for NAG compiler to avoid issues with - # special values (Inf, NaN) returned by SXVALS and DXVALS. - if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") - target_compile_options(${name} PRIVATE "-Onopropagate") - endif() + # The special values (Inf, NaN) that SXVALS and DXVALS return do not + # survive nagfor folding the expressions that make them. + lapack_nag_disable_constant_propagation_target(${name}) endfunction() function(add_blas_test name source) diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index 0dbca346f..0d0082b96 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -27,25 +27,44 @@ if(NOT DEFINED LAPACK_SKIP_ERROR_EXIT_TESTS) endif() endif() -# nagfor folds the SQRT( -ONE ) with which the ?errcxx drivers manufacture -# a NaN and rejects it ("Invalid operand for intrinsic SQRT ... Errors found -# during constant propagation"), so those drivers are compiled with constant -# propagation disabled. Call this with every source list such a driver is -# built from: the generated _64 and _TEST copies need it as much as the -# originals. +# nagfor folds expressions that deliberately manufacture an Inf or a NaN +# and then rejects the result ("Invalid operand for intrinsic SQRT ... Errors +# found during constant propagation"), so the test drivers that do that are +# built with constant propagation disabled. The compiler id and the flag it +# takes live here only. +if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") + set(LAPACK_NO_CONSTANT_PROPAGATION_FLAG "-Onopropagate") +else() + set(LAPACK_NO_CONSTANT_PROPAGATION_FLAG "") +endif() + +# Disable it for the ?errcxx drivers among ARGN, which manufacture their NaN +# with SQRT( -ONE ). Call this with every source list such a driver is built +# from: the generated _64 and _TEST copies need it as much as the originals. function(lapack_nag_disable_constant_propagation) - if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") + if(NOT LAPACK_NO_CONSTANT_PROPAGATION_FLAG) return() endif() foreach(source IN LISTS ARGN) get_filename_component(name "${source}" NAME) if(name MATCHES "^[scdz]errcxx(_[A-Za-z0-9]+)*\\.f$") set_source_files_properties("${source}" - PROPERTIES COMPILE_OPTIONS "-Onopropagate") + PROPERTIES COMPILE_OPTIONS "${LAPACK_NO_CONSTANT_PROPAGATION_FLAG}") endif() endforeach() endfunction() +# The same for a whole target: the BLAS drivers take the special values they +# test from SXVALS and DXVALS, so there is no one source file to pick out by +# name here. +function(lapack_nag_disable_constant_propagation_target target) + if(NOT LAPACK_NO_CONSTANT_PROPAGATION_FLAG) + return() + endif() + target_compile_options(${target} + PRIVATE "${LAPACK_NO_CONSTANT_PROPAGATION_FLAG}") +endfunction() + # Set ${out_var} to the test input to feed to a test driver. Every driver # that tests error exits reads a TSTERR flag from its input, so where those # tests cannot run, or where DISABLE_ERROR_EXIT_TESTS asks for it anyway, From c24b6159d6836477cee673bca174401671761502 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 15:06:19 +0200 Subject: [PATCH 17/18] TESTING: write the ?gd.in error-exit flag as T The four generalized-eigenvalue inputs were the only ones spelling it .TRUE., which the CMake rewrite carried a second pattern for. Co-Authored-By: Claude Opus 5 (1M context) --- CMAKE/LAPACKTestHelpers.cmake | 4 ++-- TESTING/cgd.in | 12 ++++++------ TESTING/dgd.in | 12 ++++++------ TESTING/sgd.in | 12 ++++++------ TESTING/zgd.in | 12 ++++++------ 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index 0d0082b96..d030f7245 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -94,8 +94,8 @@ function(lapack_test_input out_var input) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${input}") file(READ "${input}" content) string(REGEX REPLACE - "\n[ \t]*(T|\\.TRUE\\.)([ \t]+[^\n]*(Put T to test the error exits|LOGICAL FLAG, T TO TEST ERROR EXITS))" - "\nF\\2" disabled "${content}") + "\n[ \t]*T([ \t]+[^\n]*(Put T to test the error exits|LOGICAL FLAG, T TO TEST ERROR EXITS))" + "\nF\\1" disabled "${content}") endif() # Only a copy that differs is worth having. Everywhere else -- a build diff --git a/TESTING/cgd.in b/TESTING/cgd.in index a030a78a4..9d59a5650 100644 --- a/TESTING/cgd.in +++ b/TESTING/cgd.in @@ -3,7 +3,7 @@ CGV Data for the Complex Nonsymmetric Eigenvalue Driver 2 6 8 10 12 20 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed CGV 26 Test all 26 matrix types CGS Data for the Complex Nonsymmetric Schur Form Driver @@ -11,26 +11,26 @@ CGS Data for the Complex Nonsymmetric Schur Form Driver 2 6 10 12 20 30 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed CGS 26 Test all 26 matrix types CGX Data for the Complex Nonsymmetric Schur Form Expert Driver 2 Largest matrix dimension (0 <= NSIZE <= 5) 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed CXV Data for the Complex Nonsymmetric Eigenvalue Expert Driver 6 Number of matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed CGX Data for the Complex Nonsymmetric Schur Form Expert Driver 0 Number of matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 2 @@ -107,7 +107,7 @@ CXV Data for the Complex Nonsymmetric Eigenvalue Expert Driver 0 Number of matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 ( 2.0000E+00, 6.0000E+00) diff --git a/TESTING/dgd.in b/TESTING/dgd.in index 67726ea13..496d1e0eb 100644 --- a/TESTING/dgd.in +++ b/TESTING/dgd.in @@ -3,7 +3,7 @@ DGS Data for the Real Nonsymmetric Schur Form Driver 2 6 10 12 20 30 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 2 Code to interpret the seed 1234 5678 9012 3456 DGS 26 Test all 26 matrix types @@ -12,20 +12,20 @@ DGV Data for the Real Nonsymmetric Eigenvalue Problem Driver 2 6 8 10 15 20 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold value -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed DGV 26 Test all 26 matrix types DGX Data for the Real Nonsymmetric Schur Form Expert Driver 2 Largest matrix dimension (0 <= NSIZE <= 5) 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed DGX Data for the Real Nonsymmetric Schur Form Expert Driver 0 Largest matrix dimension 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 2 @@ -54,13 +54,13 @@ DXV Data for the Real Nonsymmetric Eigenvalue Expert Driver 5 Largest matrix dimension 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed DXV Data for the Real Nonsymmetric Eigenvalue Expert Driver 0 Largest matrix dimension 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 8.0000D+00 4.0000D+00 -1.3000D+01 4.0000D+00 Input matrix A diff --git a/TESTING/sgd.in b/TESTING/sgd.in index 164b3cc35..21c9a363d 100644 --- a/TESTING/sgd.in +++ b/TESTING/sgd.in @@ -3,7 +3,7 @@ SGS Data for the Real Nonsymmetric Schur Form Driver 2 6 10 12 20 30 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed SGS 26 Test all 26 matrix types SGV Data for the Real Nonsymmetric Eigenvalue Problem Driver @@ -11,20 +11,20 @@ SGV Data for the Real Nonsymmetric Eigenvalue Problem Driver 2 6 8 10 15 20 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold value -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed SGV 26 Test all 26 matrix types SGX Data for the Real Nonsymmetric Schur Form Expert Driver 2 Largest matrix dimension (0 <= NSIZE <= 5) 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed SGX Data for the Real Nonsymmetric Schur Form Expert Driver 0 Largest matrix dimension (0 <= NSIZE <= 5) 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 2 @@ -53,13 +53,13 @@ SXV Data for the Real Nonsymmetric Eigenvalue Expert Driver 5 Largest matrix dimension 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed SXV Data for the Real Nonsymmetric Eigenvalue Expert Driver 0 Largest matrix dimension 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 8.0000E+00 4.0000E+00 -1.3000E+01 4.0000E+00 Input matrix A diff --git a/TESTING/zgd.in b/TESTING/zgd.in index bf462b768..1ebb8640e 100644 --- a/TESTING/zgd.in +++ b/TESTING/zgd.in @@ -3,7 +3,7 @@ ZGV Data for the Complex Nonsymmetric Eigenvalue Driver 2 6 8 10 12 20 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed ZGV 26 Test all 26 matrix types ZGS Data for the Complex Nonsymmetric Schur Form Driver @@ -11,26 +11,26 @@ ZGS Data for the Complex Nonsymmetric Schur Form Driver 2 6 10 12 20 30 Matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed ZGS 26 Test all 26 matrix types ZGX Data for the Complex Nonsymmetric Schur Form Expert Driver 2 Largest matrix dimension (0 <= NSIZE <= 5) 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed ZXV Data for the Complex Nonsymmetric Eigenvalue Expert Driver 6 Number of matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed ZGX Data for the Complex Nonsymmetric Schur Form Expert Driver 0 Number of matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 2 @@ -107,7 +107,7 @@ ZXV Data for the Complex Nonsymmetric Eigenvalue Expert Driver 0 Number of matrix dimensions 1 1 1 2 1 Parameters NB, NBMIN, NXOVER, NS, NBCOL 10 Threshold for test ratios -.TRUE. Put T to test the error exits +T Put T to test the error exits 0 Code to interpret the seed 4 ( 2.0000D+00, 6.0000D+00) From df8b100e884b3217281d2b9c6ec950157acb6de1 Mon Sep 17 00:00:00 2001 From: Simon Maertens Date: Sun, 13 Sep 2026 15:20:25 +0200 Subject: [PATCH 18/18] fixup! CMAKE: keep the NAG constant-propagation flag in one place --- CMAKE/LAPACKTestHelpers.cmake | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/CMAKE/LAPACKTestHelpers.cmake b/CMAKE/LAPACKTestHelpers.cmake index d030f7245..609f32045 100644 --- a/CMAKE/LAPACKTestHelpers.cmake +++ b/CMAKE/LAPACKTestHelpers.cmake @@ -32,24 +32,31 @@ endif() # found during constant propagation"), so the test drivers that do that are # built with constant propagation disabled. The compiler id and the flag it # takes live here only. -if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") - set(LAPACK_NO_CONSTANT_PROPAGATION_FLAG "-Onopropagate") -else() - set(LAPACK_NO_CONSTANT_PROPAGATION_FLAG "") -endif() +# +# Read when this is called rather than when the file is included: the top +# level enables Fortran well after that, so CMAKE_Fortran_COMPILER_ID is +# still empty at include time. +function(lapack_no_constant_propagation_flag out_var) + if(CMAKE_Fortran_COMPILER_ID STREQUAL "NAG") + set(${out_var} "-Onopropagate" PARENT_SCOPE) + else() + set(${out_var} "" PARENT_SCOPE) + endif() +endfunction() # Disable it for the ?errcxx drivers among ARGN, which manufacture their NaN # with SQRT( -ONE ). Call this with every source list such a driver is built # from: the generated _64 and _TEST copies need it as much as the originals. function(lapack_nag_disable_constant_propagation) - if(NOT LAPACK_NO_CONSTANT_PROPAGATION_FLAG) + lapack_no_constant_propagation_flag(flag) + if(NOT flag) return() endif() foreach(source IN LISTS ARGN) get_filename_component(name "${source}" NAME) if(name MATCHES "^[scdz]errcxx(_[A-Za-z0-9]+)*\\.f$") set_source_files_properties("${source}" - PROPERTIES COMPILE_OPTIONS "${LAPACK_NO_CONSTANT_PROPAGATION_FLAG}") + PROPERTIES COMPILE_OPTIONS "${flag}") endif() endforeach() endfunction() @@ -58,11 +65,11 @@ endfunction() # test from SXVALS and DXVALS, so there is no one source file to pick out by # name here. function(lapack_nag_disable_constant_propagation_target target) - if(NOT LAPACK_NO_CONSTANT_PROPAGATION_FLAG) + lapack_no_constant_propagation_flag(flag) + if(NOT flag) return() endif() - target_compile_options(${target} - PRIVATE "${LAPACK_NO_CONSTANT_PROPAGATION_FLAG}") + target_compile_options(${target} PRIVATE "${flag}") endfunction() # Set ${out_var} to the test input to feed to a test driver. Every driver