From ba1c68984c28f770daa1eb6acc0c1dc3445e3ee1 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 3 Mar 2020 09:40:43 +0100 Subject: [PATCH 01/14] build for 3.9.0 --- recipe/meta.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d97979b..4da960a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ -{% set version = "3.8.0" %} -{% set build_num = "8" %} +{% set version = "3.9.0" %} +{% set build_num = "0" %} {% set version_major = version.split(".")[0] %} {% if unix %} @@ -13,8 +13,8 @@ package: version: {{ version }} source: - url: http://www.netlib.org/lapack/lapack-{{ version }}.tar.gz - sha256: deb22cc4a6120bff72621155a9917f485f96ef8319ac074a7afbc68aab88bcf6 + url: https://github.com/Reference-LAPACK/lapack/archive/v{{ version }}.tar.gz + sha256: 106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573 patches: # Avoid setting current_version and compatibility_version - no_soversion_osx.diff # [osx] From da142cbb91e2deb7de486edeb796d278b6031673 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 24 Apr 2020 16:02:30 +0200 Subject: [PATCH 02/14] fix license identifier --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4da960a..c0730e8 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -187,7 +187,7 @@ outputs: about: home: http://www.netlib.org/lapack - license: BSD 3-Clause + license: BSD-3-Clause license_file: LICENSE summary: Linear Algebra PACKage From 6f6a35a279d0eccd8b346414f2c694ad7ae7ab26 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Fri, 24 Apr 2020 17:49:04 +0200 Subject: [PATCH 03/14] Remove @hadim as per his wishes See conda-forge/lapack-feedstock/pull/32#issuecomment-619091229 --- recipe/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c0730e8..99e3498 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -194,6 +194,5 @@ about: extra: recipe-maintainers: - jakirkham - - hadim - isuruf - beckermr From c38b9714dcfa0614132a83603de225df25845fda Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 25 Apr 2020 18:17:58 +0200 Subject: [PATCH 04/14] clean up old patches Turn .diff into actual patch and rebase on 3.9.0; move to /patches. Also remove unused 4-year-old patch --- recipe/meta.yaml | 2 +- .../no_soversion_osx.patch} | 24 +++++++++++++++---- recipe/python-test.patch | 9 ------- 3 files changed, 21 insertions(+), 14 deletions(-) rename recipe/{no_soversion_osx.diff => patches/no_soversion_osx.patch} (73%) delete mode 100644 recipe/python-test.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 99e3498..917cc6e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -17,7 +17,7 @@ source: sha256: 106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573 patches: # Avoid setting current_version and compatibility_version - - no_soversion_osx.diff # [osx] + - patches/no_soversion_osx.patch # [osx] build: number: "{{ build_num }}" diff --git a/recipe/no_soversion_osx.diff b/recipe/patches/no_soversion_osx.patch similarity index 73% rename from recipe/no_soversion_osx.diff rename to recipe/patches/no_soversion_osx.patch index cdf92e6..aea4f4b 100644 --- a/recipe/no_soversion_osx.diff +++ b/recipe/patches/no_soversion_osx.patch @@ -1,3 +1,16 @@ +From a8be14e24f6678c8637a3ea5d5001be2c1566504 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 + +--- + BLAS/SRC/CMakeLists.txt | 5 ----- + CBLAS/src/CMakeLists.txt | 2 -- + LAPACKE/CMakeLists.txt | 2 -- + SRC/CMakeLists.txt | 5 ----- + 4 files changed, 14 deletions(-) + diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt index 41c48043..bdc49b91 100644 --- a/BLAS/SRC/CMakeLists.txt @@ -26,10 +39,10 @@ index 90e19f81..b31a2da0 100644 target_include_directories(cblas PUBLIC $ diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt -index d4cf13a9..b509476a 100644 +index 0589a74b..6ba4a2e9 100644 --- a/LAPACKE/CMakeLists.txt +++ b/LAPACKE/CMakeLists.txt -@@ -50,8 +50,6 @@ add_library(lapacke ${SOURCES}) +@@ -76,8 +76,6 @@ add_library(lapacke ${SOURCES}) set_target_properties( lapacke PROPERTIES LINKER_LANGUAGE C @@ -39,10 +52,10 @@ index d4cf13a9..b509476a 100644 target_include_directories(lapacke PUBLIC $ diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt -index 8105d221..88b10fb2 100644 +index f19bdd30..b9aa7784 100644 --- a/SRC/CMakeLists.txt +++ b/SRC/CMakeLists.txt -@@ -497,11 +497,6 @@ endif() +@@ -501,11 +501,6 @@ endif() list(REMOVE_DUPLICATES SOURCES) add_library(lapack ${SOURCES}) @@ -54,3 +67,6 @@ index 8105d221..88b10fb2 100644 if(USE_XBLAS) target_link_libraries(lapack PRIVATE ${XBLAS_LIBRARY}) +-- +2.26.2.windows.1 + diff --git a/recipe/python-test.patch b/recipe/python-test.patch deleted file mode 100644 index ee49053..0000000 --- a/recipe/python-test.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/CTestCustom.cmake.in -+++ b/CTestCustom.cmake.in -@@ -43,4 +43,4 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION - "Character string truncated to length 1 on assignment" - ) - --SET(CTEST_CUSTOM_POST_TEST "./lapack_testing.py -s -d TESTING") -\ No newline at end of file -+SET(CTEST_CUSTOM_POST_TEST "python lapack_testing.py -s -d TESTING") From 97067b80d413c1e51a932d6885dea83b6a474819 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 26 Apr 2020 13:29:57 +0200 Subject: [PATCH 05/14] add output 'lapack' for compatibility Fixes #33 (see discussion there). --- recipe/meta.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 917cc6e..9cea694 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -185,6 +185,14 @@ outputs: - if not exist "%LIBRARY_BIN%\\lib{{ each_lib }}.dll" exit 1 # [win] {% endfor %} + # For compatiblity (see #33) + - name: lapack + build: + string: "netlib" + requirements: + run: + - {{ pin_subpackage("liblapack", exact=True) }} + about: home: http://www.netlib.org/lapack license: BSD-3-Clause From 682c47d4d4521a9cd2a435ca6c1b03c695699f39 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 27 Apr 2020 18:56:30 +0200 Subject: [PATCH 06/14] copy comment for skipping tests to bld.bat; small batch nits --- recipe/bld.bat | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipe/bld.bat b/recipe/bld.bat index 94b5622..25037f7 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,7 +1,7 @@ mkdir build cd build -REM Trick to avoid CMake/sh.exe error +:: Trick to avoid CMake/sh.exe error ren "C:\Program Files\Git\usr\bin\sh.exe" _sh.exe set "CC=gcc.exe" @@ -21,8 +21,13 @@ cmake -G "MinGW Makefiles" ^ mingw32-make -j%CPU_COUNT% mingw32-make install +:: testing with shared libraries does not work - skip them. +:: This is because: to test that the program exits if wrong parameters are given, +:: the testsuite overrides the symbol xerbla (xerbla logs the error and exits) with +:: its own version that reports to the test program in case of an error. +:: This does not work with dylibs on osx and dlls on windows. ctest --output-on-failure -E "x*cblat*" -if errorlevel 1 exit 1 +if %ERRORLEVEL% NEQ 0 exit 1 for %%i in (blas cblas lapack lapacke) do ( dumpbin /exports "%LIBRARY_PREFIX%/bin/lib%%i.dll" > exports%%i.txt From fc409b4a3e958891f4fc9f1979f027bcdd815b74 Mon Sep 17 00:00:00 2001 From: h-vetinari <33685575+h-vetinari@users.noreply.github.com> Date: Mon, 27 Apr 2020 19:02:17 +0200 Subject: [PATCH 07/14] Update requirements for output 'lapack' Co-Authored-By: Isuru Fernando --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9cea694..765161c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -191,7 +191,7 @@ outputs: string: "netlib" requirements: run: - - {{ pin_subpackage("liblapack", exact=True) }} + - liblapack {{ version }}.* about: home: http://www.netlib.org/lapack From 6efe09babcd75ad21cf2577bf5129b8c86fb8af5 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 28 Apr 2020 08:47:15 +0200 Subject: [PATCH 08/14] add some stars to stop resolver from complaining Since `{{ version }}` goes down to patch level, this doesn't changes anything, but without it, there are warnings like: Adding .* to spec 'libblas 3.9.0' to ensure satisfiability. Please consider putting {{ var_name }}.* or some relational operator (>/=/<=) on this spec in meta.yaml, or if req is also a build req, using {{ pin_compatible() }} jinja2 function instead. See https://conda.io/docs/user-guide/tasks/build-packages/variants.html#pinning-at-the-variant-level --- recipe/meta.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 765161c..c1008b3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -75,7 +75,7 @@ outputs: - {{ compiler("m2w64_c") }} # [win] - {{ compiler("m2w64_fortran") }} # [win] run: - - libblas {{ version }} + - libblas {{ version }}.* files: - {{ library }}include/cblas*.h - {{ library }}lib/pkgconfig/cblas.pc @@ -104,7 +104,7 @@ outputs: - {{ compiler("m2w64_c") }} # [win] - {{ compiler("m2w64_fortran") }} # [win] run: - - libblas {{ version }} + - libblas {{ version }}.* files: - {{ library }}lib/pkgconfig/lapack.pc - {{ library }}lib/cmake/lapack-{{ version }}/*.cmake @@ -132,9 +132,9 @@ outputs: - {{ compiler("m2w64_c") }} # [win] - {{ compiler("m2w64_fortran") }} # [win] run: - - libblas {{ version }} - - libcblas {{ version }} - - liblapack {{ version }} + - libblas {{ version }}.* + - libcblas {{ version }}.* + - liblapack {{ version }}.* files: - {{ library }}include/lapacke*.h - {{ library }}lib/pkgconfig/lapacke.pc From 9c913a08fe836e35dc9508b3473fa95551b5766b Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 28 Apr 2020 13:50:03 +0200 Subject: [PATCH 09/14] exit bld.bat upon installation errors --- recipe/bld.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/bld.bat b/recipe/bld.bat index 25037f7..33c239a 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -20,6 +20,7 @@ cmake -G "MinGW Makefiles" ^ mingw32-make -j%CPU_COUNT% mingw32-make install +if %ERRORLEVEL% NEQ 0 exit 1 :: testing with shared libraries does not work - skip them. :: This is because: to test that the program exits if wrong parameters are given, From 7b24c0ec5f5e0a0cac964927febccfcb164503c4 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 6 Sep 2020 23:38:53 +0200 Subject: [PATCH 10/14] Carry various upstream patches to fix build errors & warnings Also includes some fixes for regressions, bugs & undefined behaviour that are being carried by the OpenBLAS project. --- recipe/meta.yaml | 17 +- ...rent_version-and-compatibility_vers.patch} | 6 +- ...prototypes-for-deprecated-LAPACK-fun.patch | 256 ++++++++++++++++++ .../patches/0003-Fix-MinGW-build-error.patch | 42 +++ ...propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch | 39 +++ ...x-the-loop-index-scalar-in-ZHEEQUB.f.patch | 25 ++ ...nconsistencies-in-LAPACK-E-_-cz-gesv.patch | 58 ++++ 7 files changed, 439 insertions(+), 4 deletions(-) rename recipe/patches/{no_soversion_osx.patch => 0001-Avoid-setting-current_version-and-compatibility_vers.patch} (93%) create mode 100644 recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch create mode 100644 recipe/patches/0003-Fix-MinGW-build-error.patch create mode 100644 recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch create mode 100644 recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch create mode 100644 recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c1008b3..188256b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -17,7 +17,22 @@ source: sha256: 106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573 patches: # Avoid setting current_version and compatibility_version - - patches/no_soversion_osx.patch # [osx] + - patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch # [osx] + # + # carry upstream patches for build errors/bugs; these can all be removed upon next release + # ===FIX BUILD ERRORS=== + # restore deprecated symbols that were inadvertently removed (from Reference-LAPACK/lapack#367); + # squashed with fix-ups Reference-LAPACK/lapack#434 & #437 (cf. xianyi/OpenBLAS#2808 & #2819) + - patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch + # fix compile errors due to trying to cast complex_float to int (from Reference-LAPACK/lapack#370) + - patches/0003-Fix-MinGW-build-error.patch + # ===OTHER BUG FIXES=== + # from Reference-LAPACK/lapack#390, see also xianyi/OpenBLAS#2442 + - patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch + # from Reference-LAPACK/lapack#408 + - patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch + # from Reference-LAPACK/lapack#436, see also xianyi/OpenBLAS#2817 + - patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch build: number: "{{ build_num }}" diff --git a/recipe/patches/no_soversion_osx.patch b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch similarity index 93% rename from recipe/patches/no_soversion_osx.patch rename to recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch index aea4f4b..770a460 100644 --- a/recipe/patches/no_soversion_osx.patch +++ b/recipe/patches/0001-Avoid-setting-current_version-and-compatibility_vers.patch @@ -1,8 +1,8 @@ -From a8be14e24f6678c8637a3ea5d5001be2c1566504 Mon Sep 17 00:00:00 2001 +From 1b26dcff9774541c0c5739a02c97a527964c1d87 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/6] Avoid setting current_version and compatibility_version + on OSX --- BLAS/SRC/CMakeLists.txt | 5 ----- diff --git a/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch new file mode 100644 index 0000000..bdaf37e --- /dev/null +++ b/recipe/patches/0002-Restore-missing-prototypes-for-deprecated-LAPACK-fun.patch @@ -0,0 +1,256 @@ +From 9ba3335009a801bae4b6dcb3df2cbdf47015f462 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= +Date: Sat, 23 Nov 2019 12:22:20 +0100 +Subject: [PATCH 2/6] Restore missing prototypes for deprecated LAPACK + functions + +Some LAPACK functions prototypes were inadvertedly dropped in 3.9.0. As a +consequence, LAPACKE has several unresolved symbols. + +Closes #365 + +Squash of lapack#367, lapack#434 & lapack#437 +--- + LAPACKE/include/lapack.h | 182 ++++++++++++++++++++++++++++++++++----- + 1 file changed, 161 insertions(+), 21 deletions(-) + +diff --git a/LAPACKE/include/lapack.h b/LAPACKE/include/lapack.h +index 3f425325..9a8f46bb 100644 +--- a/LAPACKE/include/lapack.h ++++ b/LAPACKE/include/lapack.h +@@ -12,27 +12,6 @@ + + #include + +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/*----------------------------------------------------------------------------*/ +-#ifndef lapack_int +-#define lapack_int int +-#endif +- +-#ifndef lapack_logical +-#define lapack_logical lapack_int +-#endif +- +-/* f2c, hence clapack and MacOS Accelerate, returns double instead of float +- * for sdot, slange, clange, etc. */ +-#if defined(LAPACK_F2C) +- typedef double lapack_float_return; +-#else +- typedef float lapack_float_return; +-#endif +- + /* Complex types are structures equivalent to the + * Fortran complex types COMPLEX(4) and COMPLEX(8). + * +@@ -52,7 +31,11 @@ extern "C" { + + /* Complex type (single precision) */ + #ifndef lapack_complex_float ++#ifndef __cplusplus + #include ++#else ++#include ++#endif + #define lapack_complex_float float _Complex + #endif + +@@ -66,7 +49,11 @@ extern "C" { + + /* Complex type (double precision) */ + #ifndef lapack_complex_double ++#ifndef __cplusplus + #include ++#else ++#include ++#endif + #define lapack_complex_double double _Complex + #endif + +@@ -80,6 +67,29 @@ extern "C" { + + #endif /* LAPACK_COMPLEX_CUSTOM */ + ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/*----------------------------------------------------------------------------*/ ++#ifndef lapack_int ++#define lapack_int int ++#endif ++ ++#ifndef lapack_logical ++#define lapack_logical lapack_int ++#endif ++ ++/* f2c, hence clapack and MacOS Accelerate, returns double instead of float ++ * for sdot, slange, clange, etc. */ ++#if defined(LAPACK_F2C) ++ typedef double lapack_float_return; ++#else ++ typedef float lapack_float_return; ++#endif ++ ++ + /* Callback logical functions of one, two, or three arguments are used + * to select eigenvalues to sort to the top left of the Schur form. + * The value is selected if function returns TRUE (non-zero). */ +@@ -1842,6 +1852,28 @@ void LAPACK_zgeqlf( + lapack_complex_double* work, lapack_int const* lwork, + lapack_int* info ); + ++#define LAPACK_sgeqpf LAPACK_GLOBAL(sgeqpf,SGEQPF) ++void LAPACK_sgeqpf( lapack_int* m, lapack_int* n, float* a, lapack_int* lda, ++ lapack_int* jpvt, float* tau, float* work, ++ lapack_int *info ); ++ ++#define LAPACK_dgeqpf LAPACK_GLOBAL(dgeqpf,DGEQPF) ++void LAPACK_dgeqpf( lapack_int* m, lapack_int* n, double* a, lapack_int* lda, ++ lapack_int* jpvt, double* tau, double* work, ++ lapack_int *info ); ++ ++#define LAPACK_cgeqpf LAPACK_GLOBAL(cgeqpf,CGEQPF) ++void LAPACK_cgeqpf( lapack_int* m, lapack_int* n, lapack_complex_float* a, ++ lapack_int* lda, lapack_int* jpvt, ++ lapack_complex_float* tau, lapack_complex_float* work, ++ float* rwork, lapack_int *info ); ++ ++#define LAPACK_zgeqpf LAPACK_GLOBAL(zgeqpf,ZGEQPF) ++void LAPACK_zgeqpf( lapack_int* m, lapack_int* n, lapack_complex_double* a, ++ lapack_int* lda, lapack_int* jpvt, ++ lapack_complex_double* tau, lapack_complex_double* work, ++ double* rwork, lapack_int *info ); ++ + #define LAPACK_cgeqp3 LAPACK_GLOBAL(cgeqp3,CGEQP3) + void LAPACK_cgeqp3( + lapack_int const* m, lapack_int const* n, +@@ -3617,6 +3649,60 @@ void LAPACK_zggrqf( + lapack_complex_double* work, lapack_int const* lwork, + lapack_int* info ); + ++#define LAPACK_sggsvd LAPACK_GLOBAL(sggsvd,SGGSVD) ++lapack_int LAPACK_sggsvd( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* n, lapack_int const* p, ++ lapack_int* k, lapack_int* l, ++ float* a, lapack_int const* lda, ++ float* b, lapack_int const* ldb, ++ float* alpha, float* beta, ++ float* u, lapack_int const* ldu, ++ float* v, lapack_int const* ldv, ++ float* q, lapack_int const* ldq, ++ float* work, lapack_int* iwork, lapack_int* info ); ++ ++#define LAPACK_dggsvd LAPACK_GLOBAL(dggsvd,DGGSVD) ++lapack_int LAPACK_dggsvd( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* n, lapack_int const* p, ++ lapack_int* k, lapack_int* l, ++ double* a, lapack_int const* lda, ++ double* b, lapack_int const* ldb, ++ double* alpha, double* beta, ++ double* u, lapack_int const* ldu, ++ double* v, lapack_int const* ldv, ++ double* q, lapack_int const* ldq, ++ double* work, lapack_int* iwork, lapack_int* info ); ++ ++#define LAPACK_cggsvd LAPACK_GLOBAL(cggsvd,CGGSVD) ++lapack_int LAPACK_cggsvd( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* n, lapack_int const* p, ++ lapack_int* k, lapack_int* l, ++ lapack_complex_float* a, lapack_int const* lda, ++ lapack_complex_float* b, lapack_int const* ldb, ++ float* alpha, float* beta, ++ lapack_complex_float* u, lapack_int const* ldu, ++ lapack_complex_float* v, lapack_int const* ldv, ++ lapack_complex_float* q, lapack_int const* ldq, ++ lapack_complex_float* work, float* rwork, ++ lapack_int* iwork, lapack_int* info ); ++ ++#define LAPACK_zggsvd LAPACK_GLOBAL(zggsvd,ZGGSVD) ++lapack_int LAPACK_zggsvd( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* n, lapack_int const* p, ++ lapack_int* k, lapack_int* l, ++ lapack_complex_double* a, lapack_int const* lda, ++ lapack_complex_double* b, lapack_int const* ldb, ++ double* alpha, double* beta, ++ lapack_complex_double* u, lapack_int const* ldu, ++ lapack_complex_double* v, lapack_int const* ldv, ++ lapack_complex_double* q, lapack_int const* ldq, ++ lapack_complex_double* work, double* rwork, ++ lapack_int* iwork, lapack_int* info ); ++ + #define LAPACK_cggsvd3 LAPACK_GLOBAL(cggsvd3,CGGSVD3) + void LAPACK_cggsvd3( + char const* jobu, char const* jobv, char const* jobq, +@@ -3679,6 +3765,60 @@ void LAPACK_zggsvd3( + lapack_int* iwork, + lapack_int* info ); + ++#define LAPACK_sggsvp LAPACK_GLOBAL(sggsvp,SGGSVP) ++lapack_int LAPACK_sggsvp( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* p, lapack_int const* n, ++ float* a, lapack_int const* lda, ++ float* b, lapack_int const* ldb, ++ float* tola, float* tolb, ++ lapack_int* k, lapack_int* l, ++ float* u, lapack_int const* ldu, ++ float* v, lapack_int const* ldv, ++ float* q, lapack_int const* ldq, ++ lapack_int* iwork, float* tau, ++ float* work, lapack_int* info ); ++ ++#define LAPACK_dggsvp LAPACK_GLOBAL(dggsvp,DGGSVP) ++lapack_int LAPACK_dggsvp( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* p, lapack_int const* n, ++ double* a, lapack_int const* lda, ++ double* b, lapack_int const* ldb, ++ double* tola, double* tolb, ++ lapack_int* k, lapack_int* l, ++ double* u, lapack_int const* ldu, ++ double* v, lapack_int const* ldv, ++ double* q, lapack_int const* ldq, ++ lapack_int* iwork, double* tau, ++ double* work, lapack_int* info ); ++ ++#define LAPACK_cggsvp LAPACK_GLOBAL(cggsvp,CGGSVP) ++lapack_int LAPACK_cggsvp( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* p, lapack_int const* n, ++ lapack_complex_float* a, lapack_int const* lda, ++ lapack_complex_float* b, lapack_int const* ldb, ++ float* tola, float* tolb, lapack_int* k, lapack_int* l, ++ lapack_complex_float* u, lapack_int const* ldu, ++ lapack_complex_float* v, lapack_int const* ldv, ++ lapack_complex_float* q, lapack_int const* ldq, ++ lapack_int* iwork, float* rwork, lapack_complex_float* tau, ++ lapack_complex_float* work, lapack_int* info ); ++ ++#define LAPACK_zggsvp LAPACK_GLOBAL(zggsvp,ZGGSVP) ++lapack_int LAPACK_zggsvp( ++ char const* jobu, char const* jobv, char const* jobq, ++ lapack_int const* m, lapack_int const* p, lapack_int const* n, ++ lapack_complex_double* a, lapack_int const* lda, ++ lapack_complex_double* b, lapack_int const* ldb, ++ double* tola, double* tolb, lapack_int* k, lapack_int* l, ++ lapack_complex_double* u, lapack_int const* ldu, ++ lapack_complex_double* v, lapack_int const* ldv, ++ lapack_complex_double* q, lapack_int const* ldq, ++ lapack_int* iwork, double* rwork, lapack_complex_double* tau, ++ lapack_complex_double* work, lapack_int* info ); ++ + #define LAPACK_cggsvp3 LAPACK_GLOBAL(cggsvp3,CGGSVP3) + void LAPACK_cggsvp3( + char const* jobu, char const* jobv, char const* jobq, +-- +2.26.2.windows.1 + diff --git a/recipe/patches/0003-Fix-MinGW-build-error.patch b/recipe/patches/0003-Fix-MinGW-build-error.patch new file mode 100644 index 0000000..59f436c --- /dev/null +++ b/recipe/patches/0003-Fix-MinGW-build-error.patch @@ -0,0 +1,42 @@ +From 769a9c4cc8a7da9a46b9bd7db21968fdfe411cc6 Mon Sep 17 00:00:00 2001 +From: Julien Schueller +Date: Mon, 25 Nov 2019 19:41:16 +0100 +Subject: [PATCH 3/6] Fix MinGW build error + +With MinGW the build fails for some LAPACKE xgesvd routines with: +lapacke_cgesvdq.c:74:5: error: aggregate value used where an integer was expected +Seems the C2INT macro is useful there. +--- + LAPACKE/src/lapacke_cgesvdq.c | 2 +- + LAPACKE/src/lapacke_zgesvdq.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/LAPACKE/src/lapacke_cgesvdq.c b/LAPACKE/src/lapacke_cgesvdq.c +index 80156945..6ecd0696 100644 +--- a/LAPACKE/src/lapacke_cgesvdq.c ++++ b/LAPACKE/src/lapacke_cgesvdq.c +@@ -71,7 +71,7 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp, + goto exit_level_0; + } + liwork = (lapack_int)iwork_query; +- lcwork = (lapack_int)cwork_query; ++ lcwork = LAPACK_C2INT(cwork_query); + lrwork = (lapack_int)rwork_query; + /* Allocate memory for work arrays */ + iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork ); +diff --git a/LAPACKE/src/lapacke_zgesvdq.c b/LAPACKE/src/lapacke_zgesvdq.c +index 7c205dab..1674138f 100644 +--- a/LAPACKE/src/lapacke_zgesvdq.c ++++ b/LAPACKE/src/lapacke_zgesvdq.c +@@ -71,7 +71,7 @@ lapack_int LAPACKE_zgesvdq( int matrix_layout, char joba, char jobp, + goto exit_level_0; + } + liwork = (lapack_int)iwork_query; +- lcwork = (lapack_int)cwork_query; ++ lcwork = LAPACK_C2INT(cwork_query); + lrwork = (lapack_int)rwork_query; + /* Allocate memory for work arrays */ + iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * liwork ); +-- +2.26.2.windows.1 + diff --git a/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch new file mode 100644 index 0000000..963aea8 --- /dev/null +++ b/recipe/patches/0004-NaN-not-propagating-in-DCOMBSSQ-and-SCOMBSSQ.patch @@ -0,0 +1,39 @@ +From e30d1c9ca0c08ab3559015cb33621b7f28ba801b Mon Sep 17 00:00:00 2001 +From: pdalgd <55156186+pdalgd@users.noreply.github.com> +Date: Fri, 21 Feb 2020 13:24:37 +0100 +Subject: [PATCH 4/6] NaN not propagating in DCOMBSSQ and SCOMBSSQ + +--- + SRC/dcombssq.f | 2 ++ + SRC/scombssq.f | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/SRC/dcombssq.f b/SRC/dcombssq.f +index 79f6d95c..980a80e6 100644 +--- a/SRC/dcombssq.f ++++ b/SRC/dcombssq.f +@@ -80,6 +80,8 @@ + IF( V1( 1 ).GE.V2( 1 ) ) THEN + IF( V1( 1 ).NE.ZERO ) THEN + V1( 2 ) = V1( 2 ) + ( V2( 1 ) / V1( 1 ) )**2 * V2( 2 ) ++ ELSE ++ V1( 2 ) = V1( 2 ) + V2( 2 ) + END IF + ELSE + V1( 2 ) = V2( 2 ) + ( V1( 1 ) / V2( 1 ) )**2 * V1( 2 ) +diff --git a/SRC/scombssq.f b/SRC/scombssq.f +index 76bc0e32..cc51a324 100644 +--- a/SRC/scombssq.f ++++ b/SRC/scombssq.f +@@ -80,6 +80,8 @@ + IF( V1( 1 ).GE.V2( 1 ) ) THEN + IF( V1( 1 ).NE.ZERO ) THEN + V1( 2 ) = V1( 2 ) + ( V2( 1 ) / V1( 1 ) )**2 * V2( 2 ) ++ ELSE ++ V1( 2 ) = V1( 2 ) + V2( 2 ) + END IF + ELSE + V1( 2 ) = V2( 2 ) + ( V1( 1 ) / V2( 1 ) )**2 * V1( 2 ) +-- +2.26.2.windows.1 + diff --git a/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch new file mode 100644 index 0000000..c5a533f --- /dev/null +++ b/recipe/patches/0005-Fix-the-loop-index-scalar-in-ZHEEQUB.f.patch @@ -0,0 +1,25 @@ +From e69f944b6b4df8f8dd0ef4de6574ec201b415af3 Mon Sep 17 00:00:00 2001 +From: Ilhan Polat +Date: Mon, 27 Apr 2020 12:36:59 +0200 +Subject: [PATCH 5/6] Fix the loop index scalar in ZHEEQUB.f + +--- + SRC/zheequb.f | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SRC/zheequb.f b/SRC/zheequb.f +index d698232e..7d719f41 100644 +--- a/SRC/zheequb.f ++++ b/SRC/zheequb.f +@@ -271,7 +271,7 @@ + AVG = AVG / N + + STD = 0.0D0 +- DO I = N+1, N ++ DO I = N+1, 2*N + WORK( I ) = S( I-N ) * WORK( I-N ) - AVG + END DO + CALL ZLASSQ( N, WORK( N+1 ), 1, SCALE, SUMSQ ) +-- +2.26.2.windows.1 + diff --git a/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch new file mode 100644 index 0000000..2344f71 --- /dev/null +++ b/recipe/patches/0006-Fix-some-minor-inconsistencies-in-LAPACK-E-_-cz-gesv.patch @@ -0,0 +1,58 @@ +From a6666421568ea9eaa9a1b880cf33579a88ba808c Mon Sep 17 00:00:00 2001 +From: "H. Vetinari" +Date: Sun, 26 Apr 2020 00:57:37 +0200 +Subject: [PATCH 6/6] Fix some minor inconsistencies in LAPACK(E)_[cz]gesvdq + +For LAPACKE_cgesvdq, align datatype of `rwork` with lapacke.h and callsite +in LAPACKE_cgesvdq_work; both of the latter use `float* rwork`, so there's +no need to calculate with doubles that only get downcast anyway. + +Similarly, make the signature of lapacke_zgesvdq_work consistent across +lapack.h (modified here), the fortran side and lapacke_zgesvdq_work, see: +https://github.com/Reference-LAPACK/lapack/blob/v3.9.0/LAPACKE/src/lapacke_zgesvdq_work.c#L42 +https://github.com/Reference-LAPACK/lapack/blob/v3.9.0/SRC/zgesvdq.f#L422 +--- + LAPACKE/include/lapack.h | 2 +- + LAPACKE/src/lapacke_cgesvdq.c | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/LAPACKE/include/lapack.h b/LAPACKE/include/lapack.h +index 9a8f46bb..aedaa308 100644 +--- a/LAPACKE/include/lapack.h ++++ b/LAPACKE/include/lapack.h +@@ -2513,7 +2513,7 @@ void LAPACK_zgesvdq( + lapack_complex_double* U, lapack_int const* ldu, + lapack_complex_double* V, lapack_int const* ldv, lapack_int* numrank, + lapack_int* iwork, lapack_int const* liwork, +- lapack_complex_float* cwork, lapack_int* lcwork, ++ lapack_complex_double* cwork, lapack_int* lcwork, + double* rwork, lapack_int const* lrwork, + lapack_int* info ); + +diff --git a/LAPACKE/src/lapacke_cgesvdq.c b/LAPACKE/src/lapacke_cgesvdq.c +index 6ecd0696..eee945e4 100644 +--- a/LAPACKE/src/lapacke_cgesvdq.c ++++ b/LAPACKE/src/lapacke_cgesvdq.c +@@ -47,8 +47,8 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp, + lapack_complex_float* cwork = NULL; + lapack_complex_float cwork_query; + lapack_int lrwork = -1; +- double* rwork = NULL; +- double rwork_query; ++ float* rwork = NULL; ++ float rwork_query; + lapack_int i; + if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) { + LAPACKE_xerbla( "LAPACKE_cgesvdq", -1 ); +@@ -84,7 +84,7 @@ lapack_int LAPACKE_cgesvdq( int matrix_layout, char joba, char jobp, + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; + } +- rwork = (double*)LAPACKE_malloc( sizeof(double) * lrwork ); ++ rwork = (float*)LAPACKE_malloc( sizeof(float) * lrwork ); + if( rwork == NULL ) { + info = LAPACK_WORK_MEMORY_ERROR; + goto exit_level_0; +-- +2.26.2.windows.1 + From e870823f5dfb7d9e2a600a6678c2a27d12129c2d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Mon, 7 Sep 2020 00:02:57 +0200 Subject: [PATCH 11/14] MNT: Re-rendered with conda-build 3.20.1, conda-smithy 3.7.10, and conda-forge-pinning 2020.09.04.10.00.02 --- .azure-pipelines/azure-pipelines-linux.yml | 25 +++++--- .azure-pipelines/azure-pipelines-osx.yml | 71 ++++----------------- .azure-pipelines/azure-pipelines-win.yml | 42 ++++++------ .ci_support/{linux_.yaml => linux_64_.yaml} | 2 + .ci_support/linux_aarch64_.yaml | 6 +- .ci_support/linux_ppc64le_.yaml | 2 + .ci_support/{osx_.yaml => osx_64_.yaml} | 8 +-- .ci_support/{win_.yaml => win_64_.yaml} | 2 + .gitattributes | 2 +- .github/CODEOWNERS | 2 +- .scripts/build_steps.sh | 6 +- .scripts/run_docker_build.sh | 16 ++++- .scripts/run_osx_build.sh | 57 +++++++++++++++++ LICENSE.txt | 2 +- README.md | 22 +++---- azure-pipelines.yml | 4 +- 16 files changed, 156 insertions(+), 113 deletions(-) rename .ci_support/{linux_.yaml => linux_64_.yaml} (88%) rename .ci_support/{osx_.yaml => osx_64_.yaml} (85%) rename .ci_support/{win_.yaml => win_64_.yaml} (85%) create mode 100755 .scripts/run_osx_build.sh diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 43837f5..70bb2f5 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -6,23 +6,29 @@ jobs: - job: linux pool: vmImage: ubuntu-16.04 - timeoutInMinutes: 360 strategy: - maxParallel: 8 matrix: - linux_: - CONFIG: linux_ - UPLOAD_PACKAGES: True + linux_64_: + CONFIG: linux_64_ + UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: condaforge/linux-anvil-comp7 linux_aarch64_: CONFIG: linux_aarch64_ - UPLOAD_PACKAGES: True + UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: condaforge/linux-anvil-aarch64 linux_ppc64le_: CONFIG: linux_ppc64le_ - UPLOAD_PACKAGES: True + UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: condaforge/linux-anvil-ppc64le + maxParallel: 8 + timeoutInMinutes: 360 + steps: + - script: | + rm -rf /opt/ghc + df -h + displayName: Manage disk space + # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | @@ -34,7 +40,10 @@ jobs: - script: | export CI=azure export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) .scripts/run_docker_build.sh displayName: Run docker build env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) \ No newline at end of file + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index ea0a1cf..568ec85 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,72 +5,25 @@ jobs: - job: osx pool: - vmImage: macOS-10.14 - timeoutInMinutes: 360 + vmImage: macOS-10.15 strategy: - maxParallel: 8 matrix: - osx_: - CONFIG: osx_ - UPLOAD_PACKAGES: True + osx_64_: + CONFIG: osx_64_ + UPLOAD_PACKAGES: 'True' + maxParallel: 8 + timeoutInMinutes: 360 steps: # TODO: Fast finish on azure pipelines? - script: | - echo "Fast Finish" - - - - script: | - echo "Removing homebrew from Azure to avoid conflicts." - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew - chmod +x ~/uninstall_homebrew - ~/uninstall_homebrew -fq - rm ~/uninstall_homebrew - displayName: Remove homebrew - - - bash: | - echo "##vso[task.prependpath]$CONDA/bin" - sudo chown -R $USER $CONDA - displayName: Add conda to PATH - - - script: | - source activate base - conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build - displayName: 'Add conda-forge-ci-setup=2' - - - script: | - source activate base - echo "Configuring conda." - - setup_conda_rc ./ "./recipe" ./.ci_support/${CONFIG}.yaml export CI=azure - source run_conda_forge_build_setup - conda update --yes --quiet --override-channels -c conda-forge -c defaults --all - env: { - OSX_FORCE_SDK_DOWNLOAD: "1" - } - displayName: Configure conda and conda-build - - - script: | - source activate base - mangle_compiler ./ "./recipe" ./.ci_support/${CONFIG}.yaml - displayName: Mangle compiler - - - script: | - source activate base - make_build_number ./ "./recipe" ./.ci_support/${CONFIG}.yaml - displayName: Generate build number clobber file - - - script: | - source activate base - conda build "./recipe" -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml - displayName: Build recipe - - - script: | - source activate base + export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME - upload_package ./ "./recipe" ./.ci_support/${CONFIG}.yaml - displayName: Upload package + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + ./.scripts/run_osx_build.sh + displayName: Run OSX build env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) - condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 5b713f8..ab8cb2b 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -6,20 +6,17 @@ jobs: - job: win pool: vmImage: vs2017-win2016 - timeoutInMinutes: 360 strategy: - maxParallel: 4 matrix: - win_: - CONFIG: win_ - CONDA_BLD_PATH: D:\\bld\\ - UPLOAD_PACKAGES: True - steps: - # TODO: Fast finish on azure pipelines? - - script: | - ECHO ON - + win_64_: + CONFIG: win_64_ + UPLOAD_PACKAGES: 'True' + maxParallel: 4 + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + steps: - script: | choco install vcpython27 -fdv -y --debug condition: contains(variables['CONFIG'], 'vs2008') @@ -56,15 +53,19 @@ jobs: - task: CondaEnvironment@1 inputs: - packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=2' # Optional + packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=3 pip' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment - script: set PYTHONUNBUFFERED=1 + displayName: Set PYTHONUNBUFFERED # Configure the VM - - script: setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml + - script: | + call activate base + setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml + displayName: conda-forge CI setup # Configure the VM. - script: | @@ -74,11 +75,6 @@ jobs: displayName: conda-forge build setup - - script: | - rmdir C:\strawberry /s /q - continueOnError: true - displayName: remove strawberryperl - # Special cased version setting some more things! - script: | call activate base @@ -96,12 +92,20 @@ jobs: env: PYTHONUNBUFFERED: 1 condition: not(contains(variables['CONFIG'], 'vs2008')) + - script: | + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + call activate base + validate_recipe_outputs "%FEEDSTOCK_NAME%" + displayName: Validate Recipe Outputs - script: | set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" call activate base - upload_package .\ ".\recipe" .ci_support\%CONFIG%.yaml + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml displayName: Upload package env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file diff --git a/.ci_support/linux_.yaml b/.ci_support/linux_64_.yaml similarity index 88% rename from .ci_support/linux_.yaml rename to .ci_support/linux_64_.yaml index 20a65ca..1a72592 100644 --- a/.ci_support/linux_.yaml +++ b/.ci_support/linux_64_.yaml @@ -12,3 +12,5 @@ fortran_compiler: - gfortran fortran_compiler_version: - '7' +target_platform: +- linux-64 diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index a4231d9..660ddcd 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '7' +- '7.5' cdt_arch: - aarch64 cdt_name: @@ -17,4 +17,6 @@ docker_image: fortran_compiler: - gfortran fortran_compiler_version: -- '7' +- 7.5.0 +target_platform: +- linux-aarch64 diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index e1198bc..cadfa8f 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -12,3 +12,5 @@ fortran_compiler: - gfortran fortran_compiler_version: - '8' +target_platform: +- linux-ppc64le diff --git a/.ci_support/osx_.yaml b/.ci_support/osx_64_.yaml similarity index 85% rename from .ci_support/osx_.yaml rename to .ci_support/osx_64_.yaml index c6536fe..11c4ed5 100644 --- a/.ci_support/osx_.yaml +++ b/.ci_support/osx_64_.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '9' +- '10' channel_sources: - conda-forge,defaults channel_targets: @@ -11,8 +11,8 @@ channel_targets: fortran_compiler: - gfortran fortran_compiler_version: -- '7' +- '7.5' macos_machine: - x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' +target_platform: +- osx-64 diff --git a/.ci_support/win_.yaml b/.ci_support/win_64_.yaml similarity index 85% rename from .ci_support/win_.yaml rename to .ci_support/win_64_.yaml index 2dedc1a..38790cf 100644 --- a/.ci_support/win_.yaml +++ b/.ci_support/win_64_.yaml @@ -6,3 +6,5 @@ m2w64_c_compiler: - m2w64-toolchain m2w64_fortran_compiler: - m2w64-toolchain +target_platform: +- win-64 diff --git a/.gitattributes b/.gitattributes index ac943c1..9060b27 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ bld.bat text eol=crlf .gitattributes linguist-generated=true .gitignore linguist-generated=true .travis.yml linguist-generated=true -.scripts linguist-generated=true +.scripts/* linguist-generated=true LICENSE.txt linguist-generated=true README.md linguist-generated=true azure-pipelines.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9361cd5..0ebcfc3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @beckermr @hadim @isuruf @jakirkham \ No newline at end of file +* @beckermr @isuruf @jakirkham \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 8a4af44..7167db8 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -19,7 +19,7 @@ conda-build: CONDARC -conda install --yes --quiet conda-forge-ci-setup=2 conda-build -c conda-forge +conda install --yes --quiet conda-forge-ci-setup=3 conda-build pip -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -30,10 +30,12 @@ source run_conda_forge_build_setup make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" +validate_recipe_outputs "${FEEDSTOCK_NAME}" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" fi touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 066a857..e4d5bab 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -13,6 +13,10 @@ PROVIDER_DIR="$(basename $THISDIR)" FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + docker info # In order for the conda-build process in the container to write to the mounted @@ -52,21 +56,27 @@ mkdir -p "$ARTIFACTS" DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" rm -f "$DONE_CANARY" +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ -z "${CI}" ]; then - DOCKER_RUN_ARGS="-it " + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z \ -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \ -e CONFIG \ - -e BINSTAR_TOKEN \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ -e GIT_BRANCH \ -e UPLOAD_ON_BRANCH \ -e CI \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e BINSTAR_TOKEN \ + -e FEEDSTOCK_TOKEN \ + -e STAGING_BINSTAR_TOKEN \ $DOCKER_IMAGE \ bash \ /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh new file mode 100755 index 0000000..982eae9 --- /dev/null +++ b/.scripts/run_osx_build.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +set -x + +echo -e "\n\nInstalling a fresh version of Miniforge." +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:start:install_miniforge\\r' +fi +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 +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:end:install_miniforge\\r' +fi + +echo -e "\n\nConfiguring conda." +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:start:configure_conda\\r' +fi + +source ${HOME}/miniforge3/etc/profile.d/conda.sh +conda activate base + +echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." +conda install -n base --quiet --yes conda-forge-ci-setup=3 conda-build pip + + + +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 + +echo -e "\n\nRunning the build setup script." +source run_conda_forge_build_setup + + +if [[ ${CI} == "travis" ]]; then + echo -en 'travis_fold:end:configure_conda\\r' +fi + +set -e + +echo -e "\n\nMaking the build clobber file and running the build." +make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml + +conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +validate_recipe_outputs "${FEEDSTOCK_NAME}" + +if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + echo -e "\n\nUploading the packages." + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml +fi \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index cba42cf..5f30279 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2019, conda-forge +Copyright (c) 2015-2020, conda-forge contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index e9de91e..e67648e 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ About blas-split Home: http://www.netlib.org/lapack -Package license: BSD 3-Clause +Package license: BSD-3-Clause -Feedstock license: BSD 3-Clause +Feedstock license: BSD-3-Clause Summary: Linear Algebra PACKage @@ -29,10 +29,10 @@ Current build status - + @@ -50,17 +50,17 @@ Current build status - + - + @@ -78,6 +78,7 @@ Current release info | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-blas-green.svg)](https://anaconda.org/conda-forge/blas) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/blas.svg)](https://anaconda.org/conda-forge/blas) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/blas.svg)](https://anaconda.org/conda-forge/blas) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/blas.svg)](https://anaconda.org/conda-forge/blas) | | [![Conda Recipe](https://img.shields.io/badge/recipe-blas--devel-green.svg)](https://anaconda.org/conda-forge/blas-devel) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/blas-devel.svg)](https://anaconda.org/conda-forge/blas-devel) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/blas-devel.svg)](https://anaconda.org/conda-forge/blas-devel) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/blas-devel.svg)](https://anaconda.org/conda-forge/blas-devel) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-lapack-green.svg)](https://anaconda.org/conda-forge/lapack) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/lapack.svg)](https://anaconda.org/conda-forge/lapack) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/lapack.svg)](https://anaconda.org/conda-forge/lapack) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/lapack.svg)](https://anaconda.org/conda-forge/lapack) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libblas-green.svg)](https://anaconda.org/conda-forge/libblas) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libblas.svg)](https://anaconda.org/conda-forge/libblas) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libblas.svg)](https://anaconda.org/conda-forge/libblas) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libblas.svg)](https://anaconda.org/conda-forge/libblas) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libcblas-green.svg)](https://anaconda.org/conda-forge/libcblas) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libcblas.svg)](https://anaconda.org/conda-forge/libcblas) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libcblas.svg)](https://anaconda.org/conda-forge/libcblas) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libcblas.svg)](https://anaconda.org/conda-forge/libcblas) | | [![Conda Recipe](https://img.shields.io/badge/recipe-liblapack-green.svg)](https://anaconda.org/conda-forge/liblapack) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/liblapack.svg)](https://anaconda.org/conda-forge/liblapack) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/liblapack.svg)](https://anaconda.org/conda-forge/liblapack) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/liblapack.svg)](https://anaconda.org/conda-forge/liblapack) | @@ -92,10 +93,10 @@ Installing `blas-split` from the `conda-forge` channel can be achieved by adding conda config --add channels conda-forge ``` -Once the `conda-forge` channel has been enabled, `blas, blas-devel, libblas, libcblas, liblapack, liblapacke` can be installed with: +Once the `conda-forge` channel has been enabled, `blas, blas-devel, lapack, libblas, libcblas, liblapack, liblapacke` can be installed with: ``` -conda install blas blas-devel libblas libcblas liblapack liblapacke +conda install blas blas-devel lapack libblas libcblas liblapack liblapacke ``` It is possible to list all of the versions of `blas` available on your platform with: @@ -169,7 +170,6 @@ Feedstock Maintainers ===================== * [@beckermr](https://github.com/beckermr/) -* [@hadim](https://github.com/hadim/) * [@isuruf](https://github.com/isuruf/) * [@jakirkham](https://github.com/jakirkham/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e5306da..6b346f5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,5 +4,5 @@ jobs: - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-win.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file From 80cbe53e4c80205aaee3736abac374d14565bf4e Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sun, 18 Oct 2020 11:03:22 -0500 Subject: [PATCH 12/14] osx-arm64 --- .azure-pipelines/azure-pipelines-osx.yml | 3 +++ .../osx_arm64_target_platformosx-arm64.yaml | 21 +++++++++++++++++++ README.md | 7 +++++++ conda-forge.yml | 4 ++-- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .ci_support/osx_arm64_target_platformosx-arm64.yaml diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 6ec3446..6406510 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -14,6 +14,9 @@ jobs: osx_64_fortran_compiler_version9target_platformosx-64: CONFIG: osx_64_fortran_compiler_version9target_platformosx-64 UPLOAD_PACKAGES: 'True' + osx_arm64_target_platformosx-arm64: + CONFIG: osx_arm64_target_platformosx-arm64 + UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 steps: diff --git a/.ci_support/osx_arm64_target_platformosx-arm64.yaml b/.ci_support/osx_arm64_target_platformosx-arm64.yaml new file mode 100644 index 0000000..b6f18a3 --- /dev/null +++ b/.ci_support/osx_arm64_target_platformosx-arm64.yaml @@ -0,0 +1,21 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '11' +channel_sources: +- conda-forge/label/rust_dev,conda-forge,https://conda-web.anaconda.org/conda-forge +channel_targets: +- conda-forge main +fortran_compiler: +- gfortran +fortran_compiler_version: +- '11' +macos_machine: +- arm64-apple-darwin20.0.0 +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - fortran_compiler_version diff --git a/README.md b/README.md index b3165a8..1ab76a7 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,13 @@ Current build status variant + + +
VariantStatus
linuxlinux_64 - variant + variant
osxosx_64 - variant + variant
winwin_64 - variant + variant
osx_arm64_target_platformosx-arm64 + + variant + +
win_64_target_platformwin-64 diff --git a/conda-forge.yml b/conda-forge.yml index 2319d1c..74bf7ab 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,6 +1,6 @@ -compiler_stack: comp7 - provider: linux_ppc64le: default linux_aarch64: default +build_platform: + osx_arm64: osx_64 conda_forge_output_validation: true From c5331c0a63426e886774e4a8d5f20abd53b88a57 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sun, 18 Oct 2020 11:03:31 -0500 Subject: [PATCH 13/14] use target_platform --- recipe/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index b50c3b6..4b43884 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -7,13 +7,13 @@ cd build mkdir -p ${PREFIX}/include -if [[ $(uname) == "Linux" ]]; then +if [[ "$target_platform" == linux-* ]]; then # workaround a binutils bug export LDFLAGS="${LDFLAGS} -Wl,-rpath-link,$(pwd)/lib" export LDFLAGS=$(echo "${LDFLAGS}" | sed "s/-Wl,--as-needed//g") fi -if [[ $(uname) == "Darwin" ]]; then +if [[ "$target_platform" == osx-* ]]; then export SDKROOT="${CONDA_BUILD_SYSROOT}" export CFLAGS="${CFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}" export FFLAGS="${FFLAGS} -isysroot ${CONDA_BUILD_SYSROOT}" @@ -33,7 +33,7 @@ cmake \ -DLAPACKE=ON \ -DCBLAS=ON \ -DBUILD_DEPRECATED=ON \ - .. + ${CMAKE_ARGS} .. make -j${CPU_COUNT} @@ -55,7 +55,7 @@ fi make install -if [[ $(uname) == "Darwin" ]]; then +if [[ "${target_platform}" == osx-* ]]; then for lib in blas cblas lapack lapacke; do mv $PREFIX/lib/lib$lib.dylib $PREFIX/lib/lib$lib.$PKG_VERSION.dylib install_name_tool -id $PREFIX/lib/lib$lib.3.dylib $PREFIX/lib/lib$lib.$PKG_VERSION.dylib From de89abaccb634f9b6f562ad835222f8051fcfefd Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sun, 18 Oct 2020 11:36:35 -0500 Subject: [PATCH 14/14] Skip tests --- recipe/build.sh | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index 4b43884..f4d4b07 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -37,20 +37,22 @@ cmake \ make -j${CPU_COUNT} -if [[ $(uname) == "Darwin" ]]; then - # testing with shared libraries does not work. skip them - # to test that program exits if wrong parameters are given, what the testsuite - # do is that the symbol xerbla (xerbla logs the error and exits) is overriden - # by the test program's own version which reports to the test program that - # xerbla was called. This does not work with dylibs on osx and dlls on windows - ctest --output-on-failure -E "x*cblat2|x*cblat3" -j${CPU_COUNT} -elif [[ $(uname -m) == "x86_64" ]]; then - # Ref: https://github.com/Reference-LAPACK/lapack/issues/85 - ulimit -s unlimited - ctest --output-on-failure -j${CPU_COUNT} -else - ulimit -s unlimited - ctest --output-on-failure -E "LAPACK-xeigtstz*" -j${CPU_COUNT} +if [[ "$CONDA_BUILD_CROSS_COMPILATION" != "1" ]]; then + if [[ "$target_platform" == osx-* ]]; then + # testing with shared libraries does not work. skip them + # to test that program exits if wrong parameters are given, what the testsuite + # do is that the symbol xerbla (xerbla logs the error and exits) is overriden + # by the test program's own version which reports to the test program that + # xerbla was called. This does not work with dylibs on osx and dlls on windows + ctest --output-on-failure -E "x*cblat2|x*cblat3" -j${CPU_COUNT} + elif [[ "$target_platform" == *-64 ]]; then + # Ref: https://github.com/Reference-LAPACK/lapack/issues/85 + ulimit -s unlimited + ctest --output-on-failure -j${CPU_COUNT} + else + ulimit -s unlimited + ctest --output-on-failure -E "LAPACK-xeigtstz*" -j${CPU_COUNT} + fi fi make install