From a1ed1a25d44d34b145f5b377cc25f5f7e479e97a Mon Sep 17 00:00:00 2001 From: Nikolaos Tselepidis Date: Sun, 17 Aug 2025 15:18:17 +0200 Subject: [PATCH 1/2] Reduce registers --- CMakeLists.txt | 2 +- src/simulation/m_igr.fpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b349eb394..8850a3b9a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -499,7 +499,7 @@ function(MFC_SETUP_TARGET) endforeach() target_compile_options(${a_target} - PRIVATE -gpu=keep,ptxinfo,lineinfo + PRIVATE -gpu=keep,ptxinfo,lineinfo -gpu=maxregcount:165 ) if (MFC_Fastmath) diff --git a/src/simulation/m_igr.fpp b/src/simulation/m_igr.fpp index 0fbc76346f..c7b35d5808 100644 --- a/src/simulation/m_igr.fpp +++ b/src/simulation/m_igr.fpp @@ -27,6 +27,7 @@ module m_igr #ifdef __NVCOMPILER_GPU_UNIFIED_MEM integer, dimension(3) :: nv_uvm_temp_on_gpu real(wp), pointer, contiguous, dimension(:, :, :) :: jac, jac_rhs, jac_old + $:GPU_DECLARE(create='[jac, jac_rhs, jac_old]') real(wp), allocatable, dimension(:, :, :), pinned, target :: jac_host real(wp), allocatable, dimension(:, :, :), pinned, target :: jac_rhs_host real(wp), allocatable, dimension(:, :, :), pinned, target :: jac_old_host From 227d0185e8b203b0a5a868befd91f235c5795a68 Mon Sep 17 00:00:00 2001 From: Nikolaos Tselepidis Date: Tue, 26 Aug 2025 12:14:34 +0200 Subject: [PATCH 2/2] Set maxregcount to 128 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8850a3b9a3..a1c977cd4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -499,7 +499,7 @@ function(MFC_SETUP_TARGET) endforeach() target_compile_options(${a_target} - PRIVATE -gpu=keep,ptxinfo,lineinfo -gpu=maxregcount:165 + PRIVATE -gpu=keep,ptxinfo,lineinfo -gpu=maxregcount:128 ) if (MFC_Fastmath)