Ignore:
Timestamp:
May 3, 2024, 3:51:25 PM (7 months ago)
Author:
abarral
Message:

fix adastra env names
add cosp & ecrad to tests
cleanup install
fix bench for adastra

Location:
BOL/script_install_amaury
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install_amaury/install_lmdz.sh

    r4922 r4929  
    5555    netcdf=1
    5656    bench=1
    57     pcmac=0 # default: not on a Mac
    5857    SCM=0
    5958    veget="none"
     
    6160    physiq=""
    6261
    63     xios_branch="2.6"
    64     xios_rev="2568"
    65 
    6662    parallel="none"
    6763    trusting="testing"
     
    7672
    7773    cosp="none"
    78     opt_cosp=""
    7974
    8075    make_j=8
    8176
    82     # Check if on a Mac
     77    # Check if on a Mac /!\ Probably doesn't work anymore, to fix one day...
    8378    if [[ $(uname) = "Darwin" ]]; then
    84         pcmac=1
    8579        export MAKE="make"
    8680    fi
     
    116110        -bench     activating the bench or not (0/1) (default: <$bench>)
    117111
    118         -testing/unstable
     112        -unstable  use unstable tar instead of testing
    119113
    120114        -name      name of the folder to install to (default <$MODEL>)
     
    134128        -debug      compile everything in debug mode
    135129
    136         -physiq     to choose which physics package to use (default <$physiq>)
     130        -physiq     to choose which physics package to use in the bench (default <$physiq>)
    137131
    138132        -veget      surface/vegetation scheme treatment controlled by the single variable veget which can have the following values: none: bucket scheme (default); CMIP6 | veget2.0: orchidee version used in CMIP exercise, rev 5661; veget2.2: orchidee branch 2.2, rev 8529 (bundled); number: orchidee version number (default $veget)
     
    149143            "-r") svn_lmdz=$2; shift; shift;;
    150144            "-d") grid_resolution=$2; shift; shift;;
    151             "-unstable"|"-testing") trusting=$(echo "$1" | cut -c2-); shift;;
     145            "-unstable") trusting="unstable"; shift;;
    152146            "-cosp") cosp=$2
    153147                     case $cosp in
     
    467461
    468462        # Download XIOS
    469         case $xios_branch in
    470             "trunk")
    471             xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS/trunk";;
    472             "2.5")
    473             xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS2/branches/xios-2.5";;
    474             "2.6")
    475             xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS2/branches/xios-2.6";;
    476             *) echo "XIOS: Error, bad argument for -branch ! Did not expect $xios_branch"; exit 1;;
    477         esac
     463        local xios_http="http://forge.ipsl.fr/ioserver/svn/XIOS2/branches/xios-2.6"
     464        local xios_rev="2568"
    478465       
    479466        cd "$MODEL/modipsl/modeles"
    480         set +e; svn co --revision $xios_rev $xios_http XIOS; set -e
     467        set +e; svn co -r $xios_rev $xios_http XIOS; set -e
    481468
    482469        cd XIOS
     
    749736        cd "BENCH${grid_resolution}"
    750737
     738        local bench_cmd="./bench.sh"
    751739        if [[ ${parallel:0:3} = "mpi" ]]; then
    752740            # Lancement avec deux procs mpi et 2 openMP
     
    755743                echo "export OMP_NUM_THREADS=2" >> bench.sh
    756744            fi
    757             if [[ "$cosp" = "v1" || "$cosp" = "v2" ]]; then
     745            if [[ $cosp = "v1" || $cosp = "v2" ]]; then
    758746                echo "ulimit -s 200000" >> bench.sh
    759747            else
    760748                echo "ulimit -s unlimited" >> bench.sh
    761749            fi
    762             echo "mpirun -np 2 gcm.e > listing  2>&1" >> bench.sh
     750            if which mpirun > /dev/null 2>&1; then
     751                echo "mpirun -np 2 gcm.e > listing 2>&1" >> bench.sh
     752            elif grep -q "Adastra" /etc/motd; then
     753                local account
     754                account=$(/usr/sbin/my_project.py -l 2>&1 | head -1 | cut -d " " -f 3- | cut -c 5-)
     755                bench_cmd="srun --nodes=1 --ntasks=1 --cpus-per-task=2 --threads-per-core=2 --time=0:10:00 --constraint=GENOA --account=$account bash bench.sh"
     756                echo "./gcm.e > listing 2>&1" >> bench.sh
     757            else
     758                echo "Error: No command found to run parallel bench"; exit 1
     759            fi
    763760            # Add rebuild, using reb.sh if it is there
    764761            cat <<EOF >> bench.sh
    765     if [[ -f reb.sh ]]; then
    766       ./reb.sh histday; ./reb.sh histmth; ./reb.sh histhf;
    767       ./reb.sh histins; ./reb.sh stomate_history;
    768       ./reb.sh sechiba_history; ./reb.sh sechiba_out_2
    769     fi
     762if [[ -f reb.sh ]]; then
     763  ./reb.sh histday; ./reb.sh histmth; ./reb.sh histhf;
     764  ./reb.sh histins; ./reb.sh stomate_history;
     765  ./reb.sh sechiba_history; ./reb.sh sechiba_out_2
     766fi
    770767EOF
    771768        else
    772             echo "./gcm.e > listing  2>&1" > bench.sh
     769            echo "./gcm.e > listing 2>&1" > bench.sh
    773770        fi
    774771        # Getting orchidee stuff
     
    816813        echo "EXECUTION DU BENCH"
    817814        date
    818         if (! ./bench.sh > out.bench 2>&1) || ! (tail -n 1 listing | grep "Everything is cool"); then
     815        if (! $bench_cmd > out.bench 2>&1) || ! (tail -n 1 listing | grep "Everything is cool"); then
    819816            tail listing
    820817            echo "Bench FAILED, exiting"; exit 1
  • BOL/script_install_amaury/test_compils.sh

    r4917 r4929  
    1414        args="$args-parallel"
    1515    fi
    16     args="$args -rad $rad -parallel $parallel -netcdf 0 -veget $veget $xios $lmdzrev"
     16    args="$args -rad $rad -parallel $parallel -netcdf 0 -veget $veget $xios $lmdzrev $cosp"
    1717    # trim
    1818    args=$(echo "$args" | xargs)
     
    3737function run_all_tests {
    3838    for parallel in "none" "mpi_omp"; do
    39     for rad in "oldrad" "rrtm"; do
     39    for rad in "oldrad" "rrtm" "ecrad"; do
    4040    for veget in "none" "orch2.0" "orch2.2"; do
    4141    for xios in "" "-xios"; do
    42     if [[ $xios = "-xios" && $parallel = "none" ]]; then continue; fi
     42      if [[ $xios = "-xios" && $parallel = "none" ]]; then continue; fi
    4343    for lmdzrev in "" "-r 4894"; do  # TODO when base lmdz becomes >=4894, change condition for lmdzrev=""
    4444        if [[ (! $veget = "none") && ($parallel = "none") && ($(echo "$lmdzrev" | cut -c 4-) -lt 4894) ]]; then continue; fi
     45    for cosp in "" "-cosp v1" "-cosp v2"; do
    4546        do_one_test
     47    done
    4648    done
    4749    done
Note: See TracChangeset for help on using the changeset viewer.