From 1f46fb54a93f5b2bb8218bdcc97571f53cc7a9f5 Mon Sep 17 00:00:00 2001 From: Sergi Siso Date: Thu, 21 Sep 2023 09:59:27 +0100 Subject: [PATCH] #2132 Revert workflow changes that cause issues --- .github/workflows/compilation.yml | 11 ++-- .github/workflows/lfric_test.yml | 86 +++++++++++++++---------------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index bd69018937..3ba1b7642d 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -55,7 +55,6 @@ env: GFORTRAN_VERSION: 13.2.0 NVFORTRAN_VERSION: 23.7 CUDA_VERSION: 12.2 - MAKEFLAGS: "-j 6" jobs: run_if_on_mirror: @@ -91,7 +90,7 @@ jobs: module load python/${PYTHON_VERSION} . .runner_venv/bin/activate module load gcc/${GFORTRAN_VERSION} openmpi netcdf_fortran - pytest -n 6 --f90=gfortran --f90flags="-ffree-line-length-none" --compile --compileopencl src/psyclone/tests + pytest -n 4 --f90=gfortran --f90flags="-ffree-line-length-none" --compile --compileopencl src/psyclone/tests module rm netcdf_fortran gcc - name: Unit tests with compilation - nvfortran run: | @@ -99,7 +98,7 @@ jobs: . .runner_venv/bin/activate module load nvidia-hpcsdk/${NVFORTRAN_VERSION} netcdf_fortran # We have to tell nvfortran where to find the OpenCL library. - pytest -n 6 --f90=nvfortran --f90flags="-L/apps/packages/compilers/nvidia-hpcsdk/Linux_x86_64/${NVFORTRAN_VERSION}/cuda/${CUDA_VERSION}/targets/x86_64-linux/lib" --compile --compileopencl src/psyclone/tests + pytest -n 4 --f90=nvfortran --f90flags="-L/apps/packages/compilers/nvidia-hpcsdk/Linux_x86_64/${NVFORTRAN_VERSION}/cuda/${CUDA_VERSION}/targets/x86_64-linux/lib" --compile --compileopencl src/psyclone/tests module rm netcdf_fortran nvidia-hpcsdk - name: Examples with compilation - gfortran run: | @@ -109,7 +108,7 @@ jobs: # Although we're using gfortran, we link with the OpenCL lib that comes # with CUDA. make -C examples allclean - F90=gfortran F90FLAGS="-ffree-line-length-none -L/apps/packages/compilers/nvidia-hpcsdk/Linux_x86_64/${NVFORTRAN_VERSION}/cuda/${CUDA_VERSION}/targets/x86_64-linux/lib" make -C examples compile + F90=gfortran F90FLAGS="-ffree-line-length-none -L/apps/packages/compilers/nvidia-hpcsdk/Linux_x86_64/${NVFORTRAN_VERSION}/cuda/${CUDA_VERSION}/targets/x86_64-linux/lib" make -j 4 -C examples compile - name: Tutorials with compilation - gfortran run: | module load python/${PYTHON_VERSION} @@ -124,7 +123,7 @@ jobs: make -C examples allclean module load nvidia-hpcsdk/${NVFORTRAN_VERSION} netcdf_fortran # We have to tell nvfortran where to find the OpenCL library. - F90=nvfortran F90FLAGS="-acc -Minfo=all -L/apps/packages/compilers/nvidia-hpcsdk/Linux_x86_64/${NVFORTRAN_VERSION}/cuda/${CUDA_VERSION}/targets/x86_64-linux/lib" make -C examples compile + F90=nvfortran F90FLAGS="-acc -Minfo=all -L/apps/packages/compilers/nvidia-hpcsdk/Linux_x86_64/${NVFORTRAN_VERSION}/cuda/${CUDA_VERSION}/targets/x86_64-linux/lib" make -j 4 -C examples compile - name: Tutorials with compilation - nvfortran run: | module load python/${PYTHON_VERSION} @@ -133,4 +132,4 @@ jobs: module load nvidia-hpcsdk/${NVFORTRAN_VERSION} netcdf_fortran # TODO #2251. Cannot build the LFRic practicals with 23.5/7 of nvfortran # because the compilation of nan_test.f90 gives an ICE. - F90=nvfortran F90FLAGS="-acc -Minfo=all" make -C tutorial/practicals/nemo compile + F90=nvfortran F90FLAGS="-acc -Minfo=all" make -j 4 -C tutorial/practicals/nemo compile diff --git a/.github/workflows/lfric_test.yml b/.github/workflows/lfric_test.yml index aee626e188..c2c3790df6 100644 --- a/.github/workflows/lfric_test.yml +++ b/.github/workflows/lfric_test.yml @@ -75,43 +75,43 @@ jobs: - name: LFRic passthrough (with DistributedMemory) run: | # Set up environment - source /apps/spack/spack-repo/share/spack/setup-env.sh - spack env activate lfric-gnu - export FC="gfortran" - export FPP="cpp -traditional-cpp" - export LDMPI="mpif90" - export FFLAGS="-I$(spack location -e lfric-gnu)/.spack-env/view/include" - export LDFLAGS="-L$(spack location -e lfric-gnu)/.spack-env/view/lib" - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(spack location -e lfric-gnu)/.spack-env/view/lib:$(spack location -e lfric-gnu)/.spack-env/view/lib6 - source .runner_venv/bin/activate - export PSYCLONE_LFRIC_DIR=${GITHUB_WORKSPACE}/examples/lfric/scripts + # source /apps/spack/spack-repo/share/spack/setup-env.sh + # spack env activate lfric-gnu + # export FC="gfortran" + # export FPP="cpp -traditional-cpp" + # export LDMPI="mpif90" + # export FFLAGS="-I$(spack location -e lfric-gnu)/.spack-env/view/include" + # export LDFLAGS="-L$(spack location -e lfric-gnu)/.spack-env/view/lib" + # export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(spack location -e lfric-gnu)/.spack-env/view/lib:$(spack location -e lfric-gnu)/.spack-env/view/lib6 + # source .runner_venv/bin/activate + # export PSYCLONE_LFRIC_DIR=${GITHUB_WORKSPACE}/examples/lfric/scripts export MINIAPP_DIR=${HOME}/LFRic_45376/miniapps/gungho_model export PSYCLONE_CONFIG=${HOME}/lfric_psyclone_config.cfg cd ${MINIAPP_DIR} # Compile - make clean - make -j 6 build - # Run - cd example - cp ${HOME}/lfric_gunho_configuration.nml configuration.nml - mpirun -n 1 ../bin/gungho_model configuration.nml |& tee output.txt - ${PSYCLONE_LFRIC_DIR}/compare_ouput.py ${HOME}/lfric_gunho_configuration_4its_output.txt output.txt - cat timer.txt - export VAR_TIME=$(grep "gungho_model" timer.txt | cut -d'|' -f5) - export VAR_HALOS=$(grep "gungho_model" halo_calls_counter.txt | cut -d'|' -f5) - echo $GITHUB_REF_NAME $GITHUB_SHA $VAR_TIME $VAR_HALOS >> ${HOME}/lfric_passthrough_performance_history + # make clean + # make -j 6 build + # # Run + # cd example + # cp ${HOME}/lfric_gunho_configuration.nml configuration.nml + # mpirun -n 1 ../bin/gungho_model configuration.nml |& tee output.txt + # ${PSYCLONE_LFRIC_DIR}/compare_ouput.py ${HOME}/lfric_gunho_configuration_4its_output.txt output.txt + # cat timer.txt + # export VAR_TIME=$(grep "gungho_model" timer.txt | cut -d'|' -f5) + # export VAR_HALOS=$(grep "gungho_model" halo_calls_counter.txt | cut -d'|' -f5) + # echo $GITHUB_REF_NAME $GITHUB_SHA $VAR_TIME $VAR_HALOS >> ${HOME}/lfric_passthrough_performance_history # Upload the results into a Github Gist - newresults=$(printf "%q" "$(cat ${HOME}/lfric_passthrough_performance_history)") - { - printf '{"description":"New LFRic results","files":{"lfric_passthrough.txt":{"content":"' - echo -n ${newresults:2:-1} - printf '"}}}' - }| curl -L -X PATCH \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GIST_TOKEN }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/gists/a4049a0fc0a0a11651a5ce6a04d76160 \ - --data-binary @- + # newresults=$(printf "%q" "$(cat ${HOME}/lfric_passthrough_performance_history)") + # { + # printf '{"description":"New LFRic results","files":{"lfric_passthrough.txt":{"content":"' + # echo -n ${newresults:2:-1} + # printf '"}}}' + # }| curl -L -X PATCH \ + # -H "Accept: application/vnd.github+json" \ + # -H "Authorization: Bearer ${{ secrets.GIST_TOKEN }}" \ + # -H "X-GitHub-Api-Version: 2022-11-28" \ + # https://api.github.com/gists/a4049a0fc0a0a11651a5ce6a04d76160 \ + # --data-binary @- # PSyclone, compile and run MetOffice LFRic with all optimisations and 6 OpenMP threads - name: LFRic with all transformations @@ -147,14 +147,14 @@ jobs: export VAR_HALOS=$(grep "gungho_model" halo_calls_counter.txt | cut -d'|' -f5) echo $GITHUB_REF_NAME $GITHUB_SHA $VAR_TIME $VAR_HALOS >> ${HOME}/lfric_optimised_performance_history # Upload the results into a Github Gist - newresults=$(printf "%q" "$(cat ${HOME}/lfric_optimised_performance_history)") - { - printf '{"description":"New LFRic results","files":{"lfric_optimised.txt":{"content":"' - echo -n ${newresults:2:-1} - printf '"}}}' - }| curl -L -X PATCH \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.GIST_TOKEN }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/gists/a4049a0fc0a0a11651a5ce6a04d76160 \ - --data-binary @- + # newresults=$(printf "%q" "$(cat ${HOME}/lfric_optimised_performance_history)") + # { + # printf '{"description":"New LFRic results","files":{"lfric_optimised.txt":{"content":"' + # echo -n ${newresults:2:-1} + # printf '"}}}' + # }| curl -L -X PATCH \ + # -H "Accept: application/vnd.github+json" \ + # -H "Authorization: Bearer ${{ secrets.GIST_TOKEN }}" \ + # -H "X-GitHub-Api-Version: 2022-11-28" \ + # https://api.github.com/gists/a4049a0fc0a0a11651a5ce6a04d76160 \ + # --data-binary @-