diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b754a3a..4835e8a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @isuruf @jakirkham \ No newline at end of file +* @h-vetinari @isuruf @jakirkham \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 522eabc..71a0686 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -10,9 +10,10 @@ export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh -endgroup "Start Docker" +( endgroup "Start Docker" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null -startgroup "Configuring conda" export PYTHONUNBUFFERED=1 export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" @@ -36,34 +37,38 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" -endgroup "Configuring conda" + +( endgroup "Configuring conda" ) 2> /dev/null if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then - startgroup "Running conda debug" if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" fi conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" - endgroup "Running conda debug" + # Drop into an interactive shell /bin/bash else - startgroup "Running conda $BUILD_CMD" conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" - endgroup "Running conda build" - startgroup "Validating outputs" + ( startgroup "Validating outputs" ) 2> /dev/null + validate_recipe_outputs "${FEEDSTOCK_NAME}" - endgroup "Validating outputs" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" - endgroup "Uploading packages" fi + + ( endgroup "Uploading packages" ) 2> /dev/null fi +( startgroup "Final checks" ) 2> /dev/null + touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index a53ef3f..57bc95c 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -13,18 +13,23 @@ function startgroup { travis ) echo "$1" echo -en 'travis_fold:start:'"${1// /}"'\\r';; + github_actions ) + echo "::group::$1";; * ) echo "$1";; esac -} +} 2> /dev/null function endgroup { # End a foldable group of log lines # Pass a single argument, quoted + case ${CI:-} in azure ) echo "##[endgroup]";; travis ) echo -en 'travis_fold:end:'"${1// /}"'\\r';; + github_actions ) + echo "::endgroup::";; esac -} +} 2> /dev/null diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 16d6c15..244ccd1 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -7,7 +7,7 @@ source .scripts/logging_utils.sh -startgroup "Configure Docker" +( startgroup "Configure Docker" ) 2> /dev/null set -xeo pipefail @@ -52,11 +52,11 @@ if [ -z "${DOCKER_IMAGE}" ]; then echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) if [ "${DOCKER_IMAGE}" = "" ]; then - echo "No docker_image entry found in ${CONFIG}. Falling back to condaforge/linux-anvil-comp7" - DOCKER_IMAGE="condaforge/linux-anvil-comp7" + echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" + DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" fi else - DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" fi fi @@ -69,9 +69,11 @@ DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ -z "${CI}" ]; then DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi -endgroup "Configure Docker" -startgroup "Start Docker" +( endgroup "Configure Docker" ) 2> /dev/null + +( startgroup "Start Docker" ) 2> /dev/null + export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ @@ -94,4 +96,7 @@ docker run ${DOCKER_RUN_ARGS} \ /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh # verify that the end of the script was reached -test -f "$DONE_CANARY" \ No newline at end of file +test -f "$DONE_CANARY" + +# This closes the last group opened in `build_steps.sh` +( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 614ca84..96d0278 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -2,19 +2,24 @@ source .scripts/logging_utils.sh -set -x +set -xe + +MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} + +( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null -startgroup "Installing a fresh version of Miniforge" MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -bash $MINIFORGE_FILE -b -endgroup "Installing a fresh version of Miniforge" +bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} + +( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null -startgroup "Configuring conda" BUILD_CMD=build -source ${HOME}/miniforge3/etc/profile.d/conda.sh +source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." @@ -24,32 +29,41 @@ conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip ${G echo -e "\n\nSetting up the condarc and mangling the compiler." setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml -mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml -echo -e "\n\nMangling homebrew in the CI to avoid conflicts." -/usr/bin/sudo mangle_homebrew -/usr/bin/sudo -k +if [[ "${CI:-}" != "" ]]; then + mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml +fi + +if [[ "${CI:-}" != "" ]]; then + echo -e "\n\nMangling homebrew in the CI to avoid conflicts." + /usr/bin/sudo mangle_homebrew + /usr/bin/sudo -k +else + echo -e "\n\nNot mangling homebrew as we are not running in CI" +fi echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup -endgroup "Configuring conda" -set -e +( endgroup "Configuring conda" ) 2> /dev/null + -startgroup "Running conda $BUILD_CMD" echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml conda $BUILD_CMD ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} -endgroup "Running conda build" -startgroup "Validating outputs" +( startgroup "Validating outputs" ) 2> /dev/null + validate_recipe_outputs "${FEEDSTOCK_NAME}" -endgroup "Validating outputs" + +( endgroup "Validating outputs" ) 2> /dev/null + +( startgroup "Uploading packages" ) 2> /dev/null if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml - endgroup "Uploading packages" -fi \ No newline at end of file +fi + +( endgroup "Uploading packages" ) 2> /dev/null \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6a7591a..ecb962d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ matrix: - env: CONFIG=linux_ppc64le_ UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=quay.io/condaforge/linux-anvil-ppc64le os: linux arch: ppc64le + dist: focal script: - export CI=travis diff --git a/README.md b/README.md index 599a141..c2dd734 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ Installing `lapack` from the `conda-forge` channel can be achieved by adding `co ``` conda config --add channels conda-forge +conda config --set channel_priority strict ``` Once the `conda-forge` channel has been enabled, `blas, blas-devel, lapack, libblas, libcblas, liblapack, liblapacke, libtmglib` can be installed with: @@ -189,6 +190,7 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@h-vetinari](https://github.com/h-vetinari/) * [@isuruf](https://github.com/isuruf/) * [@jakirkham](https://github.com/jakirkham/) diff --git a/build-locally.py b/build-locally.py index 3453cfe..00eeb34 100755 --- a/build-locally.py +++ b/build-locally.py @@ -7,6 +7,7 @@ import glob import subprocess from argparse import ArgumentParser +import platform def setup_environment(ns): @@ -16,6 +17,10 @@ def setup_environment(ns): os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" if ns.output_id: os.environ["BUILD_OUTPUT_ID"] = ns.output_id + if "MINIFORGE_HOME" not in os.environ: + os.environ["MINIFORGE_HOME"] = os.path.join( + os.path.dirname(__file__), "miniforge3" + ) def run_docker_build(ns): @@ -23,6 +28,11 @@ def run_docker_build(ns): subprocess.check_call([script]) +def run_osx_build(ns): + script = ".scripts/run_osx_build.sh" + subprocess.check_call([script]) + + def verify_config(ns): valid_configs = { os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") @@ -46,10 +56,16 @@ def verify_config(ns): else: raise ValueError("config " + ns.config + " is not valid") # Remove the following, as implemented - if not ns.config.startswith("linux"): + if ns.config.startswith("win"): raise ValueError( - f"only Linux configs currently supported, got {ns.config}" + f"only Linux/macOS configs currently supported, got {ns.config}" ) + elif ns.config.startswith("osx") and platform.system() == "Darwin": + if "OSX_SDK_DIR" not in os.environ: + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=/opt'" + "to download the SDK automatically to '/opt/MacOSX.sdk'" + ) def main(args=None): @@ -68,7 +84,12 @@ def main(args=None): verify_config(ns) setup_environment(ns) - run_docker_build(ns) + if ns.config.startswith("linux") or ( + ns.config.startswith("osx") and platform.system() == "Linux" + ): + run_docker_build(ns) + elif ns.config.startswith("osx"): + run_osx_build(ns) if __name__ == "__main__": diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3ab06d2..df6fdc5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -24,6 +24,8 @@ source: patches: # Avoid setting current_version and compatibility_version - patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch # [osx] + # backport of Reference-LAPACK/lapack#553, can be dropped for v>3.9.1 + - patches/0002-Changes-from-Reference-LAPACK-lapack-553-squashed.patch build: number: "{{ build_num }}" @@ -242,3 +244,4 @@ extra: recipe-maintainers: - jakirkham - isuruf + - h-vetinari diff --git a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch index 9f3e80a..918027b 100644 --- a/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch +++ b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch @@ -1,8 +1,8 @@ From 83bd877a87e6d2ad14ef83c8700ca5c45ea977a0 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 22 Nov 2018 19:39:51 -0600 -Subject: [PATCH] Avoid setting current_version and compatibility_version on - OSX +Subject: [PATCH 1/2] Avoid setting current_version and compatibility_version + on OSX --- BLAS/SRC/CMakeLists.txt | 5 ----- @@ -12,7 +12,7 @@ Subject: [PATCH] Avoid setting current_version and compatibility_version on 4 files changed, 14 deletions(-) diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt -index 0078dca4..86cd4a00 100644 +index 0078dca40..86cd4a004 100644 --- a/BLAS/SRC/CMakeLists.txt +++ b/BLAS/SRC/CMakeLists.txt @@ -98,9 +98,4 @@ endif() @@ -26,7 +26,7 @@ index 0078dca4..86cd4a00 100644 - ) lapack_install_library(${BLASLIB}) diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt -index 1313e798..ab5071ba 100644 +index 1313e798b..ab5071ba1 100644 --- a/CBLAS/src/CMakeLists.txt +++ b/CBLAS/src/CMakeLists.txt @@ -117,8 +117,6 @@ add_library(${CBLASLIB} ${SOURCES}) @@ -39,7 +39,7 @@ index 1313e798..ab5071ba 100644 target_include_directories(${CBLASLIB} PUBLIC $ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt -index 60d5ddbe..e85eb152 100644 +index 60d5ddbe3..e85eb1529 100644 --- a/LAPACKE/CMakeLists.txt +++ b/LAPACKE/CMakeLists.txt @@ -76,8 +76,6 @@ add_library(${LAPACKELIB} ${SOURCES}) @@ -52,7 +52,7 @@ index 60d5ddbe..e85eb152 100644 target_include_directories(${LAPACKELIB} PUBLIC $ diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt -index bd3be3c6..17dc82b0 100644 +index bd3be3c6e..17dc82b07 100644 --- a/SRC/CMakeLists.txt +++ b/SRC/CMakeLists.txt @@ -501,11 +501,6 @@ endif() @@ -68,5 +68,5 @@ index bd3be3c6..17dc82b0 100644 if(USE_XBLAS) target_link_libraries(${LAPACKLIB} PRIVATE ${XBLAS_LIBRARY}) -- -2.29.2.windows.3 +2.31.1.windows.1 diff --git a/recipe/patches/0002-Changes-from-Reference-LAPACK-lapack-553-squashed.patch b/recipe/patches/0002-Changes-from-Reference-LAPACK-lapack-553-squashed.patch new file mode 100644 index 0000000..ddb5d53 --- /dev/null +++ b/recipe/patches/0002-Changes-from-Reference-LAPACK-lapack-553-squashed.patch @@ -0,0 +1,318 @@ +From 5cae4e2de96422342b4ef9aa948afb8d4a5885fc Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Fri, 14 May 2021 18:11:32 +0200 +Subject: [PATCH 2/2] Changes from Reference-LAPACK/lapack#553 (squashed) + +Rename cchkaa.f to cchkaa.F + +Rename dchkaa.f to dchkaa.F + +Rename schkaa.f to schkaa.F + +Rename zchkaa.f to zchkaa.F + +Use dynamic allocation for all large arrays + +Reflect renaming of ?chkaa files to .F + +Reflect renaming of ?chkaa files to .F +--- + TESTING/LIN/CMakeLists.txt | 8 ++++---- + TESTING/LIN/Makefile | 8 ++++---- + TESTING/LIN/{cchkaa.f => cchkaa.F} | 26 +++++++++++++++++++++++--- + TESTING/LIN/{dchkaa.f => dchkaa.F} | 27 +++++++++++++++++++++++---- + TESTING/LIN/{schkaa.f => schkaa.F} | 25 ++++++++++++++++++++++--- + TESTING/LIN/{zchkaa.f => zchkaa.F} | 25 ++++++++++++++++++++++--- + 6 files changed, 98 insertions(+), 21 deletions(-) + rename TESTING/LIN/{cchkaa.f => cchkaa.F} (97%) + rename TESTING/LIN/{dchkaa.f => dchkaa.F} (97%) + rename TESTING/LIN/{schkaa.f => schkaa.F} (97%) + rename TESTING/LIN/{zchkaa.f => zchkaa.F} (97%) + +diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt +index dd32e5995..2c3e2a5fd 100644 +--- a/TESTING/LIN/CMakeLists.txt ++++ b/TESTING/LIN/CMakeLists.txt +@@ -6,7 +6,7 @@ set(SCLNTST slaord.f) + + set(DZLNTST dlaord.f) + +-set(SLINTST schkaa.f ++set(SLINTST schkaa.F + schkeq.f schkgb.f schkge.f schkgt.f + schklq.f schkpb.f schkpo.f schkps.f schkpp.f + schkpt.f schkq3.f schkql.f schkqr.f schkrq.f +@@ -51,7 +51,7 @@ else() + serrvx.f serrge.f serrsy.f serrpo.f) + endif() + +-set(CLINTST cchkaa.f ++set(CLINTST cchkaa.F + cchkeq.f cchkgb.f cchkge.f cchkgt.f + cchkhe.f cchkhe_rook.f cchkhe_rk.f + cchkhe_aa.f cchkhe_aa_2stage.f +@@ -107,7 +107,7 @@ else() + cerrvx.f cerrge.f cerrhe.f cerrsy.f cerrpo.f) + endif() + +-set(DLINTST dchkaa.f ++set(DLINTST dchkaa.F + dchkeq.f dchkgb.f dchkge.f dchkgt.f + dchklq.f dchkpb.f dchkpo.f dchkps.f dchkpp.f + dchkpt.f dchkq3.f dchkql.f dchkqr.f dchkrq.f +@@ -153,7 +153,7 @@ else() + derrvx.f derrge.f derrsy.f derrpo.f) + endif() + +-set(ZLINTST zchkaa.f ++set(ZLINTST zchkaa.F + zchkeq.f zchkgb.f zchkge.f zchkgt.f + zchkhe.f zchkhe_rook.f zchkhe_rk.f + zchkhe_aa.f zchkhe_aa_2stage.f +diff --git a/TESTING/LIN/Makefile b/TESTING/LIN/Makefile +index fd889ee14..2474d04db 100644 +--- a/TESTING/LIN/Makefile ++++ b/TESTING/LIN/Makefile +@@ -317,13 +317,13 @@ cleanobj: + cleanexe: + rm -f xlintst* + +-schkaa.o: schkaa.f ++schkaa.o: schkaa.F + $(FC) $(FFLAGS_DRV) -c -o $@ $< +-dchkaa.o: dchkaa.f ++dchkaa.o: dchkaa.F + $(FC) $(FFLAGS_DRV) -c -o $@ $< +-cchkaa.o: cchkaa.f ++cchkaa.o: cchkaa.F + $(FC) $(FFLAGS_DRV) -c -o $@ $< +-zchkaa.o: zchkaa.f ++zchkaa.o: zchkaa.F + $(FC) $(FFLAGS_DRV) -c -o $@ $< + + .NOTPARALLEL: +diff --git a/TESTING/LIN/cchkaa.f b/TESTING/LIN/cchkaa.F +similarity index 97% +rename from TESTING/LIN/cchkaa.f +rename to TESTING/LIN/cchkaa.F +index d36770be7..f9c77bf0e 100644 +--- a/TESTING/LIN/cchkaa.f ++++ b/TESTING/LIN/cchkaa.F +@@ -156,9 +156,13 @@ + $ NBVAL( MAXIN ), NBVAL2( MAXIN ), + $ NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ), + $ RANKVAL( MAXIN ), PIV( NMAX ) +- REAL RWORK( 150*NMAX+2*MAXRHS ), S( 2*NMAX ) +- COMPLEX A( ( KDMAX+1 )*NMAX, 7 ), B( NMAX*MAXRHS, 4 ), +- $ E( NMAX ), WORK( NMAX, NMAX+MAXRHS+10 ) ++ REAL S( 2*NMAX ) ++ COMPLEX E( NMAX ) ++* .. ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ REAL, DIMENSION(:), ALLOCATABLE :: RWORK ++ COMPLEX, DIMENSION(:,:), ALLOCATABLE :: A, B, WORK + * .. + * .. External Functions .. + LOGICAL LSAME, LSAMEN +@@ -194,6 +198,17 @@ + * .. Data statements .. + DATA THREQ / 2.0 / , INTSTR / '0123456789' / + * .. ++* .. Allocate memory dynamically .. ++* ++ ALLOCATE ( A( ( KDMAX+1 )*NMAX, 7 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE ( B( NMAX*MAXRHS, 4 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE ( WORK( NMAX, NMAX+MAXRHS+10 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE ( RWORK( 150*NMAX+2*MAXRHS ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++* .. + * .. Executable Statements .. + * + S1 = SECOND( ) +@@ -1196,6 +1211,11 @@ + S2 = SECOND( ) + WRITE( NOUT, FMT = 9998 ) + WRITE( NOUT, FMT = 9997 )S2 - S1 ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (WORK, STAT = AllocateStatus) ++ DEALLOCATE (RWORK, STAT = AllocateStatus) + * + 9999 FORMAT( / ' Execution not attempted due to input errors' ) + 9998 FORMAT( / ' End of tests' ) +diff --git a/TESTING/LIN/dchkaa.f b/TESTING/LIN/dchkaa.F +similarity index 97% +rename from TESTING/LIN/dchkaa.f +rename to TESTING/LIN/dchkaa.F +index 03575c4d1..9c4b1ddae 100644 +--- a/TESTING/LIN/dchkaa.f ++++ b/TESTING/LIN/dchkaa.F +@@ -116,7 +116,6 @@ + * -- LAPACK test routine (version 3.9.0) -- + * -- LAPACK is a software package provided by Univ. of Tennessee, -- + * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- +-* Novemebr 2019 + * + * ===================================================================== + * +@@ -152,9 +151,12 @@ + $ NBVAL( MAXIN ), NBVAL2( MAXIN ), + $ NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ), + $ RANKVAL( MAXIN ), PIV( NMAX ) +- DOUBLE PRECISION A( ( KDMAX+1 )*NMAX, 7 ), B( NMAX*MAXRHS, 4 ), +- $ E( NMAX ), RWORK( 5*NMAX+2*MAXRHS ), +- $ S( 2*NMAX ), WORK( NMAX, 3*NMAX+MAXRHS+30 ) ++ DOUBLE PRECISION E( NMAX ), S( 2*NMAX ) ++* .. ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: RWORK ++ DOUBLE PRECISION, DIMENSION(:,:), ALLOCATABLE :: A, B, WORK + * .. + * .. External Functions .. + LOGICAL LSAME, LSAMEN +@@ -188,6 +190,18 @@ + * .. Data statements .. + DATA THREQ / 2.0D0 / , INTSTR / '0123456789' / + * .. ++* .. ++* .. Allocate memory dynamically .. ++* ++ ALLOCATE ( A( ( KDMAX+1 )*NMAX, 7 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE ( B( NMAX*MAXRHS, 4 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE ( WORK( NMAX, 3*NMAX+MAXRHS+30 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE ( RWORK( 5*NMAX+2*MAXRHS ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++* + * .. Executable Statements .. + * + S1 = DSECND( ) +@@ -1039,6 +1053,11 @@ + S2 = DSECND( ) + WRITE( NOUT, FMT = 9998 ) + WRITE( NOUT, FMT = 9997 )S2 - S1 ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (WORK, STAT = AllocateStatus) ++ DEALLOCATE (RWORK, STAT = AllocateStatus) + * + 9999 FORMAT( / ' Execution not attempted due to input errors' ) + 9998 FORMAT( / ' End of tests' ) +diff --git a/TESTING/LIN/schkaa.f b/TESTING/LIN/schkaa.F +similarity index 97% +rename from TESTING/LIN/schkaa.f +rename to TESTING/LIN/schkaa.F +index a9c13e442..08d7b9cd0 100644 +--- a/TESTING/LIN/schkaa.f ++++ b/TESTING/LIN/schkaa.F +@@ -150,9 +150,12 @@ + $ NBVAL( MAXIN ), NBVAL2( MAXIN ), + $ NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ), + $ RANKVAL( MAXIN ), PIV( NMAX ) +- REAL A( ( KDMAX+1 )*NMAX, 7 ), B( NMAX*MAXRHS, 4 ), +- $ E( NMAX ), RWORK( 5*NMAX+2*MAXRHS ), +- $ S( 2*NMAX ), WORK( NMAX, NMAX+MAXRHS+30 ) ++ REAL E( NMAX ), S( 2*NMAX ) ++* .. ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ REAL, DIMENSION(:), ALLOCATABLE :: RWORK ++ REAL, DIMENSION(:,:), ALLOCATABLE :: A, B, WORK + * .. + * .. External Functions .. + LOGICAL LSAME, LSAMEN +@@ -186,6 +189,17 @@ + * .. Data statements .. + DATA THREQ / 2.0E0 / , INTSTR / '0123456789' / + * .. ++* .. Allocate memory dynamically .. ++* ++ ALLOCATE (A( ( KDMAX+1 )*NMAX, 7 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE (B( NMAX*MAXRHS, 4 ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE (WORK( NMAX, NMAX+MAXRHS+30 ) , STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE (RWORK( 5*NMAX+2*MAXRHS ), STAT = AllocateStatus ) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++* .. + * .. Executable Statements .. + * + S1 = SECOND( ) +@@ -1034,6 +1048,11 @@ + S2 = SECOND( ) + WRITE( NOUT, FMT = 9998 ) + WRITE( NOUT, FMT = 9997 )S2 - S1 ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (WORK, STAT = AllocateStatus) ++ DEALLOCATE (RWORK, STAT = AllocateStatus) + * + 9999 FORMAT( / ' Execution not attempted due to input errors' ) + 9998 FORMAT( / ' End of tests' ) +diff --git a/TESTING/LIN/zchkaa.f b/TESTING/LIN/zchkaa.F +similarity index 97% +rename from TESTING/LIN/zchkaa.f +rename to TESTING/LIN/zchkaa.F +index 30d2a084a..74aeb58c6 100644 +--- a/TESTING/LIN/zchkaa.f ++++ b/TESTING/LIN/zchkaa.F +@@ -156,9 +156,13 @@ + $ NBVAL( MAXIN ), NBVAL2( MAXIN ), + $ NSVAL( MAXIN ), NVAL( MAXIN ), NXVAL( MAXIN ), + $ RANKVAL( MAXIN ), PIV( NMAX ) +- DOUBLE PRECISION RWORK( 150*NMAX+2*MAXRHS ), S( 2*NMAX ) +- COMPLEX*16 A( ( KDMAX+1 )*NMAX, 7 ), B( NMAX*MAXRHS, 4 ), +- $ E( NMAX ), WORK( NMAX, NMAX+MAXRHS+10 ) ++ DOUBLE PRECISION S( 2*NMAX ) ++ COMPLEX*16 E( NMAX ) ++* ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE:: RWORK ++ COMPLEX*16, DIMENSION(:,:), ALLOCATABLE:: A, B, WORK + * .. + * .. External Functions .. + LOGICAL LSAME, LSAMEN +@@ -194,6 +198,16 @@ + * .. + * .. Data statements .. + DATA THREQ / 2.0D0 / , INTSTR / '0123456789' / ++* ++* .. Allocate memory dynamically .. ++ ALLOCATE (RWORK( 150*NMAX+2*MAXRHS ), STAT = AllocateStatus) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE (A ((KDMAX+1) * NMAX, 7), STAT = AllocateStatus) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE (B (NMAX * MAXRHS, 4), STAT = AllocateStatus) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" ++ ALLOCATE (WORK (NMAX, NMAX+MAXRHS+10), STAT = AllocateStatus) ++ IF (AllocateStatus /= 0) STOP "*** Not enough memory ***" + * .. + * .. Executable Statements .. + * +@@ -1231,6 +1245,11 @@ + S2 = DSECND( ) + WRITE( NOUT, FMT = 9998 ) + WRITE( NOUT, FMT = 9997 )S2 - S1 ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (RWORK, STAT = AllocateStatus) ++ DEALLOCATE (WORK, STAT = AllocateStatus) + * + 9999 FORMAT( / ' Execution not attempted due to input errors' ) + 9998 FORMAT( / ' End of tests' ) +-- +2.31.1.windows.1 +