Skip to content

Commit

Permalink
Fix build_libs using --oblas_no_avx flag introduced in 9220201
Browse files Browse the repository at this point in the history
- Add Rosetta (no AVX) build to CD action
  • Loading branch information
hansec committed Jul 9, 2024
1 parent 9220201 commit 98c0492
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/cd_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ jobs:
- {
name: "Linux-x86_64",
os: ubuntu-20.04,
cc: "gcc-10", cxx: "g++-10", fc: "gfortran-10", python: "python"
cc: "gcc-10", cxx: "g++-10", fc: "gfortran-10", python: "python", build_libs_flags: ""
}
- {
name: "macOS-x86_64",
os: macos-12,
cc: "gcc-12", cxx: "g++-12", fc: "gfortran-12", python: "python3", xcode_path: "/Applications/Xcode_14.2.app/Contents/Developer"
cc: "gcc-12", cxx: "g++-12", fc: "gfortran-12", python: "python3", xcode_path: "/Applications/Xcode_14.2.app/Contents/Developer", build_libs_flags: ""
}
- {
name: "macOS-x86_64-Rosetta",
os: macos-12,
cc: "gcc-12", cxx: "g++-12", fc: "gfortran-12", python: "python3", xcode_path: "/Applications/Xcode_14.2.app/Contents/Developer", build_libs_flags: "--oblas_no_avx"
}
- {
name: "macOS-arm64",
os: macos-14,
cc: "gcc-13", cxx: "g++-13", fc: "gfortran-13", python: "python3", xcode_path: "/Applications/Xcode_15.4.app/Contents/Developer"
cc: "gcc-13", cxx: "g++-13", fc: "gfortran-13", python: "python3", xcode_path: "/Applications/Xcode_15.4.app/Contents/Developer", build_libs_flags: ""
}

steps:
Expand Down Expand Up @@ -74,15 +79,15 @@ jobs:
working-directory: libs
run: >
${{ matrix.config.python }} ../src/utilities/build_libs.py --no_dl_progress --nthread=2
--build_umfpack=1 --build_arpack=1 --oblas_dynamic_arch --oft_package
--build_umfpack=1 --build_arpack=1 --oblas_dynamic_arch --oft_package ${{ matrix.config.build_libs_flags }}
- name: Build external (macOS)
if: startsWith(matrix.config.os, 'macos')
shell: bash
working-directory: libs
run: >
${{ matrix.config.python }} ../src/utilities/build_libs.py --no_dl_progress --nthread=2
--build_umfpack=1 --build_arpack=1 --oft_package
--build_umfpack=1 --build_arpack=1 --oft_package ${{ matrix.config.build_libs_flags }}
- name: Upload library failure log
uses: actions/upload-artifact@v4
Expand Down
8 changes: 4 additions & 4 deletions src/utilities/build_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,9 +1097,9 @@ def build(self):
tmp_dict = self.config_dict.copy()
oblas_options = ['NO_CBLAS=1', 'NO_LAPACKE=1', 'NO_SHARED=1']
if self.config_dict['MAKE_THREADS'] == 1:
oblas_options += ['NO_PARALLEL_MAKE=1']
make_thread = ['NO_PARALLEL_MAKE=1']
else:
oblas_options += ['MAKE_NB_JOBS={MAKE_THREADS}']
make_thread = ['MAKE_NB_JOBS={MAKE_THREADS}']
if self.threaded:
oblas_options += ['USE_THREAD=1', 'USE_OPENMP=1', 'FCOMMON_OPT="-frecursive {OMP_FLAGS} -fPIC"']
else:
Expand All @@ -1120,8 +1120,8 @@ def build(self):
'export CC={CC}',
'export FC={FC}',
'make clean',
'make {0}'.format(' '.join(oblas_options)),
'make NO_PARALLEL_MAKE=1 NO_SHARED=1 PREFIX={OpenBLAS_ROOT} install'
'make {0}'.format(' '.join(oblas_options + make_thread)),
'make {0} install'.format(' '.join(oblas_options + ['NO_PARALLEL_MAKE=1', 'PREFIX={OpenBLAS_ROOT}']))
]
self.run_build(build_lines, tmp_dict)

Expand Down

0 comments on commit 98c0492

Please sign in to comment.