Skip to content

Commit 8f3bb62

Browse files
authored
Merge pull request #4606 from OpenMathLib/develop
Merge develop branch for 0.3.27
2 parents 0475716 + c17f5be commit 8f3bb62

File tree

2,639 files changed

+141743
-40687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,639 files changed

+141743
-40687
lines changed

.cirrus.yml

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
macos_instance:
22
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
33

4-
task:
5-
name: AppleM1/LLVM
6-
compile_script:
7-
- brew install llvm
8-
- export PATH=/opt/homebrew/opt/llvm/bin:$PATH
9-
- export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
10-
- export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
11-
- make TARGET=VORTEX USE_OPENMP=1 CC=clang
4+
#task:
5+
# name: AppleM1/LLVM
6+
# compile_script:
7+
# - brew install llvm
8+
# - export PATH=/opt/homebrew/opt/llvm/bin:$PATH
9+
# - export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
10+
# - export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
11+
# - make TARGET=VORTEX USE_OPENMP=1 CC=clang
1212

13-
task:
14-
name: AppleM1/LLVM/ILP64
15-
compile_script:
16-
- brew install llvm
17-
- export PATH=/opt/homebrew/opt/llvm/bin:$PATH
18-
- export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
19-
- export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
20-
- make TARGET=VORTEX USE_OPENMP=1 CC=clang INTERFACE64=1
13+
#task:
14+
# name: AppleM1/LLVM/ILP64
15+
# compile_script:
16+
# - brew install llvm
17+
# - export PATH=/opt/homebrew/opt/llvm/bin:$PATH
18+
# - export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
19+
# - export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
20+
# - make TARGET=VORTEX USE_OPENMP=1 CC=clang INTERFACE64=1
2121

22-
task:
23-
name: AppleM1/LLVM/CMAKE
24-
compile_script:
25-
- brew install llvm
26-
- export PATH=/opt/homebrew/opt/llvm/bin:$PATH
27-
- export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
28-
- export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
29-
- mkdir build
30-
- cd build
31-
- cmake -DTARGET=VORTEX -DCMAKE_C_COMPILER=clang -DBUILD_SHARED_LIBS=ON ..
32-
- make -j 4
22+
#task:
23+
# name: AppleM1/LLVM/CMAKE
24+
# compile_script:
25+
# - brew install llvm
26+
# - export PATH=/opt/homebrew/opt/llvm/bin:$PATH
27+
# - export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
28+
# - export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
29+
# - mkdir build
30+
# - cd build
31+
# - cmake -DTARGET=VORTEX -DCMAKE_C_COMPILER=clang -DBUILD_SHARED_LIBS=ON ..
32+
# - make -j 4
3333

34-
task:
35-
name: AppleM1/GCC/MAKE/OPENMP
36-
compile_script:
37-
- brew install gcc@11
38-
- export PATH=/opt/homebrew/bin:$PATH
39-
- export LDFLAGS="-L/opt/homebrew/lib"
40-
- export CPPFLAGS="-I/opt/homebrew/include"
41-
- make CC=gcc-11 FC=gfortran-11 USE_OPENMP=1
34+
#task:
35+
# name: AppleM1/GCC/MAKE/OPENMP
36+
# compile_script:
37+
# - brew install gcc@11
38+
# - export PATH=/opt/homebrew/bin:$PATH
39+
# - export LDFLAGS="-L/opt/homebrew/lib"
40+
# - export CPPFLAGS="-I/opt/homebrew/include"
41+
# - make CC=gcc-11 FC=gfortran-11 USE_OPENMP=1
4242

4343
macos_instance:
4444
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
@@ -58,8 +58,8 @@ task:
5858
- export VALID_ARCHS="i386 x86_64"
5959
- xcrun --sdk macosx --show-sdk-path
6060
- xcodebuild -version
61-
- export CC=/Applications/Xcode-14.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
62-
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-14.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -arch x86_64"
61+
- export CC=/Applications/Xcode-15.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
62+
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-15.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk -arch x86_64"
6363
- make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
6464
always:
6565
config_artifacts:
@@ -78,8 +78,8 @@ task:
7878
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
7979
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
8080
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
81-
- export CC=/Applications/Xcode-14.0.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
82-
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-14.0.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -arch arm64 -miphoneos-version-min=10.0"
81+
- export CC=/Applications/Xcode-15.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
82+
- export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-15.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.4.sdk -arch arm64 -miphoneos-version-min=10.0"
8383
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
8484
always:
8585
config_artifacts:
@@ -91,14 +91,16 @@ macos_instance:
9191
task:
9292
name: AppleM1/LLVM armv7-androidndk xbuild
9393
compile_script:
94-
- #brew install android-ndk
94+
- brew install android-ndk
9595
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
9696
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
9797
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
98-
- find /System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/25b -name "armv7a-linux-androideabi*-ranlib"
98+
- ls /System/Volumes/Data/opt/homebrew
99+
- ls -l /System/Volumes/Data/opt/homebrew/Caskroom/
100+
- find /System/Volumes/Data/opt/homebrew -name "armv7a-linux-androideabi*-ranlib"
99101
- #export CC=/Applications/Xcode-13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
100102
- #export CFLAGS="-O2 -unwindlib=none -Wno-macro-redefined -isysroot /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -arch arm64 -miphoneos-version-min=10.0"
101-
- export CC=/System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/25b/AndroidNDK8937393.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
103+
- export CC=/System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/26c/AndroidNDK*.app/Contents/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/armv7a-linux-androideabi23-clang
102104
- make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
103105
always:
104106
config_artifacts:

.github/workflows/apple_m.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: apple m
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
12+
jobs:
13+
build:
14+
if: "github.repository == 'OpenMathLib/OpenBLAS'"
15+
runs-on: macos-14
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
build: [cmake, make]
21+
fortran: [gfortran]
22+
openmp: [0, 1]
23+
ilp64: [0, 1]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
29+
- name: Print system information
30+
run: |
31+
if [ "$RUNNER_OS" == "Linux" ]; then
32+
cat /proc/cpuinfo
33+
elif [ "$RUNNER_OS" == "macOS" ]; then
34+
sysctl -a | grep machdep.cpu
35+
else
36+
echo "::error::$RUNNER_OS not supported"
37+
exit 1
38+
fi
39+
40+
- name: Install Dependencies
41+
run: |
42+
if [ "$RUNNER_OS" == "Linux" ]; then
43+
sudo apt-get install -y gfortran cmake ccache libtinfo5
44+
elif [ "$RUNNER_OS" == "macOS" ]; then
45+
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
46+
brew reinstall gcc
47+
brew install coreutils cmake ccache
48+
brew install llvm
49+
else
50+
echo "::error::$RUNNER_OS not supported"
51+
exit 1
52+
fi
53+
54+
- name: Compilation cache
55+
uses: actions/cache@v3
56+
with:
57+
path: ~/.ccache
58+
# We include the commit sha in the cache key, as new cache entries are
59+
# only created if there is no existing entry for the key yet.
60+
# GNU make and cmake call the compilers differently. It looks like
61+
# that causes the cache to mismatch. Keep the ccache for both build
62+
# tools separate to avoid polluting each other.
63+
key: ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
64+
# Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler.
65+
restore-keys: |
66+
ccache-${{ runner.os }}-${{ matrix.build }}-${{matrix.fortran }}-${{ github.ref }}
67+
ccache-${{ runner.os }}-${{ matrix.build }}-${{matrix.fortran }}
68+
ccache-${{ runner.os }}-${{ matrix.build }}
69+
70+
- name: Configure ccache
71+
run: |
72+
if [ "${{ matrix.build }}" = "make" ]; then
73+
# Add ccache to path
74+
if [ "$RUNNER_OS" = "Linux" ]; then
75+
echo "/usr/lib/ccache" >> $GITHUB_PATH
76+
elif [ "$RUNNER_OS" = "macOS" ]; then
77+
echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH
78+
echo "/opt/homebrew/opt/llvm/bin" >>$GITHUB_PATH
79+
echo "" >>$GITHUB_PATH
80+
else
81+
echo "::error::$RUNNER_OS not supported"
82+
exit 1
83+
fi
84+
fi
85+
# Limit the maximum size and switch on compression to avoid exceeding the total disk or cache quota (5 GB).
86+
test -d ~/.ccache || mkdir -p ~/.ccache
87+
echo "max_size = 300M" > ~/.ccache/ccache.conf
88+
echo "compression = true" >> ~/.ccache/ccache.conf
89+
ccache -s
90+
91+
- name: Build OpenBLAS
92+
run: |
93+
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
94+
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
95+
export CC="/opt/homebrew/opt/llvm/bin/clang"
96+
case "${{ matrix.build }}" in
97+
"make")
98+
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=${{matrix.openmp}} INTERFACE64=${{matrix.ilp64}} FC="ccache ${{ matrix.fortran }}"
99+
;;
100+
"cmake")
101+
export LDFLAGS="$LDFLAGS -Wl,-ld_classic"
102+
mkdir build && cd build
103+
cmake -DDYNAMIC_ARCH=1 \
104+
-DUSE_OPENMP=${{matrix.openmp}} \
105+
-DINTERFACE64=${{matrix.ilp64}} \
106+
-DNOFORTRAN=0 \
107+
-DBUILD_WITHOUT_LAPACK=0 \
108+
-DCMAKE_VERBOSE_MAKEFILE=ON \
109+
-DCMAKE_BUILD_TYPE=Release \
110+
-DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \
111+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
112+
-DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
113+
..
114+
cmake --build .
115+
;;
116+
*)
117+
echo "::error::Configuration not supported"
118+
exit 1
119+
;;
120+
esac
121+
122+
- name: Show ccache status
123+
continue-on-error: true
124+
run: ccache -s
125+
126+
- name: Run tests
127+
timeout-minutes: 60
128+
run: |
129+
case "${{ matrix.build }}" in
130+
"make")
131+
MAKE_FLAGS='DYNAMIC_ARCH=1 USE_OPENMP=0'
132+
echo "::group::Tests in 'test' directory"
133+
make -C test $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
134+
echo "::endgroup::"
135+
echo "::group::Tests in 'ctest' directory"
136+
make -C ctest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
137+
echo "::endgroup::"
138+
echo "::group::Tests in 'utest' directory"
139+
make -C utest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
140+
echo "::endgroup::"
141+
;;
142+
"cmake")
143+
cd build && ctest
144+
;;
145+
*)
146+
echo "::error::Configuration not supported"
147+
exit 1
148+
;;
149+
esac

.github/workflows/c910v.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
if: "github.repository == 'OpenMathLib/OpenBLAS'"
1515
runs-on: ubuntu-latest
1616
env:
17-
xuetie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1663142514282
18-
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz
17+
xuetie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1698113812618
18+
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0-20231018.tar.gz
1919
strategy:
2020
fail-fast: false
2121
matrix:
@@ -76,7 +76,7 @@ jobs:
7676
run: |
7777
wget ${xuetie_toolchain}/${toolchain_file_name}
7878
tar -xvf ${toolchain_file_name} -C /opt
79-
export PATH="/opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1/bin:$PATH"
79+
export PATH="/opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.0/bin:$PATH"
8080
8181
make CC='ccache ${{ matrix.triple }}-gcc -static' FC='ccache ${{ matrix.triple }}-gfortran -static' ${{ matrix.opts }} HOSTCC='ccache gcc' -j$(nproc)
8282

.github/workflows/dynamic_arch.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- name: Install Dependencies
4343
run: |
4444
if [ "$RUNNER_OS" == "Linux" ]; then
45+
sudo apt-get update
4546
sudo apt-get install -y gfortran cmake ccache libtinfo5
4647
elif [ "$RUNNER_OS" == "macOS" ]; then
4748
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.

0 commit comments

Comments
 (0)