diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 953cdc0f..847e597b 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -8,14 +8,17 @@ jobs: vmImage: windows-2022 strategy: matrix: - win_64_blas_implblisblas_impl_liblibblis.4.dll: - CONFIG: win_64_blas_implblisblas_impl_liblibblis.4.dll + win_64_blas_implblisblas_impl_liblibblis.4.dllopenblas_typedummy: + CONFIG: win_64_blas_implblisblas_impl_liblibblis.4.dllopenblas_typedummy UPLOAD_PACKAGES: 'True' - win_64_blas_implmklblas_impl_libmkl_rt.2.dll: - CONFIG: win_64_blas_implmklblas_impl_libmkl_rt.2.dll + win_64_blas_implmklblas_impl_libmkl_rt.2.dllopenblas_typedummy: + CONFIG: win_64_blas_implmklblas_impl_libmkl_rt.2.dllopenblas_typedummy UPLOAD_PACKAGES: 'True' - win_64_blas_implopenblasblas_impl_libopenblas.dll: - CONFIG: win_64_blas_implopenblasblas_impl_libopenblas.dll + win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typeopenmp: + CONFIG: win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typeopenmp + UPLOAD_PACKAGES: 'True' + win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typepthreads: + CONFIG: win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typepthreads UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: diff --git a/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml b/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml index 58046c1b..adec343b 100644 --- a/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml +++ b/.ci_support/linux_64_blas_implblisblas_impl_liblibblis.so.4.yaml @@ -15,9 +15,9 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -33,5 +33,3 @@ zip_keys: - blas_impl_lib - - c_compiler_version - fortran_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml b/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml index fde3ee77..c3f4fbd0 100644 --- a/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml +++ b/.ci_support/linux_64_blas_implmklblas_impl_liblibmkl_rt.so.yaml @@ -15,9 +15,9 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -33,5 +33,3 @@ zip_keys: - blas_impl_lib - - c_compiler_version - fortran_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml b/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml index 03d54ff0..cf7f5e8c 100644 --- a/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml +++ b/.ci_support/linux_64_blas_implopenblasblas_impl_liblibopenblas.so.0.yaml @@ -15,9 +15,9 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -33,5 +33,3 @@ zip_keys: - blas_impl_lib - - c_compiler_version - fortran_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 3c74afa9..2a27b017 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -19,9 +19,9 @@ c_stdlib_version: cdt_arch: - aarch64 cdt_name: -- cos7 +- conda channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -37,5 +37,3 @@ zip_keys: - blas_impl_lib - - c_compiler_version - fortran_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index d4d80d08..c95ef806 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -15,9 +15,9 @@ c_stdlib: c_stdlib_version: - '2.17' cdt_name: -- cos7 +- conda channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main docker_image: @@ -33,5 +33,3 @@ zip_keys: - blas_impl_lib - - c_compiler_version - fortran_compiler_version -- - c_stdlib_version - - cdt_name diff --git a/.ci_support/migrations/flang19.yaml b/.ci_support/migrations/flang19.yaml new file mode 100644 index 00000000..a486133a --- /dev/null +++ b/.ci_support/migrations/flang19.yaml @@ -0,0 +1,13 @@ +__migrator: + kind: version + migration_number: 2 + build_number: 1 + commit_message: Rebuild for flang 19 + platform_allowlist: + - win-64 + override_cbc_keys: + - fortran_compiler_stub +migrator_ts: 1722763680.3089325 + +fortran_compiler_version: # [win64] + - 19 # [win64] diff --git a/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml b/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml index 12d61197..295d3779 100644 --- a/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml +++ b/.ci_support/osx_64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml @@ -13,13 +13,13 @@ blas_impl_lib: c_compiler: - clang c_compiler_version: -- '17' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: - '10.13' channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml b/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml index e2163791..c8cc8a6a 100644 --- a/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml +++ b/.ci_support/osx_64_blas_implblisblas_impl_liblibblis.4.dylib.yaml @@ -13,13 +13,13 @@ blas_impl_lib: c_compiler: - clang c_compiler_version: -- '17' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: - '10.13' channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml b/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml index 35b7ef1d..755079f7 100644 --- a/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml +++ b/.ci_support/osx_64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml @@ -13,13 +13,13 @@ blas_impl_lib: c_compiler: - clang c_compiler_version: -- '17' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: - '10.13' channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml b/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml index 49b7236d..4861a719 100644 --- a/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml +++ b/.ci_support/osx_arm64_blas_implaccelerateblas_impl_liblibvecLibFort-ng.dylib.yaml @@ -13,13 +13,13 @@ blas_impl_lib: c_compiler: - clang c_compiler_version: -- '17' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: - '11.0' channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml b/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml index b4370fc9..3c36e0d2 100644 --- a/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml +++ b/.ci_support/osx_arm64_blas_implopenblasblas_impl_liblibopenblas.0.dylib.yaml @@ -13,13 +13,13 @@ blas_impl_lib: c_compiler: - clang c_compiler_version: -- '17' +- '18' c_stdlib: - macosx_deployment_target c_stdlib_version: - '11.0' channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main fortran_compiler: diff --git a/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dll.yaml b/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dllopenblas_typedummy.yaml similarity index 50% rename from .ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dll.yaml rename to .ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dllopenblas_typedummy.yaml index a68e6320..9fe7817d 100644 --- a/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dll.yaml +++ b/.ci_support/win_64_blas_implblisblas_impl_liblibblis.4.dllopenblas_typedummy.yaml @@ -6,24 +6,25 @@ blas_impl: - blis blas_impl_lib: - libblis.4.dll +c_compiler: +- clang +c_stdlib: +- vs channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main -m2w64_c_compiler: -- gcc -m2w64_c_compiler_version: -- '13' -m2w64_c_stdlib: -- m2w64-sysroot -m2w64_c_stdlib_version: -- '12' -m2w64_fortran_compiler: -- gfortran -m2w64_fortran_compiler_version: -- '13' +fortran_compiler: +- flang +fortran_compiler_version: +- '19' +openblas: +- 0.3.* +openblas_type: +- dummy target_platform: - win-64 zip_keys: - - blas_impl - blas_impl_lib + - openblas_type diff --git a/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dll.yaml b/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dll.yaml deleted file mode 100644 index 99d1db20..00000000 --- a/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dll.yaml +++ /dev/null @@ -1,29 +0,0 @@ -ace: -- 8.0.1 -blas_default_impl: -- mkl -blas_impl: -- mkl -blas_impl_lib: -- mkl_rt.2.dll -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -m2w64_c_compiler: -- gcc -m2w64_c_compiler_version: -- '13' -m2w64_c_stdlib: -- m2w64-sysroot -m2w64_c_stdlib_version: -- '12' -m2w64_fortran_compiler: -- gfortran -m2w64_fortran_compiler_version: -- '13' -target_platform: -- win-64 -zip_keys: -- - blas_impl - - blas_impl_lib diff --git a/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dllopenblas_typedummy.yaml b/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dllopenblas_typedummy.yaml new file mode 100644 index 00000000..1a657aa2 --- /dev/null +++ b/.ci_support/win_64_blas_implmklblas_impl_libmkl_rt.2.dllopenblas_typedummy.yaml @@ -0,0 +1,30 @@ +ace: +- 8.0.1 +blas_default_impl: +- mkl +blas_impl: +- mkl +blas_impl_lib: +- mkl_rt.2.dll +c_compiler: +- clang +c_stdlib: +- vs +channel_sources: +- conda-forge/label/lapack_rc,conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- flang +fortran_compiler_version: +- '19' +openblas: +- 0.3.* +openblas_type: +- dummy +target_platform: +- win-64 +zip_keys: +- - blas_impl + - blas_impl_lib + - openblas_type diff --git a/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dll.yaml b/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typeopenmp.yaml similarity index 50% rename from .ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dll.yaml rename to .ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typeopenmp.yaml index 3b97bdd6..d2f8eeb5 100644 --- a/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dll.yaml +++ b/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typeopenmp.yaml @@ -6,24 +6,25 @@ blas_impl: - openblas blas_impl_lib: - openblas.dll +c_compiler: +- clang +c_stdlib: +- vs channel_sources: -- conda-forge +- conda-forge/label/lapack_rc,conda-forge channel_targets: - conda-forge main -m2w64_c_compiler: -- gcc -m2w64_c_compiler_version: -- '13' -m2w64_c_stdlib: -- m2w64-sysroot -m2w64_c_stdlib_version: -- '12' -m2w64_fortran_compiler: -- gfortran -m2w64_fortran_compiler_version: -- '13' +fortran_compiler: +- flang +fortran_compiler_version: +- '19' +openblas: +- 0.3.* +openblas_type: +- openmp target_platform: - win-64 zip_keys: - - blas_impl - blas_impl_lib + - openblas_type diff --git a/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typepthreads.yaml b/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typepthreads.yaml new file mode 100644 index 00000000..88d82c43 --- /dev/null +++ b/.ci_support/win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typepthreads.yaml @@ -0,0 +1,30 @@ +ace: +- 8.0.1 +blas_default_impl: +- mkl +blas_impl: +- openblas +blas_impl_lib: +- openblas.dll +c_compiler: +- clang +c_stdlib: +- vs +channel_sources: +- conda-forge/label/lapack_rc,conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- flang +fortran_compiler_version: +- '19' +openblas: +- 0.3.* +openblas_type: +- pthreads +target_platform: +- win-64 +zip_keys: +- - blas_impl + - blas_impl_lib + - openblas_type diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index 0535f6aa..00000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,17 +0,0 @@ -on: - status: {} - check_suite: - types: - - completed - -jobs: - automerge-action: - runs-on: ubuntu-latest - name: automerge - steps: - - name: automerge-action - id: automerge-action - uses: conda-forge/automerge-action@main - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }} diff --git a/.github/workflows/webservices.yml b/.github/workflows/webservices.yml deleted file mode 100644 index d6f06b5c..00000000 --- a/.github/workflows/webservices.yml +++ /dev/null @@ -1,13 +0,0 @@ -on: repository_dispatch - -jobs: - webservices: - runs-on: ubuntu-latest - name: webservices - steps: - - name: webservices - id: webservices - uses: conda-forge/webservices-dispatch-action@main - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }} diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 7f948c41..0b364984 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -33,7 +33,7 @@ rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true ( endgroup "Provisioning base env with micromamba" ) 2> /dev/null ( startgroup "Configuring conda" ) 2> /dev/null - +echo "Activating environment" source "${MINIFORGE_HOME}/etc/profile.d/conda.sh" conda activate base export CONDA_SOLVER="libmamba" diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index d3c0345e..1f2ec526 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -12,6 +12,7 @@ setlocal enableextensions enabledelayedexpansion +FOR %%A IN ("%~dp0.") DO SET "REPO_ROOT=%%~dpA" if "%MINIFORGE_HOME%"=="" set "MINIFORGE_HOME=%USERPROFILE%\Miniforge3" :: Remove trailing backslash, if present if "%MINIFORGE_HOME:~-1%"=="\" set "MINIFORGE_HOME=%MINIFORGE_HOME:~0,-1%" @@ -32,17 +33,14 @@ call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefi --channel conda-forge ^ pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" if !errorlevel! neq 0 exit /b !errorlevel! -echo Moving pkgs cache from %MAMBA_ROOT_PREFIX% to %MINIFORGE_HOME% -move /Y "%MAMBA_ROOT_PREFIX%\pkgs" "%MINIFORGE_HOME%" -if !errorlevel! neq 0 exit /b !errorlevel! echo Removing %MAMBA_ROOT_PREFIX% del /S /Q "%MAMBA_ROOT_PREFIX%" del /S /Q "%MICROMAMBA_TMPDIR%" -call :end_group call :start_group "Configuring conda" :: Activate the base conda environment +echo Activating environment call "%MINIFORGE_HOME%\Scripts\activate.bat" :: Configure the solver set "CONDA_SOLVER=libmamba" diff --git a/README.md b/README.md index 30f6b9ad..6dd2a6b2 100644 --- a/README.md +++ b/README.md @@ -155,24 +155,31 @@ Current build status - win_64_blas_implblisblas_impl_liblibblis.4.dll + win_64_blas_implblisblas_impl_liblibblis.4.dllopenblas_typedummy - variant + variant - win_64_blas_implmklblas_impl_libmkl_rt.2.dll + win_64_blas_implmklblas_impl_libmkl_rt.2.dllopenblas_typedummy - variant + variant - win_64_blas_implopenblasblas_impl_libopenblas.dll + win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typeopenmp - variant + variant + + + + win_64_blas_implopenblasblas_impl_libopenblas.dllopenblas_typepthreads + + + variant diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 32da3d0c..eff4ad66 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,7 +19,7 @@ stages: echo "##vso[task.setvariable variable=log]$git_log" displayName: Obtain commit message - bash: echo "##vso[task.setvariable variable=RET]false" - condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')) + condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))) displayName: Skip build? - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET" name: result diff --git a/recipe/bld.bat b/recipe/bld.bat index a04d0574..588c6149 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,20 +1,45 @@ -:: Trailing semicolon in this variable as set by current (2017/01) -:: conda-build breaks us. Manual fix: -set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out" -:: Delegate to the Unixy script. We need to translate the key path variables -:: to be Unix-y rather than Windows-y, though. -copy "%RECIPE_DIR%\build.sh" . -FOR /F "delims=" %%i IN ('cygpath.exe -u -p "%PATH%"') DO set "PATH_OVERRIDE=%%i" -FOR /F "delims=" %%i IN ('cygpath.exe -u "%LIBRARY_PREFIX%"') DO set "PREFIX=%%i" -FOR /F "delims=" %%i in ('cygpath.exe -u "%BUILD_PREFIX%"') DO set "BUILD_PREFIX=%%i" -set "SHLIB_EXT=.lib" -set "CMAKE_GENERATOR=MSYS Makefiles" -set MSYSTEM=MINGW%ARCH% -set MSYS2_PATH_TYPE=inherit -set CHERE_INVOKING=1 -set "SHLIB_PREFIX=" -set "fortran_compiler=m2w64-toolchain" -set "fortran_compiler_version=2" -bash -x "./build.sh" -IF %ERRORLEVEL% NEQ 0 exit 1 -exit 0 +@echo on + +mkdir build +cd build + +set "NEW_ENV=%cd%\_env" + +set "LIBRARY_PREFIX=%NEW_ENV%\Library" +:: For finding cmake (not in NEW_ENV but actual build env) +set "PATH=%PATH%:%BUILD_PREFIX%\Library\bin" + +set "CPATH=%LIBRARY_PREFIX%\include" +set "LIBRARY_PATH==%LIBRARY_PREFIX%\lib" + +set "CFLAGS=-I%LIBRARY_PREFIX%\include %CFLAGS%" +set "FFLAGS=-I%LIBRARY_PREFIX%\include %FFLAGS%" +set "LDFLAGS=/LIBPATH:%LIBRARY_PREFIX%\lib %LDFLAGS%" + +set "PYTHON_EXEC=%BUILD_PREFIX%\python.exe" + +%MINIFORGE_HOME%\Scripts\conda.exe create -p %NEW_ENV% -c conda-forge/label/lapack_rc -c conda-forge --yes --quiet ^ + libblas=%PKG_VERSION%=*netlib ^ + libcblas=%PKG_VERSION%=*netlib ^ + liblapack=%PKG_VERSION%=*netlib ^ + liblapacke=%PKG_VERSION%=*netlib ^ + flang_win-64=%fortran_compiler_version% + +:: default activation for clang-windows uses clang.exe, not clang-cl.exe, see +:: https://github.com/conda-forge/clang-win-activation-feedstock/pull/48 +:: clang.exe cannot handle /LIBPATH: in LDFLAGS, but we need that for lld-link +set "CC=clang-cl.exe" + +:: Link against the netlib libraries +cmake -LAH -G Ninja .. ^ + "-DBLAS_LIBRARIES=blas.lib;cblas.lib" ^ + "-DLAPACK_LIBRARIES=lapack.lib;lapacke.lib" ^ + -DBUILD_TESTING=yes ^ + -DPYTHON_EXECUTABLE=%PYTHON_EXEC% ^ + -DCMAKE_BUILD_TYPE=Release +if %ERRORLEVEL% neq 0 (type .\CMakeFiles\CMakeError.log && type .\CMakeFiles\CMakeOutput.log && exit 1) + +cmake --build . --config Release +if %ERRORLEVEL% neq 0 exit 1 + +rmdir /s /q %NEW_ENV% diff --git a/recipe/build.sh b/recipe/build.sh index bd29fe21..ef15628d 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -4,29 +4,18 @@ mkdir build cd build export NEW_ENV=`pwd`/_env -if [[ "$target_platform" == linux* || "$target_platform" == osx* ]]; then - export SHLIB_PREFIX=lib - export LIBRARY_PREFIX=$NEW_ENV - export EXE_SUFFIX="" - export LDFLAGS="-Wl,-rpath,${LIBRARY_PREFIX}/lib $LDFLAGS" +export LIBRARY_PREFIX=$NEW_ENV -else - export LIBRARY_PREFIX=$NEW_ENV/Library - export EXE_SUFFIX=".exe" - # For finding cmake - export PATH="$PATH:${BUILD_PREFIX}/Library/bin" - # necessary to escalate errors to calling bld.bat script correctly - set -e -fi +export FFLAGS="-I${LIBRARY_PREFIX}/include $FFLAGS" +export LDFLAGS="-L${LIBRARY_PREFIX}/lib -Wl,-rpath,${LIBRARY_PREFIX}/lib $LDFLAGS" export CPATH="${LIBRARY_PREFIX}/include" export LIBRARY_PATH="${LIBRARY_PREFIX}/lib" -export FFLAGS="-I${LIBRARY_PREFIX}/include $FFLAGS" -export LDFLAGS="-L${LIBRARY_PREFIX}/lib $LDFLAGS" +export PYTHON_EXEC=$BUILD_PREFIX/bin/python export CONDA_SUBDIR="${target_platform}" -conda${EXE_SUFFIX} create -p ${NEW_ENV} -c conda-forge --yes --quiet \ +conda create -p ${NEW_ENV} -c conda-forge/label/lapack_rc -c conda-forge --yes --quiet \ libblas=${PKG_VERSION}=*netlib \ libcblas=${PKG_VERSION}=*netlib \ liblapack=${PKG_VERSION}=*netlib \ @@ -36,12 +25,13 @@ unset CONDA_SUBDIR # Link against the netlib libraries cmake ${CMAKE_ARGS} -LAH -G "${CMAKE_GENERATOR}" .. \ - "-DBLAS_LIBRARIES=${SHLIB_PREFIX}blas${SHLIB_EXT};${SHLIB_PREFIX}cblas${SHLIB_EXT}" \ - "-DLAPACK_LIBRARIES=${SHLIB_PREFIX}lapack${SHLIB_EXT};${SHLIB_PREFIX}lapacke${SHLIB_EXT}" \ + "-DBLAS_LIBRARIES=libblas${SHLIB_EXT};libcblas${SHLIB_EXT}" \ + "-DLAPACK_LIBRARIES=liblapack${SHLIB_EXT};liblapacke${SHLIB_EXT}" \ -DBUILD_TESTING=yes \ + -DPYTHON_EXECUTABLE=$PYTHON_EXEC \ -DCMAKE_BUILD_TYPE=Release || (cat $SRC_DIR/build/CMakeFiles/CMakeError.log && $SRC_DIR/build/CMakeFiles/CMakeOutput.log && false) -make -j${CPU_COUNT} +cmake --build . --config Release if [[ "$blas_impl" == "accelerate" ]]; then mkdir -p $SRC_DIR/accelerate diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 5cb68031..000502c3 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,16 @@ +c_compiler: # [win] +- clang # [win] +cxx_compiler: # [win] +- clangxx # [win] + +# temporarily while we bring up LAPACK 3.10.1; +# only required for blis; rest installs directly in build.sh +channel_sources: + - conda-forge/label/lapack_rc,conda-forge + blas_impl: - openblas +- openblas # [win] - mkl # [x86_64 and not osx] - blis # [x86_64] - accelerate # [osx] @@ -8,6 +19,7 @@ blas_impl_lib: - libopenblas.so.0 # [linux] - libopenblas.0.dylib # [osx] - openblas.dll # [win] +- openblas.dll # [win] - libmkl_rt.so # [linux64] - mkl_rt.2.dll # [win64] @@ -22,7 +34,14 @@ blas_default_impl: - openblas # [not win] - mkl # [win] +openblas_type: # [win] +- openmp # [win] +- pthreads # [win] +- dummy # [win] +- dummy # [win] + zip_keys: - - blas_impl - blas_impl_lib + - openblas_type # [win] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 09f43fe5..d488842c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,12 +1,13 @@ -{% set version = "3.9.0" %} +{% set version = "3.11.0" %} # if build_num is reset to 0 (for new version), update increment for blas_minor below -{% set build_num = 25 %} +{% set build_num = 0 %} + {% set version_major = version.split(".")[0] %} # blas_major denotes major infrastructural change to how blas is managed {% set blas_major = "2" %} # make sure we do not create colliding version strings of output "blas" # for builds across lapack-versions within the same blas_major -{% set blas_minor = build_num + 100 %} +{% set blas_minor = build_num + 200 %} {% set build_string_platform = target_platform | default("linux-64") %} {% set build_string_platform = build_string_platform.replace("-", "") %} @@ -16,15 +17,20 @@ package: source: - url: https://github.com/Reference-LAPACK/lapack/archive/v{{ version }}.tar.gz - sha256: 106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573 + sha256: 4b9ba79bfd4921ca820e83979db76ab3363155709444a787979e81c22285ffa9 patches: # Test BLAS and LAPACKE in addition to LAPACK - patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch - # backport https://github.com/Reference-LAPACK/lapack/pull/391 - # to fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114304 - - patches/0002-remove-extraneous-semicolon.patch # avoid corruption of characters through implicit decode - - patches/0003-read-pipe-as-binary.patch + - patches/0002-read-pipe-as-binary.patch + # avoid linker errors on windows + - patches/0003-don-t-declare-RowMajorStrg-as-extern-on-windows.patch + # make xerbla-shenanigans work on windows + - patches/0004-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch + # backport https://github.com/Reference-LAPACK/lapack/pull/758, can be dropped for 3.12 + - patches/0005-fixed-bug-in-array-bounds-in-complex-syl01-test.patch + # backport https://github.com/Reference-LAPACK/lapack/pull/854, can be dropped for 3.12 + - patches/0006-Use-dynamic-allocation-in-SYL01-tests.patch - url: https://github.com/isuruf/vecLibFort/archive/99af8640e98c829b41c3235e3706760cd5696fe4.tar.gz sha256: 80de7c6e83d1d84d016b4cb299f2c15f5a82b9d36865dd5c16bf221fe9a303ad @@ -33,18 +39,20 @@ source: build: number: "{{ build_num }}" +# ensure smithy splits windows openblas jobs by using it as a selector here +# [openblas_type] + requirements: build: - - {{ compiler("c") }} # [unix] - - {{ stdlib("c") }} # [unix] - - {{ compiler("fortran") }} # [unix] - - {{ compiler("m2w64_c") }} # [win] - - {{ stdlib("m2w64_c") }} # [win] - - {{ compiler("m2w64_fortran") }} # [win] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} - cmake - - m2-make # [win] - make # [not win] - - m2-base # [win] + - ninja # [win] + # in testing we end up calling a python script, see + # https://github.com/Reference-LAPACK/lapack/blame/master/lapack_testing.py + - python * # The following are actual build dependencies of this recipe; however, they # only get installed by the build scripts, since they must be installed in a # different environment (otherwise there'd be a variant collision)! The build @@ -74,8 +82,10 @@ outputs: - {{ stdlib('c') }} # [blas_impl == 'accelerate'] host: - libopenblas 0.3.28 # [blas_impl == 'openblas'] + # on windows we pin exactly, so need to build twice + - libopenblas *={{ openblas_type }}* # [win and blas_impl == 'openblas'] # from https://github.com/conda-forge/intel_repack-feedstock/ - - mkl 2024.2 # [blas_impl == 'mkl'] + - mkl 2025.0 # [blas_impl == 'mkl'] - blis 0.9.0 # [blas_impl == 'blis'] run: - {{ pin_compatible("libopenblas", max_pin="x.x.x", exact=win) }} # [blas_impl == 'openblas'] @@ -117,6 +127,7 @@ outputs: requirements: host: - {{ pin_subpackage("libblas", exact=True) }} + - libopenblas *={{ openblas_type }}* # [win and blas_impl == 'openblas'] run: - {{ pin_subpackage("libblas", exact=True) }} run_constrained: @@ -148,6 +159,7 @@ outputs: requirements: host: - {{ pin_subpackage("libblas", exact=True) }} + - libopenblas *={{ openblas_type }}* # [win and blas_impl == 'openblas'] run: - {{ pin_subpackage("libblas", exact=True) }} run_constrained: @@ -180,6 +192,7 @@ outputs: - {{ pin_subpackage("libblas", exact=True) }} - {{ pin_subpackage("libcblas", exact=True) }} - {{ pin_subpackage("liblapack", exact=True) }} + - libopenblas *={{ openblas_type }}* # [win and blas_impl == 'openblas'] run: - {{ pin_subpackage("libblas", exact=True) }} - {{ pin_subpackage("libcblas", exact=True) }} @@ -207,10 +220,11 @@ outputs: requirements: host: - openblas 0.3.28 # [blas_impl == "openblas"] - - mkl-devel 2024.2 # [blas_impl == "mkl"] + - openblas *={{ openblas_type }}* # [win and blas_impl == 'openblas'] + - mkl-devel 2025.0 # [blas_impl == "mkl"] run: - openblas 0.3.28 # [blas_impl == "openblas"] - - mkl-devel 2024.2 # [blas_impl == "mkl"] + - mkl-devel 2025.0 # [blas_impl == "mkl"] - {{ pin_subpackage("liblapack", exact=True) }} # [blas_impl != 'blis'] - {{ pin_subpackage("liblapacke", exact=True) }} # [blas_impl != 'blis'] - liblapack {{ version }} *netlib # [blas_impl == 'blis'] @@ -235,15 +249,14 @@ outputs: activate_in_script: True requirements: build: - - {{ compiler('c') }} # [unix] - - {{ stdlib('c') }} # [unix] - - {{ compiler('fortran') }} # [unix] - - {{ compiler('m2w64_c') }} # [win] - - {{ stdlib('m2w64_c') }} # [win] - - {{ compiler('m2w64_fortran') }} # [win] + - {{ stdlib("c") }} + - {{ compiler("c") }} + - {{ compiler("fortran") }} - cmake - - m2-make # [win] - - m2-base # [win] + - ninja # [win] + # we end up calling a python script, see + # https://github.com/Reference-LAPACK/lapack/blame/master/lapack_testing.py + - python * - llvm-openmp # [linux and ((blas_impl == "openblas") or (blas_impl == "mkl"))] host: # Building with blis fails due to a conda-build bug @@ -252,6 +265,7 @@ outputs: - {{ pin_subpackage("liblapacke", exact=True) }} - {{ pin_subpackage("libcblas", exact=True) }} - {{ pin_subpackage("libblas", exact=True) }} + - openblas *={{ openblas_type }}* # [win and blas_impl == 'openblas'] {% else %} - blis 0.9.0 {% endif %} diff --git a/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch b/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch index 25c36dad..af67c310 100644 --- a/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch +++ b/recipe/patches/0001-Test-BLAS-and-LAPACKE-in-addition-to-LAPACK.patch @@ -1,17 +1,17 @@ -From 48c2ace8dcd69883470c67562d0e0b36ee1ddd90 Mon Sep 17 00:00:00 2001 +From 6ddc5a62badf0a2b4e1c29fd3ce32155985c1ba0 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Mon, 7 Jan 2019 00:23:59 -0600 -Subject: [PATCH 1/3] Test BLAS and LAPACKE in addition to LAPACK +Subject: [PATCH 1/6] Test BLAS and LAPACKE in addition to LAPACK --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt -index d9dbf9746..dabab4c02 100644 +index 68a7767b8..91047636e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -295,6 +295,8 @@ endif() +@@ -394,6 +394,8 @@ endif() if(BUILD_TESTING) add_subdirectory(TESTING) diff --git a/recipe/patches/0003-read-pipe-as-binary.patch b/recipe/patches/0002-read-pipe-as-binary.patch similarity index 76% rename from recipe/patches/0003-read-pipe-as-binary.patch rename to recipe/patches/0002-read-pipe-as-binary.patch index 2469c4f7..3858ad1e 100644 --- a/recipe/patches/0003-read-pipe-as-binary.patch +++ b/recipe/patches/0002-read-pipe-as-binary.patch @@ -1,17 +1,17 @@ -From abcff0c3b75bfb2d78749cf68f61b2c2013554bb Mon Sep 17 00:00:00 2001 +From a3ed3013a70f8bc26b8dad6fe621b35c3011e99f Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 18 Aug 2024 14:03:42 +1100 -Subject: [PATCH 3/3] read pipe as binary +Subject: [PATCH 2/6] read pipe as binary --- lapack_testing.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lapack_testing.py b/lapack_testing.py -index 8b0af0de1..a6ce1ae72 100755 +index abda36898..b638e7662 100755 --- a/lapack_testing.py +++ b/lapack_testing.py -@@ -114,7 +114,7 @@ def run_summary_test( f, cmdline, short_summary): +@@ -110,7 +110,7 @@ def run_summary_test( f, cmdline, short_summary): r=1 if short_summary: return [nb_test_run,nb_test_fail,nb_test_illegal,nb_test_info] else: @@ -20,7 +20,7 @@ index 8b0af0de1..a6ce1ae72 100755 r=0 else: cmdline = os.path.join(abs_bin_dir, cmdline) -@@ -125,7 +125,7 @@ def run_summary_test( f, cmdline, short_summary): +@@ -121,7 +121,7 @@ def run_summary_test( f, cmdline, short_summary): p.wait() #pipe.close() r=p.returncode @@ -29,7 +29,7 @@ index 8b0af0de1..a6ce1ae72 100755 error_message=cmdline+" did not work" if r != 0 and not with_file: -@@ -140,18 +140,18 @@ def run_summary_test( f, cmdline, short_summary): +@@ -136,18 +136,18 @@ def run_summary_test( f, cmdline, short_summary): for line in pipe.readlines(): f.write(str(line)) words_in_line=line.split() @@ -41,16 +41,16 @@ index 8b0af0de1..a6ce1ae72 100755 nb_test_run+=int(words_in_line[whereisrun-2]) - if (line.find("out of")!=-1): + if (line.find(b"out of")!=-1): - if (short_summary==0): print(line, end=' ') + if not short_summary: print(line, end=' ') - whereisout= words_in_line.index("out") + whereisout= words_in_line.index(b"out") nb_test_fail+=int(words_in_line[whereisout-1]) - if ((line.find("illegal")!=-1) or (line.find("Illegal")!=-1)): + if ((line.find(b"illegal")!=-1) or (line.find(b"Illegal")!=-1)): - if (short_summary==0):print(line, end=' ') + if not short_summary: print(line, end=' ') nb_test_illegal+=1 - if (line.find(" INFO")!=-1): + if (line.find(b" INFO")!=-1): - if (short_summary==0):print(line, end=' ') + if not short_summary: print(line, end=' ') nb_test_info+=1 - if (with_file==1): + if with_file: diff --git a/recipe/patches/0002-remove-extraneous-semicolon.patch b/recipe/patches/0002-remove-extraneous-semicolon.patch deleted file mode 100644 index 48e2dd57..00000000 --- a/recipe/patches/0002-remove-extraneous-semicolon.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 024de713931ec886eacf032e64dd205b79588ad7 Mon Sep 17 00:00:00 2001 -From: Iain Hibbert -Date: Sun, 23 Feb 2020 21:39:25 +0000 -Subject: [PATCH 2/3] remove extraneous semicolon - -this semicolon causes a test to fail with read error, using g95 ---- - TESTING/dbal.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/TESTING/dbal.in b/TESTING/dbal.in -index c00fe3e83..828629b15 100644 ---- a/TESTING/dbal.in -+++ b/TESTING/dbal.in -@@ -209,6 +209,6 @@ DBL: Tests DGEBAL - 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.63043209914231165391D-03 0.10000000000000000000D+01 0.79310682416114036641D+03 - 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.00000000000000000000D+00 0.12608641982846233078D-02 0.10000000000000000000D+01 - -- 2.494800386918399765D+291 1.582914569427869018D+175 1.004336277661868922D+59 3.186183822264904554D-58 5.053968264940243633D-175 0.40083367200179455560D-291; -+ 2.494800386918399765D+291 1.582914569427869018D+175 1.004336277661868922D+59 3.186183822264904554D-58 5.053968264940243633D-175 0.40083367200179455560D-291 - - 0 diff --git a/recipe/patches/0003-don-t-declare-RowMajorStrg-as-extern-on-windows.patch b/recipe/patches/0003-don-t-declare-RowMajorStrg-as-extern-on-windows.patch new file mode 100644 index 00000000..f7640b3c --- /dev/null +++ b/recipe/patches/0003-don-t-declare-RowMajorStrg-as-extern-on-windows.patch @@ -0,0 +1,122 @@ +From 05bec786443912edcec815e5ac606e6ca351caec Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Sat, 26 Oct 2024 20:13:34 +1100 +Subject: [PATCH 3/6] don't declare RowMajorStrg as extern on windows + +on platforms with HAS_ATTRIBUTE_WEAK_SUPPORT, this presumably plays a role in +the linker shenanigans with cblas_xerbla, but on windows it just blows up +--- + CBLAS/testing/c_c2chke.c | 2 +- + CBLAS/testing/c_c3chke.c | 2 +- + CBLAS/testing/c_d2chke.c | 2 +- + CBLAS/testing/c_d3chke.c | 2 +- + CBLAS/testing/c_s2chke.c | 2 +- + CBLAS/testing/c_s3chke.c | 2 +- + CBLAS/testing/c_z2chke.c | 2 +- + CBLAS/testing/c_z3chke.c | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/CBLAS/testing/c_c2chke.c b/CBLAS/testing/c_c2chke.c +index 33a0261f5..fb8656f57 100644 +--- a/CBLAS/testing/c_c2chke.c ++++ b/CBLAS/testing/c_c2chke.c +@@ -33,7 +33,7 @@ void F77_c2chke(char *rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + #ifndef HAS_ATTRIBUTE_WEAK_SUPPORT +diff --git a/CBLAS/testing/c_c3chke.c b/CBLAS/testing/c_c3chke.c +index 7057c7a2c..cfe433c88 100644 +--- a/CBLAS/testing/c_c3chke.c ++++ b/CBLAS/testing/c_c3chke.c +@@ -33,7 +33,7 @@ void F77_c3chke(char * rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0, RBETA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + cblas_ok = TRUE ; +diff --git a/CBLAS/testing/c_d2chke.c b/CBLAS/testing/c_d2chke.c +index 73e8aceec..f58501fb5 100644 +--- a/CBLAS/testing/c_d2chke.c ++++ b/CBLAS/testing/c_d2chke.c +@@ -31,7 +31,7 @@ void F77_d2chke(char *rout) { + Y[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + #ifndef HAS_ATTRIBUTE_WEAK_SUPPORT +diff --git a/CBLAS/testing/c_d3chke.c b/CBLAS/testing/c_d3chke.c +index 9a1ba3cc5..66f85666a 100644 +--- a/CBLAS/testing/c_d3chke.c ++++ b/CBLAS/testing/c_d3chke.c +@@ -31,7 +31,7 @@ void F77_d3chke(char *rout) { + C[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + #ifndef HAS_ATTRIBUTE_WEAK_SUPPORT +diff --git a/CBLAS/testing/c_s2chke.c b/CBLAS/testing/c_s2chke.c +index a781bd505..4ca0941cc 100644 +--- a/CBLAS/testing/c_s2chke.c ++++ b/CBLAS/testing/c_s2chke.c +@@ -31,7 +31,7 @@ void F77_s2chke(char *rout) { + Y[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + #ifndef HAS_ATTRIBUTE_WEAK_SUPPORT +diff --git a/CBLAS/testing/c_s3chke.c b/CBLAS/testing/c_s3chke.c +index 425d6a702..135ee32ac 100644 +--- a/CBLAS/testing/c_s3chke.c ++++ b/CBLAS/testing/c_s3chke.c +@@ -31,7 +31,7 @@ void F77_s3chke(char *rout) { + C[2] = {0.0,0.0}, + ALPHA=0.0, BETA=0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + #ifndef HAS_ATTRIBUTE_WEAK_SUPPORT +diff --git a/CBLAS/testing/c_z2chke.c b/CBLAS/testing/c_z2chke.c +index 65e552da3..712200177 100644 +--- a/CBLAS/testing/c_z2chke.c ++++ b/CBLAS/testing/c_z2chke.c +@@ -33,7 +33,7 @@ void F77_z2chke(char *rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + #ifndef HAS_ATTRIBUTE_WEAK_SUPPORT +diff --git a/CBLAS/testing/c_z3chke.c b/CBLAS/testing/c_z3chke.c +index 30840489a..bb996a0af 100644 +--- a/CBLAS/testing/c_z3chke.c ++++ b/CBLAS/testing/c_z3chke.c +@@ -33,7 +33,7 @@ void F77_z3chke(char * rout) { + BETA[2] = {0.0,0.0}, + RALPHA = 0.0, RBETA = 0.0; + extern int cblas_info, cblas_lerr, cblas_ok; +- extern int RowMajorStrg; ++ int RowMajorStrg = TRUE; + extern char *cblas_rout; + + cblas_ok = TRUE ; diff --git a/recipe/patches/0004-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch b/recipe/patches/0004-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch new file mode 100644 index 00000000..a092d6c7 --- /dev/null +++ b/recipe/patches/0004-use-__declspec-selectany-for-cblas_xerbla-s-RowMajor.patch @@ -0,0 +1,23 @@ +From 79ca675185264061e46274d5404e67bc937f04c6 Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Sun, 27 Oct 2024 00:15:33 +1100 +Subject: [PATCH 4/6] use __declspec(selectany) for cblas_xerbla's RowMajorStrg + on windows + +--- + CBLAS/testing/c_xerbla.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CBLAS/testing/c_xerbla.c b/CBLAS/testing/c_xerbla.c +index c3f14c364..313c2a0e3 100644 +--- a/CBLAS/testing/c_xerbla.c ++++ b/CBLAS/testing/c_xerbla.c +@@ -9,7 +9,7 @@ void cblas_xerbla(CBLAS_INT info, const char *rout, const char *form, ...) + { + extern int cblas_lerr, cblas_info, cblas_ok; + extern int link_xerbla; +- extern int RowMajorStrg; ++ extern __declspec(selectany) int RowMajorStrg; + extern char *cblas_rout; + + /* Initially, c__3chke may call this routine with diff --git a/recipe/patches/0005-fixed-bug-in-array-bounds-in-complex-syl01-test.patch b/recipe/patches/0005-fixed-bug-in-array-bounds-in-complex-syl01-test.patch new file mode 100644 index 00000000..0e49a7a1 --- /dev/null +++ b/recipe/patches/0005-fixed-bug-in-array-bounds-in-complex-syl01-test.patch @@ -0,0 +1,36 @@ +From 352124a141a313afe9016b5fdb326ca5389b6eea Mon Sep 17 00:00:00 2001 +From: Dmitry Klyuchinsky +Date: Fri, 18 Nov 2022 17:58:06 +0700 +Subject: [PATCH 5/6] fixed bug in array bounds in complex syl01 test + +--- + TESTING/EIG/csyl01.f | 2 +- + TESTING/EIG/zsyl01.f | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/TESTING/EIG/csyl01.f b/TESTING/EIG/csyl01.f +index e21f1a7a0..82d790daa 100644 +--- a/TESTING/EIG/csyl01.f ++++ b/TESTING/EIG/csyl01.f +@@ -124,7 +124,7 @@ + $ C( MAXM, MAXN ), CC( MAXM, MAXN ), + $ X( MAXM, MAXN ), + $ DUML( MAXM ), DUMR( MAXN ), +- $ D( MIN( MAXM, MAXN ) ) ++ $ D( MAX( MAXM, MAXN ) ) + REAL SWORK( LDSWORK, 54 ), DUM( MAXN ), VM( 2 ) + INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ) + * .. +diff --git a/TESTING/EIG/zsyl01.f b/TESTING/EIG/zsyl01.f +index 1e8619a34..329f39dc4 100644 +--- a/TESTING/EIG/zsyl01.f ++++ b/TESTING/EIG/zsyl01.f +@@ -124,7 +124,7 @@ + $ C( MAXM, MAXN ), CC( MAXM, MAXN ), + $ X( MAXM, MAXN ), + $ DUML( MAXM ), DUMR( MAXN ), +- $ D( MIN( MAXM, MAXN ) ) ++ $ D( MAX( MAXM, MAXN ) ) + DOUBLE PRECISION SWORK( LDSWORK, 103 ), DUM( MAXN ), VM( 2 ) + INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ) + * .. diff --git a/recipe/patches/0006-Use-dynamic-allocation-in-SYL01-tests.patch b/recipe/patches/0006-Use-dynamic-allocation-in-SYL01-tests.patch new file mode 100644 index 00000000..7ba02528 --- /dev/null +++ b/recipe/patches/0006-Use-dynamic-allocation-in-SYL01-tests.patch @@ -0,0 +1,256 @@ +From 5dab167c72b9f9d10025bcf15a53c026084a4807 Mon Sep 17 00:00:00 2001 +From: Angelika Schwarz +Date: Sat, 17 Jun 2023 10:51:33 +0200 +Subject: [PATCH 6/6] Use dynamic allocation in SYL01 tests + +--- + TESTING/EIG/csyl01.f | 33 ++++++++++++++++++++++++++++----- + TESTING/EIG/dsyl01.f | 35 +++++++++++++++++++++++++++++------ + TESTING/EIG/ssyl01.f | 35 +++++++++++++++++++++++++++++------ + TESTING/EIG/zsyl01.f | 33 ++++++++++++++++++++++++++++----- + 4 files changed, 114 insertions(+), 22 deletions(-) + +diff --git a/TESTING/EIG/csyl01.f b/TESTING/EIG/csyl01.f +index 82d790daa..8a3cd1ae5 100644 +--- a/TESTING/EIG/csyl01.f ++++ b/TESTING/EIG/csyl01.f +@@ -120,14 +120,16 @@ + COMPLEX RMUL + * .. + * .. Local Arrays .. +- COMPLEX A( MAXM, MAXM ), B( MAXN, MAXN ), +- $ C( MAXM, MAXN ), CC( MAXM, MAXN ), +- $ X( MAXM, MAXN ), +- $ DUML( MAXM ), DUMR( MAXN ), ++ COMPLEX DUML( MAXM ), DUMR( MAXN ), + $ D( MAX( MAXM, MAXN ) ) +- REAL SWORK( LDSWORK, 54 ), DUM( MAXN ), VM( 2 ) ++ REAL DUM( MAXN ), VM( 2 ) + INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ) + * .. ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ COMPLEX, DIMENSION(:,:), ALLOCATABLE :: A, B, C, CC, X ++ REAL, DIMENSION(:,:), ALLOCATABLE :: SWORK ++* .. + * .. External Functions .. + LOGICAL SISNAN + REAL SLAMCH, CLANGE +@@ -139,6 +141,20 @@ + * .. Intrinsic Functions .. + INTRINSIC ABS, REAL, MAX + * .. ++* .. Allocate memory dynamically .. ++ ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( SWORK( LDSWORK, 54 ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++* .. + * .. Executable Statements .. + * + * Get machine parameters +@@ -286,6 +302,13 @@ + END DO + END DO + END DO ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (C, STAT = AllocateStatus) ++ DEALLOCATE (CC, STAT = AllocateStatus) ++ DEALLOCATE (X, STAT = AllocateStatus) ++ DEALLOCATE (SWORK, STAT = AllocateStatus) + * + RETURN + * +diff --git a/TESTING/EIG/dsyl01.f b/TESTING/EIG/dsyl01.f +index 782d2cd42..0ea481382 100644 +--- a/TESTING/EIG/dsyl01.f ++++ b/TESTING/EIG/dsyl01.f +@@ -117,13 +117,15 @@ + $ SCALE, SCALE3, SMLNUM, TNRM, XNRM + * .. + * .. Local Arrays .. +- DOUBLE PRECISION A( MAXM, MAXM ), B( MAXN, MAXN ), +- $ C( MAXM, MAXN ), CC( MAXM, MAXN ), +- $ X( MAXM, MAXN ), +- $ DUML( MAXM ), DUMR( MAXN ), ++ DOUBLE PRECISION DUML( MAXM ), DUMR( MAXN ), + $ D( MAX( MAXM, MAXN ) ), DUM( MAXN ), +- $ SWORK( LDSWORK, 126 ), VM( 2 ) +- INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ), IDUM( 2 ) ++ $ VM( 2 ) ++ INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ) ++* .. ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ DOUBLE PRECISION, DIMENSION(:,:), ALLOCATABLE :: A, B, C, CC, X, ++ $ SWORK + * .. + * .. External Functions .. + LOGICAL DISNAN +@@ -136,6 +138,20 @@ + * .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX + * .. ++* .. Allocate memory dynamically .. ++ ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( SWORK( LDSWORK, 126 ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++* .. + * .. Executable Statements .. + * + * Get machine parameters +@@ -280,6 +296,13 @@ + END DO + END DO + END DO ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (C, STAT = AllocateStatus) ++ DEALLOCATE (CC, STAT = AllocateStatus) ++ DEALLOCATE (X, STAT = AllocateStatus) ++ DEALLOCATE (SWORK, STAT = AllocateStatus) + * + RETURN + * +diff --git a/TESTING/EIG/ssyl01.f b/TESTING/EIG/ssyl01.f +index 22d089dc8..fda30a3c0 100644 +--- a/TESTING/EIG/ssyl01.f ++++ b/TESTING/EIG/ssyl01.f +@@ -117,13 +117,15 @@ + $ SCALE, SCALE3, SMLNUM, TNRM, XNRM + * .. + * .. Local Arrays .. +- REAL A( MAXM, MAXM ), B( MAXN, MAXN ), +- $ C( MAXM, MAXN ), CC( MAXM, MAXN ), +- $ X( MAXM, MAXN ), +- $ DUML( MAXM ), DUMR( MAXN ), ++ REAL DUML( MAXM ), DUMR( MAXN ), + $ D( MAX( MAXM, MAXN ) ), DUM( MAXN ), +- $ SWORK( LDSWORK, 54 ), VM( 2 ) +- INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ), IDUM( 2 ) ++ $ VM( 2 ) ++ INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ) ++* .. ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ REAL, DIMENSION(:,:), ALLOCATABLE :: A, B, C, CC, X, ++ $ SWORK + * .. + * .. External Functions .. + LOGICAL SISNAN +@@ -136,6 +138,20 @@ + * .. Intrinsic Functions .. + INTRINSIC ABS, REAL, MAX + * .. ++* .. Allocate memory dynamically .. ++ ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( SWORK( LDSWORK, 54 ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++* .. + * .. Executable Statements .. + * + * Get machine parameters +@@ -280,6 +296,13 @@ + END DO + END DO + END DO ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (C, STAT = AllocateStatus) ++ DEALLOCATE (CC, STAT = AllocateStatus) ++ DEALLOCATE (X, STAT = AllocateStatus) ++ DEALLOCATE (SWORK, STAT = AllocateStatus) + * + RETURN + * +diff --git a/TESTING/EIG/zsyl01.f b/TESTING/EIG/zsyl01.f +index 329f39dc4..5d26d494c 100644 +--- a/TESTING/EIG/zsyl01.f ++++ b/TESTING/EIG/zsyl01.f +@@ -120,14 +120,16 @@ + COMPLEX*16 RMUL + * .. + * .. Local Arrays .. +- COMPLEX*16 A( MAXM, MAXM ), B( MAXN, MAXN ), +- $ C( MAXM, MAXN ), CC( MAXM, MAXN ), +- $ X( MAXM, MAXN ), +- $ DUML( MAXM ), DUMR( MAXN ), ++ COMPLEX*16 DUML( MAXM ), DUMR( MAXN ), + $ D( MAX( MAXM, MAXN ) ) +- DOUBLE PRECISION SWORK( LDSWORK, 103 ), DUM( MAXN ), VM( 2 ) ++ DOUBLE PRECISION DUM( MAXN ), VM( 2 ) + INTEGER ISEED( 4 ), IWORK( MAXM + MAXN + 2 ) + * .. ++* .. Allocatable Arrays .. ++ INTEGER AllocateStatus ++ COMPLEX*16, DIMENSION(:,:), ALLOCATABLE :: A, B, C, CC, X ++ DOUBLE PRECISION, DIMENSION(:,:), ALLOCATABLE :: SWORK ++* .. + * .. External Functions .. + LOGICAL DISNAN + DOUBLE PRECISION DLAMCH, ZLANGE +@@ -139,6 +141,20 @@ + * .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, SQRT + * .. ++* .. Allocate memory dynamically .. ++ ALLOCATE ( A( MAXM, MAXM ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( B( MAXN, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( C( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( CC( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( X( MAXM, MAXN ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++ ALLOCATE ( SWORK( LDSWORK, 103 ), STAT = AllocateStatus ) ++ IF( AllocateStatus /= 0 ) STOP "*** Not enough memory ***" ++* .. + * .. Executable Statements .. + * + * Get machine parameters +@@ -286,6 +302,13 @@ + END DO + END DO + END DO ++* ++ DEALLOCATE (A, STAT = AllocateStatus) ++ DEALLOCATE (B, STAT = AllocateStatus) ++ DEALLOCATE (C, STAT = AllocateStatus) ++ DEALLOCATE (CC, STAT = AllocateStatus) ++ DEALLOCATE (X, STAT = AllocateStatus) ++ DEALLOCATE (SWORK, STAT = AllocateStatus) + * + RETURN + * diff --git a/recipe/test_blas.bat b/recipe/test_blas.bat index 72231056..6340fb0a 100644 --- a/recipe/test_blas.bat +++ b/recipe/test_blas.bat @@ -1,13 +1,7 @@ :: Trailing semicolon in this variable as set by current (2017/01) :: conda-build breaks us. Manual fix: set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out" -:: Delegate to the Unixy script. We need to translate the key path variables -:: to be Unix-y rather than Windows-y, though. copy "%RECIPE_DIR%\test_blas.sh" . -FOR /F "delims=" %%i IN ('cygpath.exe -u -p "%PATH%"') DO set "PATH_OVERRIDE=%%i" -FOR /F "delims=" %%i in ('cygpath.exe -u "%BUILD_PREFIX%"') DO set "BUILD_PREFIX=%%i" -set MSYSTEM=MINGW%ARCH% -set MSYS2_PATH_TYPE=inherit set CHERE_INVOKING=1 set "SHLIB_PREFIX=" bash -x "./test_blas.sh" diff --git a/recipe/test_blas.sh b/recipe/test_blas.sh index a0cc769a..0921b2b5 100644 --- a/recipe/test_blas.sh +++ b/recipe/test_blas.sh @@ -11,7 +11,7 @@ SKIP_TESTS="dummy" if [[ "${blas_impl}" == "blis" ]]; then # conda-build can't install a correct environment for testing - conda install -c conda-forge "libblas=*=*blis" "libcblas=*=*blis" "liblapack=*=*netlib" "liblapacke=*=*netlib" --use-local --yes -p $PREFIX + conda install -c conda-forge/label/lapack_rc -c conda-forge "libblas=*=*blis" "libcblas=*=*blis" "liblapack=*=*netlib" "liblapacke=*=*netlib" --use-local --yes -p $PREFIX fi if [[ "$target_platform" != osx-* ]]; then