Changeset 4914 for BOL/script_install_amaury
- Timestamp:
- Apr 22, 2024, 2:53:30 PM (7 months ago)
- Location:
- BOL/script_install_amaury
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install_amaury/install_lmdz.sh
r4909 r4914 26 26 # minimal configuration. 27 27 # 28 # Prerequisites : pgf90/gfortran, bash or ksh, wget, gunzip, tar, ...28 # Prerequisites : gfortran, bash or ksh, wget, gunzip, tar, ... 29 29 # 30 30 # Modif 18/11/2011 … … 50 50 function set_default_params { 51 51 # Valeur par défaut des parametres 52 svn =""52 svn_lmdz="" 53 53 version="20231022.trunk" 54 54 … … 108 108 -v "version" like 20150828.trunk, see http://www.lmd.jussieu.fr/~lmdz/Distrib/LISMOI.trunk (default <$version>) 109 109 110 -r "svn_release" : either the svn release number or "last" (default <$svn >)110 -r "svn_release" : either the svn release number or "last" (default <$svn_lmdz>) 111 111 112 112 -parallel parallel support: mpi, omp, mpi_omp (mpi with openMP) or none (default: <$parallel>) … … 147 147 exit 1;; 148 148 "-v") version=$2; shift; shift;; 149 "-r") svn =$2; shift; shift;;149 "-r") svn_lmdz=$2; shift; shift;; 150 150 "-d") grid_resolution=$2; shift; shift;; 151 151 "-unstable"|"-testing") trusting=$(echo "$1" | cut -c2-); shift;; … … 211 211 212 212 #Chemin pour placer le modele 213 if [[ $MODEL = "" ]]; then MODEL="./LMDZ$version$svn $optim_debug"; fi213 if [[ $MODEL = "" ]]; then MODEL="./LMDZ$version$svn_lmdz$optim_debug"; fi 214 214 215 215 ## if also compiling XIOS, parallel must be mpi_omp … … 350 350 351 351 # Convert non-basic compiler 352 case $compiler in # TODO test with pgf90353 mpif90) ncdf_compiler=$($compiler 2> <(head -n 1 | cut -f 1 -d ":"))352 case $compiler in 353 mpif90) ncdf_compiler=$($compiler 2>&1 >/dev/null | head -n 1 | cut -f 1 -d ":") 354 354 esac 355 355 356 356 case $ncdf_compiler in 357 357 gfortran) opt1="-compiler gnu"; opt2="-CC gcc -FC gfortran -CXX g++";; 358 ifort) opt1="-compiler intel"; opt2="-CC icc -FC ifort -CXX icpc";;359 pgf90) opt1="-compiler pgf90"; opt2="-CC pgcc -FC pgf90 -CXX pgCC";;360 358 *) echo "unexpected compiler $ncdf_compiler for netcdf"; exit 1 361 359 esac … … 505 503 if [[ -n $fetch_rev ]]; then 506 504 echo "Fetching orch $fetch_rev from the repository" 507 orcbranch=$(svn log -v -q svn://forge.ipsl.jussieu.fr/orchidee/ -r "$fetch_rev" | grep ORCHIDEE |head -1| sed -e 's:ORCHIDEE/.*$:ORCHIDEE:' | awk '{print $2}')505 orcbranch=$(svn log -v -q svn://forge.ipsl.jussieu.fr/orchidee/ -r "$fetch_rev" | grep ORCHIDEE | head -1 | sed -e 's:ORCHIDEE/.*$:ORCHIDEE:' | awk '{print $2}') 508 506 echo "branch is $orcbranch" 509 507 if [[ $fetch_rev -lt 4465 ]]; then echo 'ORCHIDEE version must be >=4465, exiting'; exit 1; fi … … 516 514 cd - 517 515 fi 516 517 518 # Check parallel LMDZ+ORCH 519 if [[ (! $veget = "none") && (! $parallel = "none") && ($used_lmdz_rev -lt 4894) ]]; then 520 echo "LMDZ revision must be >=4894 for orchidee with parallel support"; exit 1 521 fi 518 522 } 519 523 520 524 function compile_orchidee { 521 get_orchidee_version522 525 install_arch "ORCHIDEE" 523 526 … … 568 571 lmdzlog="$(pwd)/lmdz.log" 569 572 570 set +e 571 svn upgrade 572 if [[ $svn = "last" ]]; then 573 svnopt="" 574 else 575 svnopt="-r $svn" 576 fi 577 if [[ $svn != "" ]]; then 578 if svn info | grep -q 'https:'; then svn switch --relocate https://svn.lmd.jussieu.fr/LMDZ http://svn.lmd.jussieu.fr/LMDZ; fi 579 svn update "$svnopt" 580 fi 581 mysvn=$(svnversion . | grep -E -o "[0-9]+" 2>/dev/null) 582 set -e 583 584 if [[ $mysvn = "" ]]; then mysvn=$(grep 'Revision: [0-9]' "$MODEL"/Read*.md | awk ' { print $2 } ' 2>/dev/null); fi 585 if [[ $mysvn = "" ]]; then mysvn=4190; fi 573 used_lmdz_rev=$svn_lmdz 574 if [[ -n $svn_lmdz ]]; then 575 local lmdzbranch 576 echo "Fetching LMDZ $svn_lmdz from the repository" 577 lmdzbranch=$(svn log -v -q https://svn.lmd.jussieu.fr/LMDZ -r "$svn_lmdz" | grep LMDZ | head -1 | sed -e 's:trunk/.*$:trunk:' | awk '{print $2}') 578 \rm -rf "$MODEL/modipsl/modeles/LMDZ" 579 cd "$MODEL/modipsl/modeles" 580 set +e 581 svn co -r "$svn_lmdz" "https://svn.lmd.jussieu.fr/LMDZ$lmdzbranch" LMDZ 582 set -e 583 cd - 584 else # get svn from info 585 used_lmdz_rev=$(svn info | grep "Last Changed Rev" | cut -c 19-) 586 fi 586 587 } 587 588 588 589 function compile_lmdz { 589 get_lmdz_version590 590 install_arch "LMDZ" 591 cd "$LMDZPATH" 591 592 592 593 exe_name="bin/gcm_${grid_resolution}_phylmd_${rad}${suff_exe}${suff_orc}.e" … … 596 597 oldrad) iflag_rrtm=0; NSW=2; opt_rad="";; 597 598 rrtm) iflag_rrtm=1; NSW=6 598 if [[ $ mysvn-le 4185 ]]; then599 if [[ $used_lmdz_rev -le 4185 ]]; then 599 600 opt_rad="-rrtm true" 600 601 else … … 604 605 *) echo "Only oldrad rrtm ecrad for rad option"; exit 1 605 606 esac 606 if [[ $ mysvn-le 4185 && $rad = "ecrad" ]]; then607 if [[ $used_lmdz_rev -le 4185 && $rad = "ecrad" ]]; then 607 608 echo "ecrad only available for LMDZ rev starting with 4186 "; exit 1 608 609 fi … … 841 842 init_arch 842 843 check_available_software 844 get_lmdz_version 845 get_orchidee_version 843 846 install_netcdf 844 847 install_IOIPSL -
BOL/script_install_amaury/test_compils.sh
r4909 r4914 14 14 args="$args-parallel" 15 15 fi 16 args="$args -rad $rad -parallel $parallel -netcdf 0 -veget $veget $xios" 16 args="$args -rad $rad -parallel $parallel -netcdf 0 -veget $veget $xios $lmdzrev" 17 # trim 18 args=$(echo "$args" | xargs) 17 19 18 20 logfile="test_logs/$args.out" … … 38 40 for veget in "none" "orch2.0" "orch2.2"; do 39 41 for xios in "" "-xios"; do 40 if [[ $xios = "-xios" && $parallel = "none" ]]; then continue; fi 42 if [[ $xios = "-xios" && $parallel = "none" ]]; then continue; fi 43 for lmdzrev in "" "-r 4894"; do 41 44 do_one_test 45 done 42 46 done 43 47 done
Note: See TracChangeset
for help on using the changeset viewer.