Commit ddc7b424 authored by Juan Caneses Marin (nfc)'s avatar Juan Caneses Marin (nfc)
Browse files

Confirmed the correct implementation of the compute time estimation

parent 587f4c20
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ in%nz = 501, ! N

! Simulation conditions:
! =====================
in%Nparts = 100000,                                                              ! Total number of particles
in%Nparts = 80000,                                                              ! Total number of particles
in%Nsteps = 6000,                                                               ! Total number of time steps
in%dt     = 0.5E-7,                                                             ! Time step in [s]
in%zmax = +5.0,
+6 −4
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ INTEGER(i4) :: id
! CPU time at start and end of computation:
REAL(r8) :: tstart, tend
! openMP computational time:
DOUBLE PRECISION :: ostart, oend
DOUBLE PRECISION :: ostart, oend, oend_estimate
! Cyclotron resonance number change:
REAL(r8) :: df
! Main simulation variables:
@@ -369,10 +369,12 @@ TimeStepping: do j = 1,in%Nsteps
    ! =====================================================================
    id = OMP_GET_THREAD_NUM()
    if (id .EQ. 0) then        
      if (j .EQ. 10) then
        WRITE(*,*) 'Estimated compute time: ', in%Nsteps*tp/j
      if (j .EQ. 50) then
	oend_estimate = OMP_GET_WTIME()
        WRITE(*,*) 'Estimated compute time: ', in%Nsteps*(oend_estimate-ostart)/j,' [s]'
      end if
   end if

end do TimeStepping

! Record end time:
+2 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@

# Select input file:
# ===================================================
#INPUT_FILE="xp_IonSlowingDown.in"
INPUT_FILE="xp_Test.in"
INPUT_FILE="xp_IonSlowingDown.in"
#INPUT_FILE="xp_Test.in"

# Get repo directory:
# ===================================================