Skip to content

Commit

Permalink
Passing compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
andyandreolli committed Jun 9, 2022
1 parent 7896d0c commit e42fce9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions channel.f90
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ PROGRAM channel
#endif
! Write runtime file
CALL outstats()
#ifdef runtimestats
IF (rtstats_savenow) THEN
CALL runtime_save()
rtstats_savenow = .FALSE.
END IF
#endif
#ifdef chron
CALL CPU_TIME(timee)
IF (has_terminal) WRITE(*,*) timee-timei
Expand Down
10 changes: 7 additions & 3 deletions dnsdata.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ MODULE dnsdata
integer(C_SIZE_T) :: istep,nstep,ifield
real(C_DOUBLE) :: fr(1:3)
logical :: prev_was_close = .FALSE.
#ifdef runtimestats
integer :: rtstats_savenow = .FALSE.
#endif
!Restart file
character(len=40) :: fname
!Convection velocity calculation
Expand All @@ -84,7 +87,8 @@ MODULE dnsdata
integer(C_LONG) :: convvel_cnt=-1
logical, save :: compute_convvel=.FALSE.
#endif
logical::rtd_exists ! flag to check existence of Runtimedata
logical::rtd_exists ! flag to check existence of Runtimedata



CONTAINS
Expand Down Expand Up @@ -876,9 +880,9 @@ SUBROUTINE outstats()
IF ( time+deltat >= (ifield+1)*dt_field ) THEN ! fast evaluation
IF ( prev_was_close .OR. ((FLOOR((time+0.5*deltat)/dt_field) > FLOOR((time-0.5*deltat)/dt_field)) .AND. (time>time0)) ) THEN ! accurate evaluation
#ifdef runtimestats
call runtime_save()
rtstats_savenow = .TRUE.
#endif
#ifndef runtimestats
#ifndef runtime_avoid_savefld
ifield=ifield+1; WRITE(istring,*) ifield
IF (has_terminal) WRITE(*,*) "Writing Dati.cart."//TRIM(ADJUSTL(istring))//".out at time ", time
filename="Dati.cart."//TRIM(ADJUSTL(istring))//".out"; CALL save_restart_file(filename,V)
Expand Down
3 changes: 2 additions & 1 deletion header.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
! exactly with different parallelisations. Useful for
! testing.
!#define no_optimising_code
! File for runtime calculation and disk dump of statistics
! Files and settings for runtime calculation and disk dump of statistics
#define runtime_avoid_savefld
#define HEADER_RUNTIME "runtime_plugin/instabudget/header.inc"
#define RUNTIME_SETUP_SUBROUTINE "runtime_plugin/instabudget/setup.inc"
#define RUNTIME_FINALISE_SUBROUTINE "runtime_plugin/instabudget/finalise.inc"
Expand Down

0 comments on commit e42fce9

Please sign in to comment.