Skip to content

Pass accelerator GRES to Kunshan jobs #21

Pass accelerator GRES to Kunshan jobs

Pass accelerator GRES to Kunshan jobs #21

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: OneFLOW_Linux_CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master, hexin ]
pull_request:
branches: [ master, hexin ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
env:
GCC_VERSION: 12 # 这里修改 10 /11 /12 /13 切换编译器版本
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: "Linux OneFLOW Actions"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install GCC ${{ env.GCC_VERSION }}
run: |
sudo apt-get update
sudo apt install gcc-${{ env.GCC_VERSION }} g++-${{ env.GCC_VERSION }} -y
gcc-${{ env.GCC_VERSION }} --version
g++-${{ env.GCC_VERSION }} --version
ls /usr/bin/gcc*
shell: bash
- name: Install Third party library
run: |
echo cd ${{ github.workspace }}
cd ${{ github.workspace }}
echo ls
ls
sudo apt-get update
sudo apt-get install libhdf5-dev libcgns-dev libmetis-dev libmpich-dev -y
shell: bash
- name: CMake Build and Install
env:
CC: gcc-${{ env.GCC_VERSION }}
CXX: g++-${{ env.GCC_VERSION }}
run: |
cd ${{ github.workspace }}
ls
mkdir build
cd build
echo MPI_HOME_INC
echo MPI_HOME_LIB
export MPI_HOME_INC="/usr/include/x86_64-linux-gnu/mpich"
export MPI_HOME_LIB="/usr/lib/x86_64-linux-gnu/libmpich.so"
export CGNS_HOME_INC="/usr/include"
export CGNS_HOME_LIB="/usr/lib/x86_64-linux-gnu/libcgns.so"
export METIS_HOME_INC="/usr/include"
export METIS_HOME_LIB="/usr/lib/x86_64-linux-gnu/libmetis.so"
cmake --version
cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/Run ../
make -j 4
make install
shell: bash
- name: Run OneFLOW CFD Tests
env:
prefix: ${{ github.workspace }}/Run
MPICH_NO_UCX: 1
MPICH_CH3_NO_UCX: 1
MPICH_DEVICE: ch3:sock
UCX_TLS: tcp,self
run: |
#echo "env.prefix= ${{env.prefix}}"
#echo "ls ${{env.prefix}}"
#ls "${{env.prefix}}"
export PATH=${{env.prefix}}/bin/:${{env.prefix}}/lib:$PATH
#echo $PATH
export LD_LIBRARY_PATH=${{env.prefix}}/lib:$LD_LIBRARY_PATH
#sudo ldconfig
#ls ${{env.prefix}}/bin
#ldd ${{env.prefix}}/bin/OneFLOW
OneFLOW
cd "${{ github.workspace }}/test"
ls
python --version
#python test.py " " " " linux
python test.py "mpirun -np 1" "OneFLOW" "suites/cpu-serial.txt" "baselines/residual-baseline.json" "1e-8"
shell: bash