New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 5637 for branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh – NEMO

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

dev_r5092_CNRS_SETTE Deal with use or not of environment modules system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.