Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master macos #5

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 0 * * *"
branches: [ master, main ]
# schedule:
# - cron: "0 0 * * *"

workflow_dispatch:

Expand Down Expand Up @@ -41,3 +41,30 @@ jobs:

- name: Test pypolychord (MPI)
run: mpirun -np 2 python run_pypolychord.py

pip_macos:
runs-on: macos-11
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies (macOS)
run: |
python -m pip install --upgrade pip
brew install cmake openmpi gcc

- name: Install pypolychord
run: pip install -v .

- name: Test pypolychord
run: python run_pypolychord.py

- name: Test pypolychord (MPI)
run: mpirun -np 2 python run_pypolychord.py
4 changes: 2 additions & 2 deletions src/polychord/clustering.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module KNN_clustering
!! Points belong to the same cluster if they are in either of each others k
!! nearest neighbor sets.
!!
!! The algorithm computes the k nearest neihbor sets from the similarity
!! The algorithm computes the k nearest neighbor sets from the similarity
!! matrix, and then tests
recursive function NN_clustering(similarity_matrix,num_clusters) result(cluster_list)
use utils_module, only: relabel
Expand Down Expand Up @@ -113,7 +113,7 @@ function do_clustering_k(knn) result(c)

! If they're not in the same cluster already...
if(c(i)/=c(j)) then
! ... check to see if they are within each others k nearest neihbors...
! ... check to see if they are within each others k nearest neighbors...
if( neighbors( knn(:,i),knn(:,j) ) ) then

! If they are then relabel cluster_i and cluster_j to the smaller of the two
Expand Down