Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of Write(6,*) #575

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/Diagnostics/Diagnostics_Base.F90
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,6 @@ Module Diagnostics_Base
Integer :: lforce_r, lforcepp_r, lforcemm_r
Contains

Subroutine Generate_Diagnostic_Labels()
! Define labels for our quantity codes
Write(6,*)'A line of code.'
!Call Load_Label(v_r,'V_r')
!Call Load_Label(v_theta,'V_theta')
!Call Load_Label(v_phi, 'V_phi')
End Subroutine Generate_Diagnostic_Labels

Subroutine Initialize_Diagnostics_Buffer()
Logical :: dbtrans, dbconfig
Expand Down
3 changes: 0 additions & 3 deletions src/Diagnostics/Diagnostics_Custom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -210,23 +210,20 @@ Subroutine Custom_Hydro_Diagnostics(buffer)
!END_DO

If (compute_quantity(ell0_vr)) Then
Write(6,*)'Ell0_vr', ell0_vr
DO_PSI
qty(PSI) = ell0_values(r,vr)
END_DO
Call Add_Quantity(qty)
Endif

If (compute_quantity(ell0_tvar)) Then
Write(6,*)'Ell0 tvar', ell0_tvar
DO_PSI
qty(PSI) = ell0_values(r,tvar)
END_DO
Call Add_Quantity(qty)
Endif

If (compute_quantity(ell0_dpdr)) Then
Write(6,*)'Ell0 tvar', ell0_dpdr
DO_PSI
qty(PSI) = ell0_values(r,dpdr)
END_DO
Expand Down
1 change: 0 additions & 1 deletion src/Diagnostics/Diagnostics_Interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ Subroutine Reboot_Diagnostics(iteration,force_reboot)
Endif
Else
If (MOD(iteration,diagnostic_reboot_interval) .eq. 0) Then
if (my_rank .eq. 0) WRITE(6,*)'REBOOTING DIAGNOSTICS!'
! Find the name of the current reboot file.
ndigits = count_digits(reboot_count)
Write(ndigstr,'(i1.1)') ndigits
Expand Down
1 change: 0 additions & 1 deletion src/Diagnostics/Diagnostics_Mean_Correction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ Subroutine Mean_Correction(buffer)
!//////////////////////////////////////////////////////
! Perform the averaging
if (compute_mean_correct) then
!Write(6,*)'Allocated: ', allocated(mean_3dbuffer), allocated(mean_ell0buffer)

Call ComputeEll0(mean_3dbuffer,mean_ell0buffer)
endif
Expand Down
1 change: 0 additions & 1 deletion src/Diagnostics/Diagnostics_Miscellaneous.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Subroutine Compute_Misc_Diagnostics(buffer)
qty(PSI) = sin(k*2.0d0*mypi/n_phi) &
& *(sintheta(t)**2)*radius(r)
END_DO
Write(6,*)'Diagnostic1!', my_rank
Call Add_Quantity(qty)
Endif

Expand Down
14 changes: 1 addition & 13 deletions src/Diagnostics/Diagnostics_Second_Derivatives.F90
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Subroutine Initialize_Second_Derivatives()
Call d2buffer%init(field_count = ddfcount, config = 'p3b')

Call d2buffer%construct('p3a')
!WRITE(6,*)'BCHECK: ', shape(d2buffer%p3a)

Call d2buffer%deconstruct('p3a')
End Subroutine Initialize_Second_Derivatives

Expand Down Expand Up @@ -350,20 +350,17 @@ Subroutine Compute_Second_Derivatives(inbuffer)

!///////////////////////////////////////////////////////////
! Step 1: Initialize p3b portion of d2buffer
!Write(6,*)'Constructing the buffer...', d2buffer%nf3b

Call d2buffer%construct('p3b')
d2buffer%config = 'p3b'

!Write(6,*)'Complete...'

!///////////////////////////////////////////////////////////
! Steps 2-3: Load radial and theta derivatives
Do i = 1, nddfields*2
d2buffer%p3b(:,:,:,ddindmap(1,i)) = inbuffer(:,:,:,ddindmap(2,i))
Enddo

!Write(6,*)'Steps 1-3 complete.'

!////////////////////////////////////////////////////////////////
! Step 4: Move to p1b/p1a configuration
Expand All @@ -388,7 +385,6 @@ Subroutine Compute_Second_Derivatives(inbuffer)
d2buffer%p1b = 0.0
d2buffer%config='p1a'

!Write(6,*)'Steps 4 complete.'

!////////////////////////////////////////////////////////////
! Steps 5-6: Load d2_by_dr2 and d2_by_drdt into the buffer
Expand All @@ -408,17 +404,14 @@ Subroutine Compute_Second_Derivatives(inbuffer)
Call d2buffer%deconstruct('p1b')

! Ordering of fields in buffer is now dxdr, dxdt, dxdrdr, dxdrdt
!Write(6,*)'Steps 5-6 complete.'

!///////////////////////////////////////////////////////////////
! Step 7: Move to s2a & overwrite dxdt with sintheta*{dxdtdt}
Call d2buffer%reform()

!Write(6,*)'Step 7 reformation complete'

Call Allocate_rlm_Field(ddtemp)

!Write(6,*)'Step 7 allocation complete', nddfields

Do i = nddfields+1,nddfields*2
! We overwrite dxdt with sintheta* {dxdtdt}
Expand All @@ -428,18 +421,15 @@ Subroutine Compute_Second_Derivatives(inbuffer)
END_DO
Enddo

!Write(6,*)'Step 7 derivatves complete'

Call DeAllocate_rlm_Field(ddtemp)

!Write(6,*)'Step 7 deallocation complete'

Call d2buffer%construct('p2a')
Call Legendre_Transform(d2buffer%s2a,d2buffer%p2a)
Call d2buffer%deconstruct('s2a')
d2buffer%config = 'p2a'

!Write(6,*)'Step 7 complete.'

!/////////////////////////////////////////////////////////////////////
! Steps 8-10 : phi derivatives
Expand Down Expand Up @@ -478,7 +468,6 @@ Subroutine Compute_Second_Derivatives(inbuffer)
Enddo

Call d2buffer%deconstruct('p3b')
! Write(6,*)'Steps 8-10 complete.'

!//////////////////////////////////////////
! Step 11: Finalize
Expand Down Expand Up @@ -510,7 +499,6 @@ Subroutine Compute_Second_Derivatives(inbuffer)
END_DO
ENDDO

!Write(6,*)'Step 11 complete.'
End Subroutine Compute_Second_Derivatives

Subroutine Allocate_rlm_Field(arr)
Expand Down
1 change: 0 additions & 1 deletion src/Diagnostics/Diagnostics_TurbKE_Budget.F90
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ Subroutine Compute_TurbulentKE_Budget(buffer)
! Viscous Transport of turbulent kinetic energy.
! -div.F_TV = div.(sigma'.u') = (div.sigma').u' + Phi_T
If (compute_quantity(transport_viscous_pKE)) Then
!Write(6,*)dvrdrdr, shape(d2_fbuffer)
DO_PSI2
one_over_rsin = one_over_r(r) * csctheta(t)
ctn_over_r = one_over_r(r) * cottheta(t)
Expand Down
58 changes: 35 additions & 23 deletions src/IO/Spherical_IO.F90
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ Subroutine Initialize_Diagnostic_Info(self,computes,mpi_tag, &
Integer :: avg_axes(1:3), ecode
Integer, Allocatable :: indices(:,:)
Real*8, Allocatable :: avg_weights(:,:)
Character*8 :: cache_str, rec_str
Class(DiagnosticInfo) :: self

nonstandard=.false.
Expand Down Expand Up @@ -892,19 +893,21 @@ Subroutine Initialize_Diagnostic_Info(self,computes,mpi_tag, &


!Check that the cache size is appropriate
Write(cache_str,'(i8)')self%cache_size
Write(rec_str,'(i8)')self%rec_per_file
If (present(cache_size)) Then
If (cache_size .ge. 1) Then
self%cache_size = cache_size
Endif
Endif
If (self%cache_size .lt. 1) Then
If (myid .eq. 0) Then
Write(6,*)'////////////////////////////////////////////////////////////////////'
Write(6,*)' Warning: Incorrect cache_size specification for ',self%file_prefix
Write(6,*)' Cache_size must be at least 1.'
Write(6,*)' Specified cache_size: ', self%cache_size
Write(6,*)' Caching has been deactivated for ', self%file_prefix
Write(6,*)'////////////////////////////////////////////////////////////////////'
Call stdout%print('////////////////////////////////////////////////////////////////////')
Call stdout%print(' Warning: Incorrect cache_size specification for '//TRIM(ADJUSTL(self%file_prefix)))
Call stdout%print(' Cache_size must be at least 1.')
Call stdout%print(' Specified cache_size: '//TRIM(ADJUSTL(cache_str)) )
Call stdout%print(' Caching has been deactivated for '//TRIM(ADJUSTL(self%file_prefix)) )
Call stdout%print('////////////////////////////////////////////////////////////////////')
Endif
self%cache_size = 1
Endif
Expand All @@ -913,13 +916,13 @@ Subroutine Initialize_Diagnostic_Info(self,computes,mpi_tag, &
If (modcheck .ne. 0) Then

If (myid .eq. 0) Then
Write(6,*)'////////////////////////////////////////////////////////////////////'
Write(6,*)' Warning: Incorrect cache_size specification for ',self%file_prefix
Write(6,*)' Cache_size cannot be larger than nrec.'
Write(6,*)' Cache_size: ', self%cache_size
Write(6,*)' nrec : ', self%rec_per_file
Write(6,*)' Cache_size has been set to nrec.'
Write(6,*)'////////////////////////////////////////////////////////////////////'
Call stdout%print('////////////////////////////////////////////////////////////////////')
Call stdout%print(' Warning: Incorrect cache_size specification for '//TRIM(ADJUSTL(self%file_prefix)) )
Call stdout%print(' Cache_size cannot be larger than nrec.')
Call stdout%print(' Cache_size: '//TRIM(ADJUSTL(cache_str)))
Call stdout%print(' nrec : '//TRIM(ADJUSTL(rec_str)))
Call stdout%print(' Cache_size has been set to nrec.')
Call stdout%print('////////////////////////////////////////////////////////////////////')
Endif
self%cache_size = self%rec_per_file
Endif
Expand All @@ -930,13 +933,13 @@ Subroutine Initialize_Diagnostic_Info(self,computes,mpi_tag, &
If (modcheck .ne. 0) Then

If (myid .eq. 0) Then
Write(6,*)'////////////////////////////////////////////////////////////////////'
Write(6,*)' Warning: Incorrect cache_size specification for ',self%file_prefix
Write(6,*)' Cache_size must divide evenly into nrec.'
Write(6,*)' Cache_size: ', self%cache_size
Write(6,*)' nrec : ', self%rec_per_file
Write(6,*)' Caching has been deactivated for ', self%file_prefix
Write(6,*)'////////////////////////////////////////////////////////////////////'
Call stdout%print('////////////////////////////////////////////////////////////////////')
Call stdout%print(' Warning: Incorrect cache_size specification for '//TRIM(ADJUSTL(self%file_prefix)) )
Call stdout%print(' Cache_size must divide evenly into nrec.')
Call stdout%print(' Cache_size: '//TRIM(ADJUSTL(cache_str)))
Call stdout%print(' nrec : '//TRIM(ADJUSTL(rec_str)))
Call stdout%print(' Caching has been deactivated for '//TRIM(ADJUSTL(self%file_prefix)) )
Call stdout%print('////////////////////////////////////////////////////////////////////')
Endif
self%cache_size = 1
Endif
Expand Down Expand Up @@ -1295,13 +1298,18 @@ Subroutine CloseFile_Par(self)
Implicit None
integer :: ierr, buffsize
integer(kind=MPI_OFFSET_KIND) :: disp
Character*8 :: err_str, id_str
!Parallel File Close
!Peforms the same task as closefile, but using MPI-IO
Class(DiagnosticInfo) :: self
disp = 8
Call MPI_File_Seek(self%file_unit,disp,MPI_SEEK_SET,ierr)

If (ierr .ne. 0) Then
Write(6,*)'Error rewinding to header. Error code: ', ierr, myid, self%file_prefix
Write(err_str,'(i8)')ierr
Write(id_str,'(i8)')myid
Call stdout%print('Error rewinding to header. Error code: '//TRIM(err_str)//','//TRIM(id_str)//self%file_prefix)

Endif
! Without this barrier, the record update below can occurs before some ranks
! have read the original record count (leading to oversized, corrupted files).
Expand All @@ -1312,10 +1320,14 @@ Subroutine CloseFile_Par(self)

call MPI_FILE_WRITE(self%file_unit,self%current_rec , buffsize, MPI_INTEGER, &
MPI_STATUS_IGNORE, ierr)
If (ierr .ne. 0) Write(6,*)'Error writing to header. Error code: ', ierr, myid, self%file_prefix
If (ierr .ne. 0) Then
Call stdout%print('Error writing to header. Error code: '//TRIM(err_str)//','//TRIM(id_str)//self%file_prefix)
Endif
Endif
Call MPI_FILE_CLOSE(self%file_unit, ierr)
If (ierr .ne. 0) Write(6,*)'Error closing file. Error code: ',ierr, myid, self%file_prefix
If (ierr .ne. 0) Then
Call stdout%print('Error closing file. Error code: '//TRIM(err_str)//','//TRIM(id_str)//self%file_prefix)
Endif
End Subroutine CloseFile_Par

Subroutine getq_now(self,yesno)
Expand Down
6 changes: 3 additions & 3 deletions src/Makefile.fdeps
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
All_to_All.o : All_to_All.F90 Ra_MPI_Base.o
Benchmarking.o : Benchmarking.F90 Initial_Conditions.o BoundaryConditions.o Math_Constants.o PDE_Coefficients.o Legendre_Polynomials.o Fields.o Spherical_IO.o Controls.o ProblemSize.o
Benchmarking.o : Benchmarking.F90 BufferedOutput.o Initial_Conditions.o BoundaryConditions.o Math_Constants.o PDE_Coefficients.o Legendre_Polynomials.o Fields.o Spherical_IO.o Controls.o ProblemSize.o
BoundaryConditions.o : BoundaryConditions.F90 Controls.o Checkpointing.o PDE_Coefficients.o Generic_Input.o Load_Balance.o Fields.o ProblemSize.o Math_Constants.o
BufferedOutput.o : BufferedOutput.F90
Chebyshev_Polynomials.o : Chebyshev_Polynomials.F90 Structures.o
Expand Down Expand Up @@ -39,7 +39,7 @@ Fourier_Derivatives.o : Fourier_Derivatives.F90
Fourier_Transform.o : Fourier_Transform.F90 Parallel_Framework.o
General_IO.o : General_IO.F90 General_MPI.o Parallel_Framework.o
General_MPI.o : General_MPI.F90 Ra_MPI_Base.o
Generic_Input.o : Generic_Input.F90 ProblemSize.o SendReceive.o Load_Balance.o Spherical_Buffer.o Parallel_Framework.o Ra_MPI_Base.o
Generic_Input.o : Generic_Input.F90 BufferedOutput.o ProblemSize.o SendReceive.o Load_Balance.o Spherical_Buffer.o Parallel_Framework.o Ra_MPI_Base.o
ISendReceive.o : ISendReceive.F90 Ra_MPI_Base.o
Initial_Conditions.o : Initial_Conditions.F90 Load_Balance.o BufferedOutput.o Math_Utility.o Linear_Solve.o ClockInfo.o BoundaryConditions.o PDE_Coefficients.o General_MPI.o Timers.o Controls.o Generic_Input.o Checkpointing.o Math_Constants.o SendReceive.o Legendre_Transforms.o Fourier_Transform.o Parallel_Framework.o Fields.o ProblemSize.o
Input.o : Input.F90 MPI_LAYER.o Ra_MPI_Base.o Checkpointing.o Parallel_Framework.o PDE_Coefficients.o TestSuite.o Initial_Conditions.o BoundaryConditions.o Spherical_IO.o Controls.o ProblemSize.o
Expand Down Expand Up @@ -68,7 +68,7 @@ Sphere_Hybrid_Space.o : Sphere_Hybrid_Space.F90 indices.F PDE_Coefficients.o Clo
Sphere_Linear_Terms.o : Sphere_Linear_Terms.F90 Math_Constants.o PDE_Coefficients.o ClockInfo.o Timers.o BoundaryConditions.o Fields.o Linear_Solve.o ProblemSize.o Controls.o Load_Balance.o
Sphere_Physical_Space.o : Sphere_Physical_Space.F90 indices.F Benchmarking.o Math_Constants.o PDE_Coefficients.o ClockInfo.o Timers.o General_MPI.o Diagnostics_Interface.o Fields.o Spectral_Derivatives.o Fourier_Transform.o ProblemSize.o Controls.o Parallel_Framework.o
Sphere_Spectral_Space.o : Sphere_Spectral_Space.F90 Sphere_Linear_Terms.o Timers.o ClockInfo.o BoundaryConditions.o Fields.o Linear_Solve.o Finite_Difference.o ProblemSize.o Controls.o Parallel_Framework.o Load_Balance.o
Spherical_Buffer.o : Spherical_Buffer.F90 Timers.o General_MPI.o Load_Balance.o Structures.o Parallel_Framework.o MPI_LAYER.o
Spherical_Buffer.o : Spherical_Buffer.F90 BufferedOutput.o Timers.o General_MPI.o Load_Balance.o Structures.o Parallel_Framework.o MPI_LAYER.o
Spherical_IO.o : Spherical_IO.F90 Ra_MPI_Base.o Parallel_IO.o MakeDir.o Math_Constants.o BufferedOutput.o Legendre_Transforms.o Fourier_Transform.o General_MPI.o ISendReceive.o SendReceive.o Parallel_Framework.o Spherical_Buffer.o
Structures.o : Structures.F90
TestSuite.o : TestSuite.F90 ProblemSize.o Test_Cheby.o Test_SHT.o
Expand Down
4 changes: 1 addition & 3 deletions src/Math_Layer/Chebyshev_Polynomials.F90
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,7 @@ Subroutine dealias_buffer4d(self, buffer)
Integer :: bsize(4), i,j,k,n,offset, ind1,ind2

bsize = shape(buffer)
!do n = 1, self%domain_count
! WRite(6,*)'da check: ', self%rda(n), self%npoly(n)
!Enddo

Do k = 1, bsize(4)
Do j = 1, bsize(3)
Do i = 1, bsize(2)
Expand Down
5 changes: 2 additions & 3 deletions src/Math_Layer/Finite_Difference.F90
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Subroutine d_by_dx3d(field, dfield)
stencil_radius = stencil_size/2
stencil_center = stencil_radius+1
offset = (N_S-stencil_size)/2
Write(6,*)'I am in and dorder is : ', d

Do jj = jjmin, jjmax
Do ii = iimin, iimax

Expand Down Expand Up @@ -543,7 +543,7 @@ Subroutine Generate_Coefs(grid,n_stencil,coefs,deriv_order, boundary_accuracy)
!
! Currently only type 1 is supported by the derivative routines and Implicit.F
!*****************************************************************************************************
!Write(6,*)deriv_order

ngrid = Size(grid)
stencil_radius = n_stencil/2
stencil_center = stencil_radius+1
Expand Down Expand Up @@ -594,7 +594,6 @@ Subroutine Generate_Coefs(grid,n_stencil,coefs,deriv_order, boundary_accuracy)
dsum = zero

Do j = jstart, jend
!Write(6,*)i,jstart,jend,stencil_center
dees(j) = grid(i+j-stencil_center)-grid(i)
dsum = dsum+ABS(dees(j))
Enddo
Expand Down
4 changes: 1 addition & 3 deletions src/Math_Layer/Fourier_Transform.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ Subroutine Initialize_FFTs()
!Note that when using MKL, iret will be 0 always.
!iret = 0 means an error when using normal FFTW, but for MKL
! This routine is a wrapper that does nothing.
!write(6,*)"iret is: ", iret
! comment
!write(6,*)"FFTW planning with nthreads: ", nthread

call dfftw_plan_with_nthreads(nthread)
Endif
#endif
Expand Down
1 change: 0 additions & 1 deletion src/Math_Layer/Legendre_Polynomials.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ Subroutine DeAllocate_Plms(depar)
Endif
If (present(depar)) Then
If (depar .and. parity) Then
Write(6,*)'DeAllocating Parity Arrays'
Call DeAllocate_Parity_Plms()
Endif
Endif
Expand Down
2 changes: 1 addition & 1 deletion src/Math_Layer/Legendre_Transforms.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ Subroutine StP_4d_dgp2(data_in, data_out)
If (n_l_even(m) .gt. 0) then

jend = n_l_even(m)
!write(6,*)jend,rmn,rmx,nfield

Allocate(temp3(1:jend,rmn:rmx,1:2,1:nfield))
Do f = 1, nfield
Do imi = 1, 2
Expand Down
Loading