Changeset 1137 for XIOS/trunk/make_xios


Ignore:
Timestamp:
05/18/17 17:26:56 (4 years ago)
Author:
ymipsl
Message:

Add "light" memory tracking which must be activated at compile time : make_xios --memtrack light

  • report at info level 10 : max memory consumption and the current memory consumption at the end of exection
  • info at info level 50 : at each timestep, the current memory consumption is printed

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/make_xios

    r984 r1137  
    4747         "--job")   job=$2              ; shift ; shift ;; 
    4848         "--netcdf_lib")   netcdf_lib=$2 ; shift ; shift ;; 
    49          "--memtrack")   use_memtrack="true" ; shift ;; 
     49         "--memtrack")  use_memtrack="true" memtrack=$2  ; shift ; shift ;; 
    5050         *)         code="$1"           ; shift ;; 
    5151      esac 
     
    172172if [[ "$use_memtrack" == "true" ]] 
    173173   then 
    174    XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 
    175174   XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 
     175 
     176    if [[ "$memtrack" == "light" ]] 
     177    then 
     178        XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 
     179    elif [[ "$memtrack" == "FULL"  ]] 
     180    then 
     181      XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 
     182      XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL" 
     183    else 
     184        echo "Bad choice for --memtrack argument : choose between 'light','full'" 
     185        exit 
     186    fi 
    176187fi  
    177188 
Note: See TracChangeset for help on using the changeset viewer.