Ignore:
Timestamp:
07/25/19 11:36:36 (5 years ago)
Author:
adurocher
Message:

Merge 'profiling' to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/time/timeloop_gcm.F90

    r953 r962  
    4545    IF (.NOT. enable_io) itau_out=HUGE(itau_out) 
    4646 
    47     itau_prof=100 
     47    itau_prof=1000 
    4848    CALL getin('itau_profiling',itau_prof) 
    4949 
     
    257257    CALL update_device_field(f_wflux) 
    258258    CALL update_device_field(f_rhodz) 
     259    call reset_profiling()   
    259260 
    260261 
    261262    DO it=itau0+1,itau0+itaumax 
    262        IF (is_master) CALL print_iteration(it, itau0, itaumax, start_clock, rate_clock) 
     263       CALL print_iteration(it, itau0, itaumax, start_clock, rate_clock) 
    263264 
    264265       CALL enter_profile(id_timeloop) 
     
    432433    INTEGER(kind=8) :: start_clock, stop_clock, rate_clock 
    433434    REAL :: per_step,total, elapsed 
    434     WRITE(*,'(A,I7,A,F14.1)') "It No :",it,"   t :",dt*it 
    435     IF(MOD(it,10)==0) THEN 
    436        CALL SYSTEM_CLOCK(stop_clock) 
    437        elapsed = (stop_clock-start_clock)*1./rate_clock 
    438        per_step = elapsed/(it-itau0) 
    439        throughput = INT(dt/per_step) 
    440        total = per_step*itaumax 
    441        WRITE(*,'(A,I5,A,F6.2,A,I6)') 'Time spent (s):',INT(elapsed), & 
    442             '  -- ms/step : ', 1000*per_step, & 
    443             '  -- Throughput :', throughput 
    444        WRITE(*,'(A,I5,A,I5)') 'Whole job (min) :', INT(total/60.), & 
    445             '  -- Completion in (min) : ', INT((total-elapsed)/60.) 
     435     
     436    IF(is_master) THEN 
     437       WRITE(*,'(A,I7,A,F14.1)') "It No :",it,"   t :",dt*it 
     438       IF(MOD(it,10)==0) THEN 
     439          CALL SYSTEM_CLOCK(stop_clock) 
     440          elapsed = (stop_clock-start_clock)*1./rate_clock 
     441          per_step = elapsed/(it-itau0) 
     442          throughput = INT(dt/per_step) 
     443          total = per_step*itaumax 
     444          WRITE(*,'(A,I5,A,F6.2,A,I6)') 'Time spent (s):',INT(elapsed), & 
     445               '  -- ms/step : ', 1000*per_step, & 
     446               '  -- Throughput :', throughput 
     447          WRITE(*,'(A,I5,A,I5)') 'Whole job (min) :', INT(total/60.), & 
     448               '  -- Completion in (min) : ', INT((total-elapsed)/60.) 
     449       END IF 
    446450    END IF 
    447451    IF(MOD(it,itau_prof)==0) CALL print_profile 
Note: See TracChangeset for help on using the changeset viewer.