Skip to content

Commit

Permalink
Merge pull request #59 from sfiligoi/macosarm-250113
Browse files Browse the repository at this point in the history
Switch to arm-based macos runners
  • Loading branch information
sfiligoi authored Jan 13, 2025
2 parents 29b259b + a05329f commit 950e9a4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, linux-gpu-cuda]
os: [ubuntu-latest, macos-13, macos-14, linux-gpu-cuda]
offload: [acc, ompgpu]
exclude:
- os: ubuntu-latest
offload: acc
- os: macos-14
offload: acc
- os: macos-13
offload: acc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
auto-update-conda: true
Expand All @@ -30,7 +37,12 @@ jobs:
then
conda create -q --yes --strict-channel-priority -n unifrac -c conda-forge -c bioconda gxx_linux-64 gfortran_linux-64 hdf5 lz4 zlib hdf5-static libcblas liblapacke blas-devel make curl
else
if [[ "x`conda info |awk '/platform/{print $3}'`" == "xosx-64" ]];
then
conda create -q --yes --strict-channel-priority -n unifrac -c conda-forge -c bioconda clangxx_osx-64 hdf5 lz4 hdf5-static libcblas liblapacke blas-devel make curl
else
conda create -q --yes --strict-channel-priority -n unifrac -c conda-forge -c bioconda clangxx_osx-arm64 hdf5 lz4 hdf5-static libcblas liblapacke blas-devel make curl
fi
fi
conda clean --yes -t
df -h .
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,22 @@ make install


**Note**: if you are using [conda](https://docs.anaconda.com/miniconda/) we recommend installing HDF5 and related compiler using the
`conda-forge` channel, for example (on Linux):
`conda-forge` channel, for example:

On Linux:
```
conda create --strict-channel-priority -n unifrac-binaries -c conda-forge -c bioconda gxx_linux-64 gfortran_linux-64 hdf5 lz4 zlib hdf5-static libcblas liblapacke blas-devel make curl
conda activate unifrac-binaries
```

For GPU-enabled code, you will need the [NVIDIA HPC SDK](https://developer.nvidia.com/hpc-sdk) compiler.
On MacOs:
```
conda create -q --yes --strict-channel-priority -n unifrac -c conda-forge -c bioconda clangxx_osx-arm64 hdf5 lz4 hdf5-static libcblas liblapacke blas-devel make curl
conda activate unifrac-binaries
```

For NVIDIA-GPU-enabled code, you will need the [NVIDIA HPC SDK](https://developer.nvidia.com/hpc-sdk) compiler, and is only supported on Linux.
This helper script will download it, install it and setup the necessary environment:
```
scripts/install_hpc_sdk.sh
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ ifneq ($(BUILD_FULL_OPTIMIZATION),False)
else
ifeq ($(PERFORMING_CONDA_BUILD),True)
ifeq ($(PLATFORM),Darwin)
CPPFLAGS += -mpopcnt
# no special tuning for the MacOS at this point
CPPFLAGS +=
else
# enable avx2
CPPFLAGS += -march=haswell -mtune=znver2
Expand Down

0 comments on commit 950e9a4

Please sign in to comment.