Skip to content

Commit

Permalink
#2132 Revert workflow changes that cause issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sergisiso committed Sep 21, 2023
1 parent ce8e1ed commit 1f46fb5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 49 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -91,15 +90,15 @@ 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: |
module load python/${PYTHON_VERSION}
. .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: |
Expand All @@ -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}
Expand All @@ -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}
Expand All @@ -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
86 changes: 43 additions & 43 deletions .github/workflows/lfric_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 @-

0 comments on commit 1f46fb5

Please sign in to comment.