Changeset 5533 for BOL/script_install


Ignore:
Timestamp:
Feb 11, 2025, 11:51:50 PM (40 hours ago)
Author:
fhourdin
Message:

Gestion de la compilation pour LMDZ_Setup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r5532 r5533  
    7070  local command=$2
    7171  local log
    72 
    7372  log="$(pwd)/$component.log"
     73
    7474  printf "#!/bin/bash\n%s\n" "$command" > compile.sh
    75   if [ $bench = 1 -o $bench = compile_only ] ; then
     75  if [ $component = LMDZ ] ; then echo "cd $PWD/bin ; ln -sf $exe_name_ gcm.e ; cd -" >> compile.sh ; fi
     76  # FHTBD : horrible verue à enlever ...
     77  # FHTBD : C'est pour creer le compile.sh même si on ne compile pas.
     78  if [ $bench = 1 -o $bench = compile_only -o $component != LMDZ ] ; then
    7679     echo "Compiling $component using $command (log: $log) $(date)"
    7780       chmod +x ./compile.sh
     
    806809
    807810    if [[ $used_lmdz_rev -le 4185 ]]; then
    808         exe_name="bin/${fortran_file}_${grid_resolution}_phy${compphysiq}_${suff_para}${suff_orc}${suff_aer}${suff_iso}.e"
     811        exe_name_="${fortran_file}_${grid_resolution}_phy${compphysiq}_${suff_para}${suff_orc}${suff_aer}${suff_iso}.e"
    809812    else
    810         exe_name="bin/${fortran_file}_${grid_resolution}_phy${compphysiq}_${rad}${suff_para}${suff_orc}${suff_aer}${suff_iso}.e"
    811     fi
     813        exe_name_="${fortran_file}_${grid_resolution}_phy${compphysiq}_${rad}${suff_para}${suff_orc}${suff_aer}${suff_iso}.e"
     814    fi
     815    exe_name=bin/$exe_name_
    812816
    813817    local opt_rad
     
    832836    do_compile_sh "LMDZ" "$jobcmd ./$makelmdz $opt_rad $opt_cosp $opt_makelmdz_xios $opt_aer $opt_inlandsis $opt_strataer $opt_isotopes -p $compphysiq -d ${grid_resolution} -v $fcm_veget_version $para_compile_opt $fortran_file"
    833837
     838
    834839    # Check executable
    835     if [[ ! -f $exe_name ]]; then
    836         echo "STOP: Compilation failed, can't find the executable"; exit 1
     840    # FHTBD : Nettoyer tout ça en douceur mais sans trainer
     841    if [ $bench = 1 -o $bench = compile_only ] ; then
     842        if [[ ! -f $exe_name ]]; then
     843            echo "STOP: Compilation failed, can't find the executable"; exit 1
     844        else
     845            echo "Compilation successful, the executable is $exe_name $(date)"
     846        fi
    837847    else
    838         echo "Compilation successful, the executable is $exe_name $(date)"
     848        echo "You should now be able to compile the model with command"
     849        echo "$MODEL/modipsl/modeles/LMDZ/compile.sh"
    839850    fi
    840851  fi
     
    12041215    # AJOUT TEMPOREAIRE LE 9 FEVRIER 2025 - FH (Horrible là)
    12051216    # Inutile de compiler LMDZ quand pas de bench
    1206 set -vx
    12071217    # A nettoyer apres discussion et choix sur les arch
    12081218    # Conservation des arch ayant servi à la compilation de LMDZ
     
    12241234    #%MAKE                make  # xios
    12251235    # qui semblent planter la compilation au moins avec LMDZ sur ricard :
     1236    cd $MODEL/modipsl/modeles/LMDZ/arch
    12261237    for f_ in arch-local-gfortran9-parallel.fcm arch-local.fcm ; do
    1227     sed -i'' -e '/FPP.*xios/d' -e '/MAKE.*xios/d' $MODEL/modipsl/modeles/LMDZ/arch/$f_  ; done
     1238        if [ -f $f_ ] ; then
     1239           sed -i'' -e '/FPP.*xios/d' -e '/MAKE.*xios/d' $f_
     1240        fi
     1241    done
     1242    cd -
    12281243    # FIN AJOUT TEMPORAIRE
    12291244    # ==========================================================
Note: See TracChangeset for help on using the changeset viewer.