From 076c4eb756c7a352257dacf50234413b7b408587 Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Mon, 12 Aug 2024 10:28:18 +0200 Subject: [PATCH 1/2] add 64bit_data setting --- cime_config/namelist_definition_blom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cime_config/namelist_definition_blom.xml b/cime_config/namelist_definition_blom.xml index 2499527b..73e27e4a 100644 --- a/cime_config/namelist_definition_blom.xml +++ b/cime_config/namelist_definition_blom.xml @@ -757,6 +757,7 @@ 0 1 + 1 Format of restart file (valid arguments are 0 for classic, @@ -1378,6 +1379,7 @@ 0,0,0 1,1,1 + 1,1,1 netcdf format (valid arguments are 0 for classic, 1 for 64-bit @@ -5074,6 +5076,7 @@ 0,0,0 1,1,1 + 1,1,1 add desc From f0090621457251e0e4836c616a57014a818701a1 Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Mon, 12 Aug 2024 22:24:41 +0200 Subject: [PATCH 2/2] fixed compile problems when compiling with OpenMP but still using one thread --- phy/mod_nctools.F90 | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/phy/mod_nctools.F90 b/phy/mod_nctools.F90 index 726f218b..5076b987 100644 --- a/phy/mod_nctools.F90 +++ b/phy/mod_nctools.F90 @@ -1268,8 +1268,8 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) fldmax = -abs(fillr8) if (mskflg == 1) then - !$omp parallel do reduction(min:fldmin) reduction(max:fldmax) - !$omp private(j,i,ij,ijk) + !$omp parallel do private(j,i,ij,ijk) & + !$omp reduction(min:fldmin) reduction(max:fldmax) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1284,8 +1284,8 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) end do !$omp end parallel do else if (mskflg == 2) then - !$omp parallel do reduction(min:fldmin) reduction(max:fldmax) - !$omp private(j,i,ij,ijk) + !$omp parallel do private(j,i,ij,ijk) & + !$omp reduction(min:fldmin) reduction(max:fldmax) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1300,8 +1300,8 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) end do !$omp end parallel do else - !$omp parallel do reduction(min:fldmin) reduction(max:fldmax) - !$omp private(j,i,ijk) + !$omp parallel do private(j,i,ij,ijk) & + !$omp reduction(min:fldmin) reduction(max:fldmax) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1350,8 +1350,7 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) ! --- Prepare and write output field if (mskflg == 1) then - !$omp parallel do - !$omp private(j,i,ij) + !$omp parallel do private(j,i,ij) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1366,8 +1365,7 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) end do !$omp end parallel do else if (mskflg == 2) then - !$omp parallel do - !$omp private(j,i,ij,ijk) + !$omp parallel do private(j,i,ij,ijk) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1383,8 +1381,7 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) end do !$omp end parallel do else - !$omp parallel do - !$omp private(j,i,ijk) + !$omp parallel do private(j,i,ijk) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1446,8 +1443,8 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) fldmin = abs(fillr8) fldmax = -abs(fillr8) if (mskflg == 1) then - !$omp parallel do reduction(min:fldmin) reduction(max:fldmax) & - !$omp private(j,i,ij,ijk) + !$omp parallel do private(j,i,ij,ijk) & + !$omp reduction(min:fldmin) reduction(max:fldmax) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1462,8 +1459,8 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) end do !$omp end parallel do else if (mskflg == 2) then - !$omp parallel do reduction(min:fldmin) reduction(max:fldmax) & - !$omp private(j,i,ij,ijk) + !$omp parallel do private(j,i,ij,ijk) & + !$omp reduction(min:fldmin) reduction(max:fldmax) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1478,8 +1475,8 @@ subroutine ncpack(vnm,dims,fld,msk,mskflg,sfac,offs) end do !$omp end parallel do else - !$omp parallel do reduction(min:fldmin) reduction(max:fldmax) & - !$omp private(j,i,ijk) + !$omp parallel do private(j,i,ijk) & + !$omp reduction(min:fldmin) reduction(max:fldmax) do k = 1,kd do j = 1,jj do i = 1,ii @@ -1914,8 +1911,7 @@ subroutine nccopa(vnm,dims,fld,msk,sfac,offs) ! --- Prepare and write output field do k = 1,kd - !$omp parallel do - !$omp private(i,ij,ijk) + !$omp parallel do private(i,ij,ijk) do j = 1,jj do i = 1,ii ij = i+nbdy+(idm+2*nbdy)*(j+nbdy-1)