Skip to content

Commit

Permalink
Cleanup GPU CI
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherwharrop-noaa committed Aug 14, 2024
1 parent 531af27 commit 889b1a8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 24 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/gpu_nvhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:

ubuntu_build:
#if: ${{ github.event.label.name == 'GPU_Test' }}
if: ${{ github.event.label.name == 'GPU-CI' }}

name: Ubuntu NVHPC GPU Build
# Run on self-hosted
Expand Down Expand Up @@ -53,6 +53,7 @@ jobs:
uses: actions/checkout@v2

# Test debug mode
# Turn this off because the compiler hangs while building in debug mode
#- name: Build gf debug
# run: |
# source /usr/share/lmod/lmod/init/bash
Expand Down Expand Up @@ -91,18 +92,3 @@ jobs:
timeout-minutes: 60
with:
limit-access-to-actor: true

## Test release mode
#- name: Build gf release
# run: |
# source /usr/share/lmod/lmod/init/bash
# module use /opt/nvidia/hpc_sdk/modulefiles
# module load nvhpc
# cd ref
# rm -rf build
# mkdir build
# cd build
# export OMP_NUM_THREADS=4
# cmake -DCMAKE_BUILD_TYPE=release -DENABLE_GPU=on ..
# make
# ctest --output-on-failure -R gpu_kernel
2 changes: 0 additions & 2 deletions ref/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ find_package( OpenMP COMPONENTS C Fortran )
find_package( MPI COMPONENTS C Fortran )

if ( ENABLE_GPU )
#set( OpenACC_ACCEL_TARGET tesla )
find_package( OpenACC REQUIRED )
find_package( CUDAToolkit REQUIRED )
add_compile_definitions(ENABLE_GPU)
Expand All @@ -36,7 +35,6 @@ if ( ENABLE_GPU )
string(REPLACE "." "" CUDA_ARCH_LIST "${INSTALLED_GPU_CCS_4}")
message( STATUS "CUDA_ARCH_LIST: ${CUDA_ARCH_LIST}" )
SET(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCH_LIST})
add_compile_options("-Minfo=accel")
endif()

add_subdirectory(src)
Expand Down
1 change: 0 additions & 1 deletion ref/cmake/compiler_flags_NVHPC_Fortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ set( CMAKE_Fortran_FLAGS_RELEASE "-fast -mp -Mnovect" )
####################################################################

set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -Mbounds -Mchkptr -Mchkstk -Ktrap=fp" )
#set( CMAKE_Fortran_FLAGS_DEBUG "-O0" )

####################################################################
# FLAGS FOR GPU
Expand Down
6 changes: 2 additions & 4 deletions ref/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ add_executable( gf_kernel_cpu ${gf_kernel_common_files} )

if(ENABLE_GPU)
add_executable( gf_kernel_gpu ${gf_kernel_common_files} )
#target_compile_options(gf_kernel_gpu PUBLIC ${OpenACC_Fortran_OPTIONS}:cc${CUDA_ARCH_LIST},cuda${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR})
#target_link_options(gf_kernel_gpu PUBLIC ${OpenACC_Fortran_OPTIONS}:cc${CUDA_ARCH_LIST})
target_compile_options(gf_kernel_gpu PUBLIC ${OpenACC_Fortran_OPTIONS}=gpu -gpu=ccnative -gpu=cuda${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR})
target_link_options(gf_kernel_gpu PUBLIC ${OpenACC_Fortran_OPTIONS}=gpu -gpu=ccnative -gpu=cuda${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR})
target_compile_options(gf_kernel_gpu PUBLIC -Minfo=accel ${OpenACC_Fortran_OPTIONS}=gpu -gpu=ccnative -gpu=cuda${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR})
target_link_options(gf_kernel_gpu PUBLIC -Minfo=accel ${OpenACC_Fortran_OPTIONS}=gpu -gpu=ccnative -gpu=cuda${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR})
endif()

if(OpenMP_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion ref/src/cu_gf_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ subroutine cu_gf_deep_run( &
!- zws for shallow convection closure (grant 2001)
!- height of the pbl
zws(i) = max(0.,.001-flux_tun(i)*0.41*buo_flux*zo(i,kpbl(i))*g/t(i,kpbl(i)))
zws(i) = 1.2*zws(i)**.3333_kind_phys
zws(i) = 1.2*zws(i)**.3333
zws(i) = zws(i)*rho(i,kpbl(i)) !check if zrho is correct
enddo
!$acc end kernels
Expand Down

0 comments on commit 889b1a8

Please sign in to comment.