Skip to content

Commit

Permalink
Merge pull request ESMCI#1517 from NCAR/ejh_warn2
Browse files Browse the repository at this point in the history
fix some fortran warnings
  • Loading branch information
edhartnett authored Jun 25, 2019
2 parents 393c5da + 32a1f48 commit 2928ce3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
3 changes: 2 additions & 1 deletion src/flib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ include_HEADERS = $(MODFILES)
# pre-processor. These will only be used by doxygen when --enable-docs
# is used at configure.
if BUILD_DOCS
BUILT_SOURCES += piodarray.f90 piolib_mod.f90 pionfatt_mod.f90 pionfget_mod.f90 pionfput_mod.f90 pionfatt_mod_2.f90 pionfget_mod_2.f90
BUILT_SOURCES += piodarray.f90 piolib_mod.f90 pionfatt_mod.f90 pionfget_mod.f90 \
pionfput_mod.f90 pionfatt_mod_2.f90 pionfget_mod_2.f90
piodarray.f90: piodarray.F90
$(CC) -E $< > $@
piolib_mod.f90: piolib_mod.F90
Expand Down
8 changes: 1 addition & 7 deletions src/flib/piolib_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ integer(C_INT) function PIOc_setframe(ncid, varid, frame) &
integer(C_INT), value :: frame
end function PIOc_setframe
end interface
iframe = frame-1
iframe = int(frame-1)
ierr = PIOc_setframe(file%fh, vardesc%varid-1, iframe)
end subroutine setframe

Expand Down Expand Up @@ -553,7 +553,6 @@ end subroutine PIO_initdecomp_bc
subroutine initdecomp_2dof_bin_i4(iosystem,basepiotype,dims,lenblocks,compdof,iodofr,iodofw,iodesc)
type (iosystem_desc_t), intent(in) :: iosystem
integer(i4), intent(in) :: basepiotype
integer(i4) :: basetype
integer(i4), intent(in) :: dims(:)
integer (i4), intent(in) :: lenblocks
integer (i4), intent(in) :: compdof(:) !> global degrees of freedom for computational decomposition
Expand Down Expand Up @@ -702,8 +701,6 @@ subroutine initdecomp_2dof_nf_i4(iosystem,basepiotype,dims,lenblocks,compdof,iod
type (io_desc_t), intent(inout) :: iodesc

integer(PIO_OFFSET_KIND), intent(in) :: start(:), count(:)
type (io_desc_t) :: tmp


call pio_initdecomp(iosystem, basepiotype,dims,lenblocks,int(compdof,PIO_OFFSET_KIND),int(iodofr,PIO_OFFSET_KIND), &
int(iodofw,PIO_OFFSET_KIND),start,count,iodesc)
Expand Down Expand Up @@ -780,7 +777,6 @@ subroutine initdecomp_1dof_nf_i4(iosystem,basepiotype,dims,lenblocks,compdof,iod
integer (i4), intent(in) :: compdof(:) ! global degrees of freedom for computational decomposition
integer (i4), intent(in) :: iodof(:) ! global degrees of freedom for io decomposition
type (io_desc_t), intent(inout) :: iodesc
integer :: piotype
integer(PIO_OFFSET_KIND), intent(in) :: start(:), count(:)

call initdecomp_1dof_nf_i8(iosystem, basepiotype,dims,lenblocks,int(compdof,PIO_OFFSET_KIND),int(iodof,PIO_OFFSET_KIND),&
Expand Down Expand Up @@ -814,7 +810,6 @@ subroutine initdecomp_1dof_nf_i8(iosystem,basepiotype,dims,lenblocks,compdof,iod
integer (PIO_OFFSET_KIND), intent(in) :: compdof(:) ! global degrees of freedom for computational decomposition
integer (PIO_OFFSET_KIND), intent(in) :: iodof(:) ! global degrees of freedom for io decomposition
type (io_desc_t), intent(inout) :: iodesc
integer :: piotype
integer(PIO_OFFSET_KIND), intent(in) :: start(:), count(:)

if(any(iodof/=compdof)) then
Expand Down Expand Up @@ -1448,7 +1443,6 @@ integer function PIO_openfile(iosystem, file, iotype, fname,mode) result(ierr)
integer, intent(in) :: iotype
character(len=*), intent(in) :: fname
integer, optional, intent(in) :: mode
integer :: iorank
interface
integer(C_INT) function PIOc_openfile(iosysid, fh, iotype, fname,mode) &
bind(C,NAME='PIOc_openfile')
Expand Down
3 changes: 1 addition & 2 deletions src/flib/pionfatt_mod.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ contains
clen = len_trim(values)
allocate(cvar(clen+1))
cvar = C_NULL_CHAR
do i=1,clen
do i=1,int(clen)
cvar(i) = values(i:i)
end do
ierr = PIOc_put_att_text (ncid,varid-1,trim(name)//C_NULL_CHAR, clen, cvar(1))
Expand Down Expand Up @@ -240,7 +240,6 @@ contains
character(len=*), intent(in) :: name
integer, intent(in) :: arrlen
character(len=*), intent(in) :: values(arrlen)
integer :: vallen


ierr = PIOc_put_att_text (ncid,varid-1,trim(name)//C_NULL_CHAR, int(arrlen,C_SIZE_T),values(1))
Expand Down
8 changes: 1 addition & 7 deletions tests/unit/basic_tests.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Subroutine test_create(test_id, err_msg)

! Local Vars
character(len=str_len) :: filename
integer :: iotype, ret_val, ret_val2, pio_dim
integer :: iotype, ret_val, ret_val2

err_msg = "no_error"

Expand Down Expand Up @@ -147,12 +147,6 @@ Subroutine test_open(test_id, err_msg)
integer :: unlimdimid
type(var_desc_t) :: pio_var

! These will be used to set chunk cache sizes in netCDF-4/HDF5
! files.
integer(kind=PIO_OFFSET_KIND) :: chunk_cache_size
integer(kind=PIO_OFFSET_KIND) :: chunk_cache_nelems
real :: chunk_cache_preemption

err_msg = "no_error"
dims(1) = 3*ntasks
compdof = 3*my_rank+(/1,2,3/) ! Where in the global array each task writes
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/ncdf_tests.F90
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ Subroutine test_nc4(test_id, err_msg)
! Local Vars
character(len=str_len) :: filename
integer :: iotype, ret_val
integer :: ret_val1

! Data used to test writing
integer, dimension(2) :: data_to_write, compdof
Expand All @@ -283,10 +282,6 @@ Subroutine test_nc4(test_id, err_msg)
integer :: deflate
integer :: my_deflate_level, deflate_level, deflate_level_2

! These will be used to test the chunksizes for netCDF-4 files.
integer :: storage
integer, dimension(1) :: chunksizes

! These will be used to set chunk cache sizes in netCDF-4/HDF5
! files.
integer(kind=PIO_OFFSET_KIND) :: chunk_cache_size
Expand Down

0 comments on commit 2928ce3

Please sign in to comment.