From cbe633769a727033bfc2da95fe8bb4865b742bd1 Mon Sep 17 00:00:00 2001 From: JX278 Date: Wed, 16 Nov 2022 13:05:50 +0800 Subject: [PATCH 1/7] Update Actions --- .github/workflows/CPU_inferencce_validation.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CPU_inferencce_validation.yml b/.github/workflows/CPU_inferencce_validation.yml index c1efbc71..d341d9ea 100644 --- a/.github/workflows/CPU_inferencce_validation.yml +++ b/.github/workflows/CPU_inferencce_validation.yml @@ -7,7 +7,7 @@ on: branches: - master jobs: - gpu_build: + build: runs-on: self-hosted if: github.repository_owner == 'deepmodeling' container: @@ -27,7 +27,10 @@ jobs: export DEBIAN_FRONTEND=noninteractive apt-get -y install openfoam7 git clone https://github.com/deepmodeling/deepflame-dev.git - cd deepflame-dev + cd deepflame-dev + git clone https://github.com/JX278/deepcombustion.git + cd mechanisms && rm -rf HE04_Hydrogen_ESH2_GMS_sub_20221101 && ln -s ../deepcombustion/DeePCK/HE04_Hydrogen_ESH2_GMS_sub_20221101/ . + cd ../ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh sh Miniconda3-latest-Linux-x86_64.sh -b . ~/miniconda3/etc/profile.d/conda.sh From 3b1fff8262eb288d57888fa458e975b3aa407e64 Mon Sep 17 00:00:00 2001 From: JX278 <113102069+JX278@users.noreply.github.com> Date: Wed, 16 Nov 2022 13:42:07 +0800 Subject: [PATCH 2/7] Update CPU_inferencce_validation.yml --- .github/workflows/CPU_inferencce_validation.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CPU_inferencce_validation.yml b/.github/workflows/CPU_inferencce_validation.yml index d341d9ea..ac2c1380 100644 --- a/.github/workflows/CPU_inferencce_validation.yml +++ b/.github/workflows/CPU_inferencce_validation.yml @@ -28,9 +28,8 @@ jobs: apt-get -y install openfoam7 git clone https://github.com/deepmodeling/deepflame-dev.git cd deepflame-dev - git clone https://github.com/JX278/deepcombustion.git - cd mechanisms && rm -rf HE04_Hydrogen_ESH2_GMS_sub_20221101 && ln -s ../deepcombustion/DeePCK/HE04_Hydrogen_ESH2_GMS_sub_20221101/ . - cd ../ + git clone https://github.com/deepcombustion/deepcombustion.git + cp -r deepcombustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh sh Miniconda3-latest-Linux-x86_64.sh -b . ~/miniconda3/etc/profile.d/conda.sh From 4e6ef4b5d053e5f15d806ba0e4a50e20d7e3f84c Mon Sep 17 00:00:00 2001 From: JX278 <113102069+JX278@users.noreply.github.com> Date: Wed, 16 Nov 2022 14:02:06 +0800 Subject: [PATCH 3/7] Update CPU_inferencce_validation.yml --- .github/workflows/CPU_inferencce_validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CPU_inferencce_validation.yml b/.github/workflows/CPU_inferencce_validation.yml index ac2c1380..456e8fe6 100644 --- a/.github/workflows/CPU_inferencce_validation.yml +++ b/.github/workflows/CPU_inferencce_validation.yml @@ -7,7 +7,7 @@ on: branches: - master jobs: - build: + build_validation: runs-on: self-hosted if: github.repository_owner == 'deepmodeling' container: From 7c4206df34f100eedd092da69fcb4eebeeed74c9 Mon Sep 17 00:00:00 2001 From: JX278 Date: Wed, 16 Nov 2022 16:23:49 +0800 Subject: [PATCH 4/7] Update validation --- .github/workflows/CPU_inferencce_validation.yml | 6 ++---- test/df0DFoam | 1 + test/pytorchIntegrator | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) create mode 120000 test/df0DFoam delete mode 120000 test/pytorchIntegrator diff --git a/.github/workflows/CPU_inferencce_validation.yml b/.github/workflows/CPU_inferencce_validation.yml index 456e8fe6..598f1a14 100644 --- a/.github/workflows/CPU_inferencce_validation.yml +++ b/.github/workflows/CPU_inferencce_validation.yml @@ -27,9 +27,7 @@ jobs: export DEBIAN_FRONTEND=noninteractive apt-get -y install openfoam7 git clone https://github.com/deepmodeling/deepflame-dev.git - cd deepflame-dev - git clone https://github.com/deepcombustion/deepcombustion.git - cp -r deepcombustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ + cd deepflame-dev wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh sh Miniconda3-latest-Linux-x86_64.sh -b . ~/miniconda3/etc/profile.d/conda.sh @@ -48,6 +46,6 @@ jobs: OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 OMPI_MCA_btl_vader_single_copy_mechanism: none run: - /bin/bash -c "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 && cmake -B build && cmake --build build && cd build && ctest" + /bin/bash -c "source ~/miniconda3/etc/profile.d/conda.sh && conda activate libcantera && source /opt/openfoam7/etc/bashrc && . configure.sh --use_pytorch && source ./bashrc && . install.sh && git clone https://github.com/deepcombustion/deepcombustion.git && cp -r deepcombustion/DeePCK/Model/HE04_Hydrogen_ESH2_GMS_sub_20221101/ mechanisms/ && ls mechanisms/&& cd test && ./Allrun && cmake -B build && cmake --build build && cd build && ctest" diff --git a/test/df0DFoam b/test/df0DFoam new file mode 120000 index 00000000..ad80519b --- /dev/null +++ b/test/df0DFoam @@ -0,0 +1 @@ +/home/jx278/deepflame-dev/examples/df0DFoam/zeroD_cubicReactor/H2/pytorchIntegrator/ \ No newline at end of file diff --git a/test/pytorchIntegrator b/test/pytorchIntegrator deleted file mode 120000 index 16c36362..00000000 --- a/test/pytorchIntegrator +++ /dev/null @@ -1 +0,0 @@ -../examples/df0DFoam/zeroD_cubicReactor/H2/pytorchIntegrator/ \ No newline at end of file From ac1274bc2e25e5b60110dd85a26e7b9d729e622a Mon Sep 17 00:00:00 2001 From: JX278 <113102069+JX278@users.noreply.github.com> Date: Wed, 16 Nov 2022 17:34:44 +0800 Subject: [PATCH 5/7] Update CMakeLists.txt --- test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4b54db31..384c6655 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -12,7 +12,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) -file(COPY ./pytorchIntegrator/postProcessing/probes/0/T DESTINATION 0DH2) +file(COPY ./df0DFoam/postProcessing/probes/0/T DESTINATION 0DH2) file(COPY ./oneD_detonationH2/postProcessing/minMax/0/fieldMinMax.dat DESTINATION 1Ddetonation) file(COPY ./dfLowMachFoam/twoD_reactingTGV/H2/cvodeSolver/postProcessing/sample/0.0005/data_T.xy DESTINATION 2DTGV/5) @@ -35,4 +35,4 @@ target_link_libraries( include(GoogleTest) -gtest_discover_tests(corrtest) \ No newline at end of file +gtest_discover_tests(corrtest) From d62d1a22588707c2c16a815d4101f58550f91ec2 Mon Sep 17 00:00:00 2001 From: JX278 Date: Wed, 16 Nov 2022 18:10:54 +0800 Subject: [PATCH 6/7] use 8 cores for detonation --- examples/dfHighSpeedFoam/oneD_detonationH2/Allrun | 2 +- .../dfHighSpeedFoam/oneD_detonationH2/system/decomposeParDict | 2 +- test/df0DFoam | 1 - test/pytorchIntegrator | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) delete mode 120000 test/df0DFoam create mode 120000 test/pytorchIntegrator diff --git a/examples/dfHighSpeedFoam/oneD_detonationH2/Allrun b/examples/dfHighSpeedFoam/oneD_detonationH2/Allrun index 400e3ddc..c39982ff 100755 --- a/examples/dfHighSpeedFoam/oneD_detonationH2/Allrun +++ b/examples/dfHighSpeedFoam/oneD_detonationH2/Allrun @@ -10,4 +10,4 @@ cp -r 0_orig/ 0/ runApplication blockMesh runApplication setFields runApplication decomposePar -runApplication mpirun -np 4 $application -parallel +runApplication mpirun --oversubscribe -np 8 $application -parallel diff --git a/examples/dfHighSpeedFoam/oneD_detonationH2/system/decomposeParDict b/examples/dfHighSpeedFoam/oneD_detonationH2/system/decomposeParDict index e6fbae05..e183b65d 100755 --- a/examples/dfHighSpeedFoam/oneD_detonationH2/system/decomposeParDict +++ b/examples/dfHighSpeedFoam/oneD_detonationH2/system/decomposeParDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 4; +numberOfSubdomains 8; method scotch; diff --git a/test/df0DFoam b/test/df0DFoam deleted file mode 120000 index ad80519b..00000000 --- a/test/df0DFoam +++ /dev/null @@ -1 +0,0 @@ -/home/jx278/deepflame-dev/examples/df0DFoam/zeroD_cubicReactor/H2/pytorchIntegrator/ \ No newline at end of file diff --git a/test/pytorchIntegrator b/test/pytorchIntegrator new file mode 120000 index 00000000..16c36362 --- /dev/null +++ b/test/pytorchIntegrator @@ -0,0 +1 @@ +../examples/df0DFoam/zeroD_cubicReactor/H2/pytorchIntegrator/ \ No newline at end of file From 676b23d801f01107f3003acf9202ee95c6e55b1f Mon Sep 17 00:00:00 2001 From: JX278 Date: Wed, 16 Nov 2022 21:38:26 +0800 Subject: [PATCH 7/7] modify cmake --- test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 384c6655..250d4829 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -12,7 +12,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) -file(COPY ./df0DFoam/postProcessing/probes/0/T DESTINATION 0DH2) +file(COPY ./pytorchIntegrator/postProcessing/probes/0/T DESTINATION 0DH2) file(COPY ./oneD_detonationH2/postProcessing/minMax/0/fieldMinMax.dat DESTINATION 1Ddetonation) file(COPY ./dfLowMachFoam/twoD_reactingTGV/H2/cvodeSolver/postProcessing/sample/0.0005/data_T.xy DESTINATION 2DTGV/5)