Changeset 5637


Ignore:
Timestamp:
2015-07-27T20:10:53+02:00 (5 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Deal with use or not of environment modules system

Location:
branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting.sh

    r5634 r5637  
    66NEMO_TRUS=$( pwd $( dirname $0 ) ) 
    77DEBUG=0; PUBLISH=0 
    8 ST='FAILED' ## 'FAILED' by default 
     8I_MODULE=0      ## No 'module' command by default 
     9ST='FAILED'     ## 'FAILED'            ""   " "   
    910 
    1011## Get options for replacing some initials settings 
     
    5657print_step 'Get softwares release' 
    5758[ -e ${ARCH_ENV} ] && . ${ARCH_ENV} > /dev/null 
     59[ $? -eq 0 ] && I_MODULE=1 
     60export I_MODULE 
    5861get_soft_rel 
    5962cat model.log 
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh

    r5636 r5637  
    101101get_soft_rel() { 
    102102    for soft in $CDO $COMPILER $MPI $NETCDF; do 
    103                                 soft_rel=$( echo $LOADEDMODULES | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" ) 
    104    [ -z "${soft_rel}"  ] && soft_rel=$( echo $PATH          | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" ) 
    105    [ "$soft" == "$COMPILER" ] && soft_rel=$( $soft --version | grep -m1 -oe '\<[0-9. ]*\>' ) 
     103        ((   ${I_MODULE} == 1   )) && soft_rel=$( echo $LOADEDMODULES | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" ) 
     104   [    -z "${soft_rel}"    ] && soft_rel=$( echo $PATH          | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" ) 
     105   [ "$soft" == "$COMPILER" ] && soft_rel=$( $soft --version     | grep -m1 -oe '\<[0-9. ]*\>'          ) 
    106106   ## Not working inside CURIE cron (cdo embedded in netcdf-*) 
    107107#  [[ "$soft" == "$CDO"    && -z "${soft_rel}" ]] && soft_rel=$( echo $PATH | grep -o "netcdf-utils[^/]*" ) 
Note: See TracChangeset for help on using the changeset viewer.