Skip to content

Commit 3a9bd5f

Browse files
committed
Cleanup Intel Debug messages
1 parent a58fae0 commit 3a9bd5f

35 files changed

+498
-571
lines changed

Apps/Comp_Testing_Driver.F90

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ program comp_testing_driver
1717
call main()
1818

1919
contains
20-
20+
2121
subroutine main()
2222
integer :: status, rc, local_PET, n_PET
2323
type(ESMF_VM) :: vm
24-
character(len=ESMF_MAXSTR) :: filename, comp_name
24+
character(len=ESMF_MAXSTR) :: filename
2525
type(ESMF_Config) :: config
2626
class(BaseProfiler), pointer :: t_p
2727

@@ -48,8 +48,8 @@ end subroutine main
4848
subroutine run_component_driver(filename, rc)
4949
character(len=*), intent(in) :: filename
5050
integer, intent(out) :: rc
51-
integer :: status, root_id, user_RC, RUN_DT, i, j, nc_id, var_id
52-
integer :: NX, NY, item_count, field_count, phase
51+
integer :: status, root_id, user_RC, RUN_DT
52+
integer :: NX, NY, phase
5353
character(len=ESMF_MAXSTR) :: comp_name, shared_obj, restart_file
5454
type(ESMF_Clock) :: clock
5555
type(ESMF_TimeInterval) :: time_interval
@@ -58,24 +58,19 @@ subroutine run_component_driver(filename, rc)
5858
type(ESMF_Config) :: config
5959
type(ESMF_Time), allocatable :: start_time(:)
6060
type(ESMF_Grid) :: grid
61-
type(ESMF_Field) :: field
6261
type(MAPL_MetaComp), pointer :: mapl_obj
6362
real(kind=ESMF_KIND_R8), pointer :: lons_field_ptr(:,:), lats_field_ptr(:,:)
6463
type(NetCDF4_fileFormatter) :: formatter
6564
type(FileMetadata) :: basic_metadata
6665
type(FileMetadataUtils) :: metadata
6766
logical :: subset
68-
character(len=ESMF_MAXSTR), allocatable :: item_name_list(:), field_name_list(:)
69-
type(ESMF_StateItem_Flag):: item_type
70-
type(ESMF_FieldBundle) :: field_bundle
71-
type(ESMF_Field), allocatable :: field_list(:)
7267

7368
! get attributes from config file
7469
config = ESMF_ConfigCreate(_RC)
7570
call ESMF_ConfigLoadFile(config, filename, _RC)
7671
call get_config_attributes(config, comp_name, RUN_DT, restart_file, shared_obj, phase, subset, NX, NY, _RC)
7772

78-
! create a clock, set current time to required time consistent with checkpoints used
73+
! create a clock, set current time to required time consistent with checkpoints used
7974
call formatter%open(restart_file, pFIO_Read, _RC)
8075
call ESMF_TimeIntervalSet(time_interval, s=RUN_DT, _RC)
8176
basic_metadata=formatter%read(_RC)
@@ -93,8 +88,8 @@ subroutine run_component_driver(filename, rc)
9388
call MAPL_InternalStateRetrieve(temp_GC, mapl_obj, _RC)
9489
call MAPL_Set(mapl_obj, CF=config, _RC)
9590

96-
root_id = MAPL_AddChild(mapl_obj, grid=grid, name=comp_name, userRoutine="setservices_", sharedObj=shared_obj, _RC)
97-
91+
root_id = MAPL_AddChild(mapl_obj, grid=grid, name=comp_name, userRoutine="setservices_", sharedObj=shared_obj, _RC)
92+
9893
GC = mapl_obj%get_child_gridcomp(root_id)
9994
import = mapl_obj%get_child_import_state(root_id)
10095
export = mapl_obj%get_child_export_state(root_id)
@@ -111,13 +106,13 @@ subroutine run_component_driver(filename, rc)
111106
else
112107
call ESMF_GridCompSet(GC, grid=grid, _RC)
113108
end if
114-
115109

116-
call ESMF_GridCompInitialize(GC, importState=import, exportState=export, clock=clock, userRC=user_RC, _RC)
110+
111+
call ESMF_GridCompInitialize(GC, importState=import, exportState=export, clock=clock, userRC=user_RC, _RC)
117112

118113
call ESMF_GridCompRun(GC, importState=import, exportState=export, clock=clock, phase=phase, userRC=user_RC, _RC)
119114

120-
call ESMF_GridCompFinalize(GC, importState=import, exportState=export, clock=clock, userRC=user_RC, _RC)
115+
call ESMF_GridCompFinalize(GC, importState=import, exportState=export, clock=clock, userRC=user_RC, _RC)
121116

122117
_RETURN(_SUCCESS)
123118
end subroutine run_component_driver

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727
- Updated CircleCI to use v11.2.0 bcs
2828
- Backported changes in `pfio` from `release/MAPL-v3` to enable `pfio` unit tests
2929
- Update `components.yaml`
30-
- ESMA_cmake v3.32.0 (Support for Intel Fortran under Rosetta2)
30+
- ESMA_cmake v3.33.0 (Support for Intel Fortran under Rosetta2, updated NAG flags)
3131
- Cleanup Fortran
3232
- Converted all uses of `mpif.h` to `use mpi`
3333
- Converted all uses of `character*` to `character(len=)`
34+
- Removed many unused variables
35+
- Added many `_UNUSED_DUMMY()` calls
3436

3537
### Fixed
3638

Tests/ExtDataRoot_GridComp.F90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ subroutine SetServices ( GC, RC )
6969
type(ESMF_Config) :: cf
7070
type(SyntheticFieldSupportWrapper) :: synthWrap
7171
type(SyntheticFieldSupport), pointer :: synth
72-
logical :: on_tiles
7372
integer :: vloc
7473

7574
call ESMF_GridCompGet( GC, NAME=COMP_NAME, CONFIG=CF, _RC )

Tests/pfio_MAPL_demo.F90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ integer function create_member_subcommunicator(comm, n_members, npes_member, rc)
180180
! _VERIFY(status)
181181
subcommunicator = split_comm%get_subcommunicator()
182182

183+
_UNUSED_DUMMY(rc)
184+
183185
end function create_member_subcommunicator
184186
!------------------------------------------------------------------------------
185187
!>
@@ -228,7 +230,6 @@ end subroutine initialize_ioserver
228230
!
229231
subroutine perform_domain_deposition()
230232
integer, allocatable :: proc_sizes(:)
231-
integer :: ierr
232233
!------------------------------------------------
233234
! ---> Perform domain decomposition for the model
234235
!------------------------------------------------

base/Base/Base_Base.F90

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ module MAPL_Base
4343
public MAPL_LatLonGridCreate ! Creates regular Lat/Lon ESMF Grids
4444
public MAPL_Nhmsf
4545
public MAPL_NSECF
46-
public MAPL_Nsecf2
4746
public MAPL_PackTime
4847
public MAPL_PackDateTime
4948
public MAPL_RemapBounds
@@ -75,7 +74,7 @@ module MAPL_Base
7574
public MAPL_GetCorrectedPhase
7675

7776

78-
real, public, parameter :: MAPL_UNDEF = 1.0e15
77+
real, public, parameter :: MAPL_UNDEF = 1.0e15
7978

8079

8180
character(len=ESMF_MAXSTR), public, parameter :: MAPL_StateItemOrderList = 'MAPL_StateItemOrderList'
@@ -142,42 +141,42 @@ module MAPL_Base
142141
module subroutine MAPL_AllocateCoupling(field, rc)
143142
use ESMF, only: ESMF_Field
144143
type(ESMF_Field), intent(INOUT) :: field
145-
integer, optional, intent( OUT) :: rc
144+
integer, optional, intent( OUT) :: rc
146145
end subroutine MAPL_AllocateCoupling
147146

148147
module subroutine MAPL_FieldAllocCommit(field, dims, location, typekind, &
149148
hw, ungrid, default_value, rc)
150149
use ESMF, only: ESMF_Field
151150
type(ESMF_Field), intent(INOUT) :: field
152-
integer, intent(IN ) :: dims
153-
integer, intent(IN ) :: location
151+
integer, intent(IN ) :: dims
152+
integer, intent(IN ) :: location
154153
integer, intent(IN ) :: typekind
155154
integer, intent(IN ) :: hw !halowidth
156155
integer, optional, intent(IN ) :: ungrid(:)
157156
real, optional, intent(IN ) :: default_value
158-
integer, optional, intent( OUT) :: rc
157+
integer, optional, intent( OUT) :: rc
159158
end subroutine MAPL_FieldAllocCommit
160159

161160
module subroutine MAPL_FieldF90Deallocate(field, rc)
162161
use ESMF, only: ESMF_Field
163162
type(ESMF_Field), intent(INOUT) :: field
164-
integer, optional, intent( OUT) :: rc
163+
integer, optional, intent( OUT) :: rc
165164
end subroutine MAPL_FieldF90Deallocate
166165

167166
module subroutine MAPL_SetPointer2DR4(state, ptr, name, rc)
168167
use ESMF, only: ESMF_State
169168
type(ESMF_State), intent(INOUT) :: state
170169
real, pointer :: ptr(:,:)
171170
character(len=*), intent(IN ) :: name
172-
integer, optional, intent( OUT) :: rc
171+
integer, optional, intent( OUT) :: rc
173172
end subroutine MAPL_SetPointer2DR4
174173

175174
module subroutine MAPL_SetPointer3DR4(state, ptr, name, rc)
176175
use ESMF, only: ESMF_State
177176
type(ESMF_State), intent(INOUT) :: state
178177
real, pointer :: ptr(:,:,:)
179178
character(len=*), intent(IN ) :: name
180-
integer, optional, intent( OUT) :: rc
179+
integer, optional, intent( OUT) :: rc
181180
end subroutine MAPL_SetPointer3DR4
182181

183182
module subroutine MAPL_DecomposeDim ( dim_world,dim,NDEs, unusable, symmetric, min_DE_extent )
@@ -201,13 +200,13 @@ end subroutine MAPL_MakeDecomposition
201200

202201
module subroutine MAPL_Interp_Fac (TIME0, TIME1, TIME2, FAC1, FAC2, RC)
203202
use ESMF, only: ESMF_Time
204-
!------------------------------------------------------------
203+
!------------------------------------------------------------
205204

206205
! PURPOSE:
207206
! ========
208207
!
209-
! Compute interpolation factors, fac, to be used
210-
! in the calculation of the instantaneous boundary
208+
! Compute interpolation factors, fac, to be used
209+
! in the calculation of the instantaneous boundary
211210
! conditions, ie:
212211
!
213212
! q(i,j) = fac1*q1(i,j) + (1.-fac1)*q2(i,j)
@@ -220,16 +219,16 @@ module subroutine MAPL_Interp_Fac (TIME0, TIME1, TIME2, FAC1, FAC2, RC)
220219
! INPUT:
221220
! ======
222221
! time0 : Time of current timestep
223-
! time1 : Time of boundary data 1
224-
! time2 : Time of boundary data 2
222+
! time1 : Time of boundary data 1
223+
! time2 : Time of boundary data 2
225224

226225
! OUTPUT:
227226
! =======
228227
! fac1 : Interpolation factor for Boundary Data 1
229228
!
230-
! ------------------------------------------------------------
231-
! GODDARD LABORATORY FOR ATMOSPHERES
232-
! ------------------------------------------------------------
229+
! ------------------------------------------------------------
230+
! GODDARD LABORATORY FOR ATMOSPHERES
231+
! ------------------------------------------------------------
233232

234233
type(ESMF_Time), intent(in ) :: TIME0, TIME1, TIME2
235234
real, intent(out) :: FAC1
@@ -240,7 +239,7 @@ end subroutine MAPL_Interp_Fac
240239
module subroutine MAPL_ClimInterpFac (CLOCK,I1,I2,FAC, RC)
241240
use ESMF, only: ESMF_Clock
242241

243-
!------------------------------------------------------------
242+
!------------------------------------------------------------
244243

245244
type(ESMF_CLOCK), intent(in ) :: CLOCK
246245
integer, intent(OUT) :: I1, I2
@@ -296,25 +295,21 @@ module subroutine MAPL_tick (nymd,nhms,ndt)
296295
integer nymd,nhms,ndt
297296
end subroutine MAPL_tick
298297

299-
integer module function MAPL_nsecf2 (nhhmmss,nmmdd,nymd)
300-
integer nhhmmss,nmmdd,nymd
301-
end function MAPL_nsecf2
302-
303298
integer module function MAPL_nhmsf (nsec)
304299
implicit none
305300
integer nsec
306301
end function MAPL_nhmsf
307302

308303
! A year is a leap year if
309-
! 1) it is divible by 4, and
304+
! 1) it is divible by 4, and
310305
! 2) it is not divisible by 100, unless
311306
! 3) it is also divisible by 400.
312307
logical module function MAPL_LEAP(NY)
313308
integer, intent(in) :: NY
314309
end function MAPL_LEAP
315310

316311

317-
integer module function MAPL_incymd (NYMD,M)
312+
integer module function MAPL_incymd (NYMD,M)
318313
integer nymd,m
319314
end function MAPL_incymd
320315

@@ -440,18 +435,18 @@ end function MAPL_RemapBounds_3dr8
440435
! grid with 72 layers:
441436
!
442437
!```
443-
! GDEF: LatLon
444-
! IDEF: 32
445-
! JDEF: 16
446-
! LDEF: 1
438+
! GDEF: LatLon
439+
! IDEF: 32
440+
! JDEF: 16
441+
! LDEF: 1
447442
! XDEF: 288 LINEAR -180. 1.25
448443
! YDEF: 181 LINEAR -90. 1.
449444
! ZDEF: 72 LINEAR 1 1
450445
!```
451446
! More generally,
452447
!```
453448
! GDEF: LatLon
454-
! IDEF: Nx
449+
! IDEF: Nx
455450
! JDEF: Ny
456451
! LDEF: Nz
457452
! XDEF: IM_World XCoordType BegLon, DelLon
@@ -537,16 +532,16 @@ module function MAPL_LatLonGridCreate (Name, vm, &
537532
! There are 3 possibilities to provide the coordinate information:
538533

539534
! 1) Thru Config object:
540-
type(ESMF_Config), OPTIONAL, target, &
541-
intent(in) :: Config
535+
type(ESMF_Config), OPTIONAL, target, &
536+
intent(in) :: Config
542537

543538
! 2) Thru a resource file:
544539
character(len=*), OPTIONAL, intent(in) :: ConfigFile
545540

546541

547542
! 3) Thru argument list:
548543
integer, OPTIONAL, intent(in) :: Nx, Ny ! Layout
549-
integer, OPTIONAL, intent(in) :: IM_World ! Zonal
544+
integer, OPTIONAL, intent(in) :: IM_World ! Zonal
550545
real, OPTIONAL, intent(in) :: BegLon, DelLon ! in degrees
551546

552547
integer, OPTIONAL, intent(in) :: JM_World ! Meridional
@@ -791,7 +786,7 @@ module MAPL_BaseMod
791786
use MAPL_RangeMod, only: MAPL_Range
792787
use mapl_MaplGrid, only: MAPL_GridGet, MAPL_DistGridGet, MAPL_GetImsJms, MAPL_GridHasDE
793788
use MAPL_Constants
794-
789+
795790

796791

797792

base/Base/Base_Base_implementation.F90

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,41 +1069,6 @@ module subroutine MAPL_tick (nymd,nhms,ndt)
10691069
RETURN
10701070
end subroutine MAPL_tick
10711071

1072-
integer module function MAPL_nsecf2 (nhhmmss,nmmdd,nymd)
1073-
integer nhhmmss,nmmdd,nymd,nday,month
1074-
integer nsday,iday,iday2
1075-
integer i,nsegm,nsegd
1076-
PARAMETER ( NSDAY = 86400 )
1077-
INTEGER YEAR, DAY, SEC
1078-
integer MNDY(12,4), mnd48(48)
1079-
DATA MND48/0,31,60,91,121,152,182,213,244,274,305,335,366,397,34*0 /
1080-
! DATA MNDY /0,31,60,91,121,152,182,213,244,274,305,335,366,397,34*0 /
1081-
equivalence ( mndy(1,1), mnd48(1) )
1082-
MAPL_nsecf2 = MAPL_nsecf( nhhmmss )
1083-
if( nmmdd.eq.0 ) return
1084-
DO I=15,48
1085-
! MNDY(I,1) = MNDY(I-12,1) + 365
1086-
MND48(I) = MND48(I-12) + 365
1087-
end DO
1088-
nsegm = nmmdd/100
1089-
nsegd = mod(nmmdd,100)
1090-
YEAR = NYMD / 10000
1091-
MONTH = MOD(NYMD,10000) / 100
1092-
DAY = MOD(NYMD,100)
1093-
SEC = MAPL_NSECF(nhhmmss)
1094-
IDAY = MNDY( MONTH ,MOD(YEAR ,4)+1 )
1095-
month = month + nsegm
1096-
If( month.gt.12 ) then
1097-
month = month - 12
1098-
year = year + 1
1099-
endif
1100-
IDAY2 = MNDY( MONTH ,MOD(YEAR ,4)+1 )
1101-
nday = iday2-iday
1102-
if(nday.lt.0) nday = nday + 1461
1103-
nday = nday + nsegd
1104-
MAPL_nsecf2 = MAPL_nsecf2 + nday*nsday
1105-
end function MAPL_nsecf2
1106-
11071072
integer module function MAPL_nhmsf (nsec)
11081073
implicit none
11091074
integer nsec
@@ -3132,7 +3097,6 @@ module subroutine MAPL_GetGlobalHorzIJIndex(npts,II,JJ,lon,lat,lonR8,latR8,Grid,
31323097
! MAPL_PI_R8/18, Japan Fuji mountain shift
31333098
real(ESMF_KIND_R8), parameter :: shift= 0.174532925199433d0
31343099

3135-
real :: tolerance
31363100
logical :: good_grid
31373101

31383102
if (npts == 0 ) then

base/ESMFL_Mod.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3500,7 +3500,7 @@ subroutine Bundle2State (BUN, STA, rc)
35003500
real(kind=ESMF_KIND_R8), pointer :: dst_pr83d(:,:,:)
35013501
type(ESMF_TypeKind_Flag) :: src_tk, dst_tk
35023502
integer :: src_fieldRank, dst_fieldRank
3503-
logical :: NotInState,itemNotFound
3503+
logical :: NotInState
35043504
character(len=ESMF_MAXSTR) :: NameInBundle
35053505
type(ESMF_StateItem_Flag) :: itemType
35063506

base/MAPL_CubedSphereGridFactory.F90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,6 @@ function generate_file_reference3D(this,fpointer,metadata) result(ref)
13491349
type(c_ptr) :: cptr
13501350
real, pointer :: ptr_ref(:,:,:,:,:)
13511351
logical :: face_format
1352-
integer :: status
13531352

13541353
if (present(metadata)) then
13551354
face_format = metadata%has_dimension('nf')

0 commit comments

Comments
 (0)