Changeset 4096 for LMDZ6/trunk


Ignore:
Timestamp:
Mar 14, 2022, 4:28:13 PM (2 years ago)
Author:
lguez
Message:

Add option -force_compile to makelmdz_fcm

Instead of asking the user to answer a question interactively, stop
makelmdz_fcm and inform of the possible use of option
-force_compile. The interactive question risked being hidden in
redirection of standard output.

Location:
LMDZ6/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/build_gcm

    r3647 r4096  
    55# the full path to where the 'fcm' command is to be found
    66
    7 if test -f '.lock'
    8   then
    9     echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
    10     echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
    11     echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
    12     echo "vous pouvez continuer en repondant oui."
    13     echo "Voulez-vous vraiment continuer?"
    14     echo ""
     7if [[ -f '.lock' && $force_compile == false ]]
     8then
    159    echo "WARNING: you are probably already compiling the model somewhere else."
    1610    echo "Wait until the first compilation is finished before launching this one."
    17     echo "If you are sure that you are not compiling elsewhere, just answer "
    18     echo "yes (or 'oui') to the question below to proceed."
    19     echo "Do you wish to continue?"
    20     read ouinon
    21     if [[ $ouinon == "oui" || $ouinon == "yes" ]]
    22         then
    23         echo OK
    24     else
    25         exit
    26     fi
    27 else
    28     echo "compiling..." > '.lock'
     11    echo "If you are sure that you are not compiling elsewhere,"
     12    echo "run makelmdz_fcm with option -force_compile"
     13    exit 1
    2914fi
     15
     16echo "compiling..." > '.lock'
    3017
    3118job=1
  • LMDZ6/trunk/makelmdz_fcm

    r3997 r4096  
    4444diagiso=false
    4545isotrac=false
     46force_compile=false
    4647
    4748arch_defined="FALSE"
     
    127128[-ext_src path]            : path to an additional set of routines to compile with the model
    128129[-arch_path path]          : path to architecture files (default: $arch_default_path)
     130[-force_compile]           : recompile although there seems to be an on-going compilation
    129131 -arch nom_arch            : target architecture
    130132 exec                      : executable to build
     
    242244      "-arch_path")
    243245          arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;;
     246
     247      "-force_compile")
     248          force_compile=true ; shift ;;
    244249
    245250      *)
     
    551556if [[ -f dimensions.h ]]
    552557then
    553   echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
    554   echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
    555   echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
    556   echo  vous pouvez continuer en repondant oui.
    557   echo "Voulez-vous vraiment continuer?"
    558   echo ""
    559   echo "WARNING: you are probably already compiling the model somewhere else."
    560   echo "Wait until the first compilation is finished before launching this one."
    561   echo "If you are sure that you are not compiling elsewhere, just answer "
    562   echo "yes (or 'oui') to the question below to proceed."
    563   echo "Do you wish to continue?"
    564   read reponse
    565   if [[ $reponse == "oui" || $reponse == "yes" ]]
    566   then
    567     \rm -f $LIBFGCM/grid/dimensions.h
    568   else
    569     exit
    570   fi
     558    if [[ $force_compile == true ]]
     559    then
     560        \rm -f $LIBFGCM/grid/dimensions.h
     561    else
     562        echo "WARNING: you are probably already compiling the model somewhere else."
     563        echo "Wait until the first compilation is finished before launching this one."
     564        echo "If you are sure that you are not compiling elsewhere, "
     565        echo "run makelmdz_fcm with option -force_compile"
     566        exit 1
     567    fi
    571568fi
    572569
Note: See TracChangeset for help on using the changeset viewer.