Skip to content

Commit d49ebc5

Browse files
committed
Merge branch 'shivam-develop' into shivam-Locks
2 parents bc19101 + 577d480 commit d49ebc5

1,821 files changed

Lines changed: 269807 additions & 52798 deletions

File tree

Some content is hidden

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

.cirrus.yml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
macos_instance:
2+
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
3+
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
12+
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
21+
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
33+
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
42+
43+
macos_instance:
44+
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
45+
task:
46+
name: AppleM1/LLVM x86_64 xbuild
47+
compile_script:
48+
- #brew install llvm
49+
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
50+
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
51+
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
52+
- export ARCHS="i386 x86_64"
53+
- export ARCHS_STANDARD="i386 x86_64"
54+
- export ARCHS_STANDARD_32_64_BIT="i386 x86_64"
55+
- export ARCHS_STANDARD_64_BIT=x86_64
56+
- export ARCHS_STANDARD_INCLUDING_64_BIT="i386 x86_64"
57+
- export ARCHS_UNIVERSAL_IPHONE_OS="i386 x86_64"
58+
- export VALID_ARCHS="i386 x86_64"
59+
- xcrun --sdk macosx --show-sdk-path
60+
- 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"
63+
- make TARGET=CORE2 DYNAMIC_ARCH=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
64+
always:
65+
config_artifacts:
66+
path: "*conf*"
67+
type: text/plain
68+
# lib_artifacts:
69+
# path: "libopenblas*"
70+
# type: application/octet-streamm
71+
72+
macos_instance:
73+
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
74+
task:
75+
name: AppleM1/LLVM armv8-ios xbuild
76+
compile_script:
77+
- #brew install llvm
78+
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
79+
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
80+
- 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"
83+
- make TARGET=ARMV8 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 CROSS=1
84+
always:
85+
config_artifacts:
86+
path: "*conf*"
87+
type: text/plain
88+
89+
macos_instance:
90+
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
91+
task:
92+
name: AppleM1/LLVM armv7-androidndk xbuild
93+
compile_script:
94+
- #brew install android-ndk
95+
- export #PATH=/opt/homebrew/opt/llvm/bin:$PATH
96+
- export #LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
97+
- export #CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
98+
- find /System/Volumes/Data/opt/homebrew/Caskroom/android-ndk/25b -name "armv7a-linux-androideabi*-ranlib"
99+
- #export CC=/Applications/Xcode-13.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
100+
- #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
102+
- make TARGET=ARMV7 ARM_SOFTFP_ABI=1 NUM_THREADS=32 HOSTCC=clang NOFORTRAN=1 RANLIB="ls -l"
103+
always:
104+
config_artifacts:
105+
path: "*conf*"
106+
type: text/plain
107+
108+
task:
109+
name: NeoverseN1
110+
arm_container:
111+
image: node:latest
112+
compile_script:
113+
- make
114+
115+
task:
116+
name: NeoverseN1-ILP64
117+
arm_container:
118+
image: node:latest
119+
compile_script:
120+
- make INTERFACE64=1
121+
122+
task:
123+
name: NeoverseN1-OMP
124+
arm_container:
125+
image: node:latest
126+
cpu: 8
127+
compile_script:
128+
- make USE_OPENMP=1
129+
130+
FreeBSD_task:
131+
name: FreeBSD-gcc12
132+
freebsd_instance:
133+
image_family: freebsd-13-2
134+
install_script:
135+
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
136+
compile_script:
137+
- ls -l /usr/local/lib
138+
- gmake CC=gcc
139+
140+
141+
FreeBSD_task:
142+
name: freebsd-gcc12-ilp64
143+
freebsd_instance:
144+
image_family: freebsd-13-2
145+
install_script:
146+
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
147+
compile_script:
148+
- ls -l /usr/local/lib
149+
- gmake CC=gcc INTERFACE64=1
150+
151+
FreeBSD_task:
152+
name: FreeBSD-clang-openmp
153+
freebsd_instance:
154+
image_family: freebsd-13-2
155+
install_script:
156+
- pkg update -f && pkg upgrade -y && pkg install -y gmake gcc
157+
- ln -s /usr/local/lib/gcc12/libgfortran.so.5.0.0 /usr/lib/libgfortran.so
158+
compile_script:
159+
- gmake CC=clang FC=gfortran USE_OPENMP=1 CPP_THREAD_SAFETY_TEST=1
160+
161+
#task:
162+
# name: Windows/LLVM16 --- too slow ---
163+
# windows_container:
164+
# image: cirrusci/windowsservercore:cmake-2021.12.07
165+
# install_script:
166+
# - choco list --localonly
167+
# - choco install -y llvm
168+
# - # choco install -y cmake --installargs '"ADD_CMAKE_TO_PATH=System"'
169+
# - choco install -y ninja
170+
# - refreshenv
171+
# - cd "c:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Auxiliary/Build"
172+
# - vcvarsall x64
173+
# - cd "C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build"
174+
# - cmake -S . -B build -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_MT=mt -DCMAKE_BUILD_TYPE=Release
175+
# - cd build
176+
# - cmake --build .
177+
# - ctest

.cirun.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Self-Hosted Github Action Runners on AWS via Cirun.io
2+
# Reference: https://docs.cirun.io/reference/yaml
3+
runners:
4+
- name: "aws-runner-graviton"
5+
# Cloud Provider: AWS
6+
cloud: "aws"
7+
region: "us-east-1"
8+
# Cheapest VM on AWS
9+
instance_type: "c7g.large"
10+
# Ubuntu-22.04, ami image
11+
machine_image: "ami-0a0c8eebcdd6dcbd0"
12+
preemptible: false
13+
# Add this label in the "runs-on" param in .github/workflows/<workflow-name>.yml
14+
# So that this runner is created for running the workflow
15+
labels:
16+
- "cirun-aws-runner-graviton"

.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

0 commit comments

Comments
 (0)