Skip to content

Commit

Permalink
added Windows MPI
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonRayJones committed Feb 2, 2024
1 parent cf9494a commit e262d37
Showing 1 changed file with 48 additions and 6 deletions.
54 changes: 48 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,29 @@ jobs:
run: |
nvcc -o main.exe main.obj core.obj alts.obj comm.obj ${{ env.CUDA_FLAGS }}
cpp_mpi:
name: C++ (MPI)
runs-on: windows-2019

steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- uses: mpi4py/setup-mpi@v1

- name: compile backend
run: |
cl -c src/core.cpp ${{ env.CPP_FLAGS }}
cl -c src/alts.cpp ${{ env.CPP_FLAGS }}
mpic++ -c src/comm.cpp ${{ env.MPI_FLAGS }}
- name: compile and link main
run: |
mpic++ main.cpp core.obj alts.obj comm.obj ${{ env.CPP_FLAGS }}
- name: run main
run: |
mpiexec -np 2 ./main.exe
c_cpu:
name: C (CPU)
Expand All @@ -82,11 +105,7 @@ jobs:
- name: compile and link main
run: |
cl main.c core.obj alts.obj comm.o ${{ env.C_FLAGS }}
- name: arg test
run : |
echo '${{ env.CPP_FLAGS }}'
cl main.c core.obj alts.obj comm.obj ${{ env.C_FLAGS }}
- name: run main
run: |
Expand Down Expand Up @@ -116,4 +135,27 @@ jobs:
- name: link
run: |
nvcc -o main.exe main.obj core.obj alts.obj comm.o ${{ env.CUDA_FLAGS }}
nvcc -o main.exe main.obj core.obj alts.obj comm.obj ${{ env.CUDA_FLAGS }}
c_mpi:
name: C (MPI)
runs-on: windows-2019

steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- uses: mpi4py/setup-mpi@v1

- name: compile backend
run: |
cl -c src/core.cpp ${{ env.CPP_FLAGS }}
cl -c src/alts.cpp ${{ env.CPP_FLAGS }}
mpic++ -c src/comm.cpp ${{ env.MPI_FLAGS }}
- name: compile and link main
run: |
mpicc main.c core.obj alts.obj comm.obj ${{ env.C_FLAGS }}
- name: run main
run: |
mpirun -np 2 ./main.exe

0 comments on commit e262d37

Please sign in to comment.