mac PLS #84
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows | |
on: | |
push: | |
env: | |
# MSVC doesn't support C99, but C++14 has similar conformance | |
C_FLAGS: -Isrc -std:c++14 | |
# MSVC requires : syntax | |
CPP_FLAGS: -Isrc -std:c++14 | |
# NVCC requires = syntax (yes, really!) | |
CUDA_FLAGS: -Isrc -std=c++14 -arch=sm_61 -lcudart | |
MPI_FLAGS: '-Isrc -std=c++14 -DDISTRIBUTED_MODE' | |
OPENMP_FLAGS: '-openmp' | |
CUDA_OPENMP_LINK_FLAGS: '-Xcompile -openmp' | |
jobs: | |
cpp_cpu: | |
name: C++ (CPU) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} | |
- name: compile and link main | |
run: | | |
cl main.cpp core.obj alts.obj comm.obj multi.obj ${{ env.CPP_FLAGS }} | |
- name: run main | |
run: | | |
./main.exe | |
cpp_gpu: | |
name: C++ (GPU) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: Jimver/cuda-toolkit@v0.2.14 | |
with: | |
sub-packages: '["nvcc", "cudart", "visual_studio_integration"]' | |
method: 'network' | |
- name: compile backend | |
run: | | |
nvcc -c src/core.cu ${{ env.CUDA_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} | |
- name: compile main | |
run: | | |
cl -c main.cpp ${{ env.CPP_FLAGS }} | |
- name: link | |
run: | | |
nvcc -o main.exe main.obj core.obj alts.obj comm.obj multi.obj ${{ env.CUDA_FLAGS }} | |
cpp_mpi: | |
name: C++ (MPI) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: 'intelmpi' | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} | |
mpicxx -c src/comm.cpp ${{ env.MPI_FLAGS }} | |
- name: compile and link main | |
run: | | |
mpicxx main.cpp core.obj alts.obj comm.obj multi.obj ${{ env.CPP_FLAGS }} | |
- name: run main | |
run: | | |
mpiexec -np 2 ./main.exe | |
c_cpu: | |
name: C (CPU) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} | |
- name: compile and link main | |
run: | | |
cl main.c core.obj alts.obj comm.obj multi.obj ${{ env.C_FLAGS }} | |
- name: run main | |
run: | | |
./main.exe | |
c_gpu: | |
name: C (GPU) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: Jimver/cuda-toolkit@v0.2.14 | |
with: | |
sub-packages: '["nvcc", "cudart", "visual_studio_integration"]' | |
method: 'network' | |
- name: compile backend | |
run: | | |
nvcc -c src/core.cu ${{ env.CUDA_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} | |
- name: compile main | |
run: | | |
cl -c main.c ${{ env.CPP_FLAGS }} | |
- name: link | |
run: | | |
nvcc -o main.exe main.obj core.obj alts.obj comm.obj multi.obj ${{ env.CUDA_FLAGS }} | |
c_mpi: | |
name: C (MPI) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: 'intelmpi' | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} | |
mpicxx -c src/comm.cpp ${{ env.MPI_FLAGS }} | |
- name: compile and link main | |
run: | | |
mpicc main.c core.obj alts.obj comm.obj multi.obj ${{ env.C_FLAGS }} | |
- name: run main | |
run: | | |
mpiexec -np 2 ./main.exe | |
cpp_cpu_multi: | |
name: C++ (CPU) (OpenMP) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: compile and link main | |
run: | | |
cl main.cpp core.obj alts.obj comm.obj multi.obj ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: run main | |
run: | | |
set OMP_NUM_THREADS=2 | |
./main.exe | |
cpp_gpu_multi: | |
name: C++ (GPU) (OpenMP) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: Jimver/cuda-toolkit@v0.2.14 | |
with: | |
sub-packages: '["nvcc", "cudart", "visual_studio_integration"]' | |
method: 'network' | |
- name: compile backend | |
run: | | |
nvcc -c src/core.cu ${{ env.CUDA_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: compile main | |
run: | | |
cl -c main.cpp ${{ env.CPP_FLAGS }} | |
- name: link | |
run: | | |
nvcc -o main.exe main.obj core.obj alts.obj comm.obj multi.obj ${{ env.CUDA_FLAGS }} ${{ env.CUDA_OPENMP_LINK_FLAGS }} | |
cpp_mpi_multi: | |
name: C++ (MPI) (OpenMP) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: 'intelmpi' | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
mpicxx -c src/comm.cpp ${{ env.MPI_FLAGS }} | |
- name: compile and link main | |
run: | | |
mpicxx main.cpp core.obj alts.obj comm.obj multi.obj ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: run main | |
run: | | |
set OMP_NUM_THREADS=2 | |
mpiexec -np 2 ./main.exe | |
c_cpu_multi: | |
name: C (CPU) (OpenMP) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: compile and link main | |
run: | | |
cl main.c core.obj alts.obj comm.obj multi.obj ${{ env.C_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: run main | |
run: | | |
set OMP_NUM_THREADS=2 | |
./main.exe | |
c_gpu_multi: | |
name: C (GPU) (OpenMP) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: Jimver/cuda-toolkit@v0.2.14 | |
with: | |
sub-packages: '["nvcc", "cudart", "visual_studio_integration"]' | |
method: 'network' | |
- name: compile backend | |
run: | | |
nvcc -c src/core.cu ${{ env.CUDA_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/comm.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: compile main | |
run: | | |
cl -c main.c ${{ env.CPP_FLAGS }} | |
- name: link | |
run: | | |
nvcc -o main.exe main.obj core.obj alts.obj comm.obj multi.obj ${{ env.CUDA_FLAGS }} ${{ env.CUDA_OPENMP_LINK_FLAGS }} | |
c_mpi_multi: | |
name: C (MPI) (OpenMP) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: 'intelmpi' | |
- name: compile backend | |
run: | | |
cl -c src/core.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/alts.cpp ${{ env.CPP_FLAGS }} | |
cl -c src/multi.cpp ${{ env.CPP_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
mpicxx -c src/comm.cpp ${{ env.MPI_FLAGS }} | |
- name: compile and link main | |
run: | | |
mpicc main.c core.obj alts.obj comm.obj multi.obj ${{ env.C_FLAGS }} ${{ env.OPENMP_FLAGS }} | |
- name: run main | |
run: | | |
set OMP_NUM_THREADS=2 | |
mpiexec -np 2 ./main.exe |