Skip to content

CI: Change actions to self-hosted runner. #557

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

Open
wants to merge 6 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
47 changes: 12 additions & 35 deletions .github/workflows/CPU_inferencce_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,30 @@ on:
- master
jobs:
build_validation:
runs-on: [self-hosted, linux, x64]
runs-on: [self-hosted, linux, x64, 4060Ti]
if: github.repository_owner == 'deepmodeling'
container:
image: ubuntu:20.04
options: --shm-size=5g # shared memory size = 5GB
steps:
- name: Checkout
uses: actions/checkout@v3
- name: install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update
apt-get install -y sudo wget unzip git software-properties-common make cmake g++ mpich openmpi-bin libopenmpi-dev libscalapack-mpi-dev vim git-core
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y install openfoam7
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
. ~/miniconda3/etc/profile.d/conda.sh
conda create -n libcantera python=3.8
conda activate libcantera
conda install -c cantera libcantera-devel=2.6
conda install -c cantera cantera
conda install pytorch pybind11
conda install pkg-config
conda install --channel https://conda.anaconda.org/zhaofeng-shu33 easydict
git clone https://github.com/deepmodeling/deepflame-dev.git
cd deepflame-dev


- name: build and validation with CPU inference
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
run:
/bin/bash -c " echo $PWD && ls $PWD
&& wget --content-disposition https://aisquare.oss-us-east-1.aliyuncs.com/data/datasets/14b50df5-dbe9-4f1c-bf58-032b8bc40a20
&& unzip flare_CH4_SandiaD_4D.zip
/bin/bash -c " echo $PWD
&& ls $PWD
&& cp -r flare_CH4_SandiaD_4D.tbl examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM
&& source ~/miniconda3/etc/profile.d/conda.sh && conda activate libcantera && source /opt/openfoam7/etc/bashrc
&& . configure.sh --use_pytorch&& source ./bashrc && . install.sh
&& cd test && ./Allrun && conda deactivate "
&& cp -r /root/actions-runner/data/flare_CH4_SandiaD_4D.tbl examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM
&& source ~/miniconda3/etc/profile.d/conda.sh
&& conda activate libcantera
&& source /opt/openfoam7/etc/bashrc
&& . configure.sh --use_pytorch
&& source ./bashrc
&& . install.sh
&& cd test
&& ./Allrun
&& conda deactivate "

- name: test
run: |
Expand Down
2 changes: 1 addition & 1 deletion examples/dfHighSpeedFoam/oneD_detonationH2/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ cp -r 0_orig/ 0/
runApplication blockMesh
runApplication setFields
runApplication decomposePar
runApplication mpirun --oversubscribe -np 8 --allow-run-as-root $application -parallel
runApplication mpirun --oversubscribe -np 12 --allow-run-as-root $application -parallel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 8;
numberOfSubdomains 12;

method scotch;

Expand Down
2 changes: 1 addition & 1 deletion examples/dfLowMachFoam/fgm/twoD_SandiaD_flareFGM/Allrun
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory

if [ -e flare_CH4_SandiaD_4D.tbl]
if [ -e flare_CH4_SandiaD_4D.tbl ]
then
echo "flare_CH4_SandiaD_4D.tbl exists. Make sure correct table has been used!"
else
Expand Down
2 changes: 1 addition & 1 deletion test/Tu500K-Phi1/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ application=dfLowMachFoam

runApplication blockMesh
runApplication decomposePar
runApplication mpirun -np 4 --allow-run-as-root $application -parallel
runApplication mpirun -np 12 --allow-run-as-root $application -parallel
reconstructPar
flameSpeed > log.fs
sed -n 's/.*flameSpeed = \([0-9]*\(\.[0-9]*\)\?\).*/\1/p' log.fs > fs
Expand Down
2 changes: 1 addition & 1 deletion test/Tu500K-Phi1/system/decomposeParDict
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 4;
numberOfSubdomains 12;

method scotch;

Expand Down
2 changes: 1 addition & 1 deletion test/dfLowMachFoam/twoD_reactingTGV/H2/cvodeSolver/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ application=dfLowMachFoam

runApplication blockMesh
runApplication decomposePar
runApplication mpirun -np 4 $application -parallel
runApplication mpirun -np 12 $application -parallel

runApplication reconstructPar
runApplication postProcess -func sample
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 4;
numberOfSubdomains 12;

method scotch;

Expand Down
Loading