- Timestamp:
- Jul 20, 2022, 5:54:16 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install_lmdz_new.sh
r4217 r4218 19 19 # 20 20 # The sources of the models can be found in the "modeles" directory. 21 # In the present case, LMDZ, ORCHIDEE, and IOIPSL or XIOS (handling of input-outputs22 # using the NetCDF library).21 # In the present case, LMDZ, ORCHIDEE, and IOIPSL or XIOS (handling of 22 # input-outputs using the NetCDF library). 23 23 # 24 24 # The script downloads various source files (including a version of NetCDF) … … 56 56 save_pub_locally=0 57 57 if [ $save_pub_locally = 1 ] ; then # saving wget files on ~/LMDZ/pub 58 dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir ; cp -r `basename $1` $dir 58 dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir 59 cp -r `basename $1` $dir 59 60 fi 60 61 fi … … 197 198 "-compiler") compiler=$2 198 199 case $compiler in 199 "gfortran"|"ifort"|"pgf90") compiler=$2 ; shift ; shift ;; 200 *) echo "Only gfortran , ifort or pgf90 for the compiler option" ; exit 200 "gfortran"|"ifort"|"pgf90") compiler=$2 ; shift 201 shift ;; 202 *) echo "Only gfortran , ifort or pgf90 for the " \ 203 "compiler option" 204 exit 201 205 esac ;; 202 206 "-d") grid_resolution=$2 ; shift ; shift ;; … … 210 214 "-SCM") SCM=1 ; shift ;; 211 215 "-opt_makelmdz") OPT_MAKELMDZ="$2" ; shift ; shift ;; 212 "-rrtm") rrtm="$2" ; if [ "$2" = "false" ] ; then rad="oldrad" ; else rad="rrtm" ; fi ; shift ; shift ;; 216 "-rrtm") rrtm="$2" 217 if [ "$2" = "false" ] ; then 218 rad="oldrad" 219 else 220 rad="rrtm" 221 fi 222 shift ; shift ;; 213 223 "-rad") rad=$2 214 224 case $rad in … … 218 228 "-parallel") parallel=$2 219 229 case $parallel in 220 "none"|"mpi"|"omp"|"mpi_omp") parallel=$2 ; shift ; shift ;; 221 *) echo Only none mpi omp mpi_omp for the parallel option ; exit 230 "none"|"mpi"|"omp"|"mpi_omp") parallel=$2 ; shift 231 shift ;; 232 *) echo Only none mpi omp mpi_omp for the parallel \ 233 option 234 exit 222 235 esac ;; 223 236 "-bench") bench=$2 ; shift ; shift ;; … … 233 246 done 234 247 235 # Option de compilation du rayonnement : depend de $mysvn ><= r4185, sera donc definie plus bas 248 # Option de compilation du rayonnement : depend de $mysvn ><= r4185, 249 # sera donc definie plus bas 250 236 251 #opt_rad="" 237 252 #case $rad in … … 261 276 if [ "$veget" = 'NONE' ] ; then 262 277 suff_orc='' 263 #For use with tutorial, orchidee_rev is also defined (will be written in surface_env at the end of the script) 278 #For use with tutorial, orchidee_rev is also defined (will be 279 #written in surface_env at the end of the script) 264 280 orchidee_rev='' 265 281 else … … 268 284 269 285 270 if [ $parallel = none ] ; then sequential=1; suff_exe='_seq' ; else sequential=0; suff_exe='_para_mem' ; fi 286 if [ $parallel = none ] ; then 287 sequential=1; suff_exe='_seq' 288 else 289 sequential=0; suff_exe='_para_mem' 290 fi 271 291 272 292 #Chemin pour placer le modele … … 418 438 BASE_LD="$OPT_GPROF" 419 439 OPTPREC="$OPT_GPROF" 420 ARFLAGS="rs" ; if [ -f /etc/issue ] ; then if [ "`grep -i ubuntu /etc/issue`" != "" ] ; then if [ "`grep -i ubuntu /etc/issue | awk ' { print $2 } ' | cut -d. -f1`" -ge 16 ] ; then ARFLAGS="rU" ; fi ; fi ; fi 440 ARFLAGS="rs" 441 if [ -f /etc/issue ] ; then 442 if [ "`grep -i ubuntu /etc/issue`" != "" ] ; then 443 if [ "`grep -i ubuntu /etc/issue | awk ' { print $2 } ' | cut -d. -f1`" -ge 16 ] 444 then 445 ARFLAGS="rU" 446 fi 447 fi 448 fi 421 449 422 450 … … 428 456 fmod='I ' 429 457 OPTPREC="$OPTPREC -cpp -ffree-line-length-0" 430 if [ $real = r8 ] ; then OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE" ; fi 458 if [ $real = r8 ] ; then 459 OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE" 460 fi 431 461 export F90FLAGS=" -ffree-form $OPTIMNC" 432 462 export FFLAGS=" $OPTIMNC" … … 441 471 BASE_LD="$BASE_LD -lblas" 442 472 fmod='I ' 443 if [ $real = r8 ] ; then OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE -fcray-pointer" ; fi 473 if [ $real = r8 ] ; then 474 OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE -fcray-pointer" 475 fi 444 476 export F90FLAGS=" -ffree-form $OPTIMNC" 445 477 export FFLAGS=" $OPTIMNC" … … 603 635 chmod u=rwx install_netcdf4_hdf5.bash 604 636 if [ "$compiler" = "gfortran" ] ; then 605 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC gcc -FC gfortran -CXX g++ -MPI $root_mpi > $netcdflog 2>&1 637 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC gcc \ 638 -FC gfortran -CXX g++ -MPI $root_mpi > $netcdflog 2>&1 606 639 elif [ "$compiler" = "ifort" ] ; then 607 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC icc -FC ifort -CXX icpc -MPI $root_mpi > $netcdflog 2>&1 640 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC icc \ 641 -FC ifort -CXX icpc -MPI $root_mpi > $netcdflog 2>&1 608 642 elif [ "$compiler" = "pgf90" ] ; then 609 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC pgcc -FC pgf90 -CXX pgCC -MPI $root_mpi > $netcdflog 2>&1 643 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC pgcc \ 644 -FC pgf90 -CXX pgCC -MPI $root_mpi > $netcdflog 2>&1 610 645 else 611 646 echo "unexpected compiler $compiler" ; exit … … 633 668 then 634 669 if [ $ioipsl = 1 ] ; then 635 #===================================================================== ====670 #===================================================================== 636 671 echo OK ioipsl=$ioipsl 637 672 echo '##########################################################' … … 645 680 cd util 646 681 cp AA_make.gdef AA_make.orig 647 F_C="$compiler -c " ; if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then F_C="$compiler -c -cpp " ; fi 682 F_C="$compiler -c " 683 if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] 684 then 685 F_C="$compiler -c -cpp " 686 fi 648 687 if [ "$compiler" = "pgf90" ] ; then F_C="$compiler -c -Mpreprocess" ; fi 649 688 sed -e 's/^\#.*.g95.*.\#.*.$/\#/' AA_make.gdef > tmp 650 sed -e "s:F_L = g95:F_L = $compiler:" -e "s:F_C = g95 -c -cpp:F_C = $F_C": \ 689 sed -e "s:F_L = g95:F_L = $compiler:" \ 690 -e "s:F_C = g95 -c -cpp:F_C = $F_C": \ 651 691 -e 's/g95.*.w_w.*.(F_D)/g95 w_w = '"$OPTIMGCM"'/' \ 652 692 -e 's:g95.*.NCDF_INC.*.$:g95 NCDF_INC= '"$ncdfdir"'/include:' \ … … 669 709 else # bash 670 710 sed -e s:/bin/ksh:/bin/bash:g ins_make > ins_make.bash 671 if [ "`grep jeanzay AA_make.gdef`" = "" ] ; then # Bidouille pour compiler sur ada des vieux modipsl.tar 711 if [ "`grep jeanzay AA_make.gdef`" = "" ] ; then 712 # Bidouille pour compiler sur ada des vieux modipsl.tar 672 713 echo 'Warning jean-zay not in AA_make.gdef' 673 714 echo 'Think about updating' … … 697 738 $make clean 698 739 $make > $ioipsllog 2>&1 699 if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then # copy module files to lib 740 if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then 741 # copy module files to lib 700 742 cp -f *.mod ../../../lib 701 743 fi … … 752 794 chmod u=rwx install_xios.bash 753 795 if [ ${hostname:0:5} = jean- ] ; then 754 svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 XIOS 796 svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 \ 797 XIOS 755 798 cd XIOS/arch 756 799 svn update 757 800 cd .. 758 echo "Compiling XIOS, start" `date` "(it takes about 20 min on Jean-Zay)" 801 echo "Compiling XIOS, start" `date` \ 802 "(it takes about 20 min on Jean-Zay)" 759 803 echo "log file: $xioslog" 760 804 ./make_xios --prod --arch $arch --job 4 > xios.log 2>&1 … … 782 826 orchidee_rev=$veget 783 827 if [ $veget -lt 4465 ] ; then 784 echo 'Stopping, ORCHIDEE version too old, script needs work on the CPP flags to pass to makelmdz' 828 echo 'Stopping, ORCHIDEE version too old, script needs work on ' \ 829 'the CPP flags to pass to makelmdz' 785 830 exit 1 786 831 fi … … 789 834 orcbranch=`svn log -v -q svn://forge.ipsl.jussieu.fr/orchidee/ -r $veget |grep ORCHIDEE |head -1| sed -e 's:ORCHIDEE/.*$:ORCHIDEE:' | awk '{print $2}'` 790 835 # switch to that branch 791 echo IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at orchidee-help@listes.ipsl.fr 792 svn switch -r $veget --accept theirs-full svn://forge.ipsl.jussieu.fr/orchidee/$orcbranch 836 echo IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at \ 837 orchidee-help@listes.ipsl.fr 838 svn switch -r $veget --accept theirs-full \ 839 svn://forge.ipsl.jussieu.fr/orchidee/$orcbranch 793 840 svn log -r $veget | grep $veget 794 841 if [ $? -gt 0 ] ; then 795 echo 'Cannot update ORCHIDEE as not on the right branch for ORCHIDEE' 842 echo 'Cannot update ORCHIDEE as not on the right branch for ' \ 843 'ORCHIDEE' 796 844 exit 797 845 fi … … 800 848 fi 801 849 # Correctif suite debug Jean-Zay 802 sed -i -e 's/9010 FORMAT(A52,F17.14)/9010 FORMAT(A52,F20.14)/' src_stomate/stomate.f90 850 sed -i -e 's/9010 FORMAT(A52,F17.14)/9010 FORMAT(A52,F20.14)/' \ 851 src_stomate/stomate.f90 803 852 opt_orc="-prod" ; if [ "$optim" = "-debug" ] ; then opt_orc="-debug" ; fi 804 853 … … 821 870 822 871 # Correctif suite debug Jean-Zay 823 if [ -f src_global/time.f90 ] ; then sed -i -e 's/CALL tlen2itau/\!CALL tlen2itau/' src_global/time.f90 ; fi 872 if [ -f src_global/time.f90 ] ; then 873 sed -i -e 's/CALL tlen2itau/\!CALL tlen2itau/' src_global/time.f90 874 fi 824 875 ################################################################### 825 if [ "$veget_version" == "false" ] ; then veget_version=orchidee2.0 ; fi 876 if [ "$veget_version" == "false" ] ; then 877 veget_version=orchidee2.0 878 fi 826 879 cd arch 827 880 sed -e s:"%COMPILER .*.$":"%COMPILER $compiler":1 \ … … 835 888 -e s:"%ARFLAGS .*.$":"%ARFLAGS $ARFLAGS":1 \ 836 889 arch-gfortran.fcm > arch-local.fcm 837 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" > arch-local.path 890 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" \ 891 > arch-local.path 838 892 echo "NETCDF_INCDIR=${ncdfdir}/include" >> arch-local.path 839 893 echo "IOIPSL_INCDIR=$ORCHPATH/../../lib" >> arch-local.path … … 843 897 cd ../ 844 898 845 echo ./makeorchidee_fcm -j $xios_orchid $opt_orc -parallel none -arch $arch 846 ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel none -arch $arch > $orchideelog 2>&1 899 echo ./makeorchidee_fcm -j $xios_orchid $opt_orc -parallel none \ 900 -arch $arch 901 ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel none \ 902 -arch $arch > $orchideelog 2>&1 847 903 pwd 848 904 else # of "if [ -d tools ]" 849 905 if [ -d src_parallel ] ; then 850 906 liste_src="parallel parameters global stomate sechiba driver" 851 if [ "$veget_version" == "false" ] ; then veget_version=orchidee2.0 ; fi 852 fi 853 for d in $liste_src ; do src_d=src_$d 854 echo src_d $src_d 855 echo ls ; ls 856 if [ ! -d $src_d ] ; then echo Problem orchidee : no $src_d ; exit ; fi 857 cd $src_d ; \rm -f *.mod make ; $make clean 858 $make > $orchideelog 2>&1 ; if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then cp -f *.mod ../../../lib ; fi 859 cd .. 907 if [ "$veget_version" == "false" ] ; then 908 veget_version=orchidee2.0 909 fi 910 fi 911 for d in $liste_src ; do 912 src_d=src_$d 913 echo src_d $src_d 914 echo ls ; ls 915 if [ ! -d $src_d ] ; then 916 echo Problem orchidee : no $src_d ; exit 917 fi 918 cd $src_d ; \rm -f *.mod make ; $make clean 919 $make > $orchideelog 2>&1 920 if [ "$compiler" = "$gfortran" -o "$compiler" = "mpif90" ] ; then 921 cp -f *.mod ../../../lib 922 fi 923 cd .. 860 924 done 861 925 fi # of "if [ -d tools ]" … … 887 951 cd arch 888 952 # arch-local.path file 889 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" > arch-local.path 953 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdff -lnetcdf\"" \ 954 > arch-local.path 890 955 echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path 891 956 echo 'NETCDF95_INCDIR=$LMDGCM/../../include' >> arch-local.path … … 938 1003 set +e ; svn info | grep -q 'http:' 939 1004 if [ $? = 0 ] ; then 940 svn switch --relocate http://svn.lmd.jussieu.fr/LMDZ https://svn.lmd.jussieu.fr/LMDZ 1005 svn switch --relocate http://svn.lmd.jussieu.fr/LMDZ \ 1006 https://svn.lmd.jussieu.fr/LMDZ 941 1007 fi 942 1008 svn update $svnopt … … 945 1011 946 1012 ################################################################## 947 # Retrieve the final svn release number, and adjust compilation options accordingly 1013 # Retrieve the final svn release number, and adjust compilation 1014 # options accordingly 948 1015 mysvn=`svnversion . | egrep -o "[0-9]+"` 949 1016 … … 953 1020 case $rad in 954 1021 oldrad) iflag_rrtm=0 ; NSW=2 ; opt_rad="" ;; 955 rrtm) iflag_rrtm=1 ; NSW=6 ; if [ $mysvn -le 4185 ] ; then opt_rad="-rrtm true" ; else opt_rad="-rad rrtm" ; fi ;; 1022 rrtm) iflag_rrtm=1 ; NSW=6 1023 if [ $mysvn -le 4185 ] ; then 1024 opt_rad="-rrtm true" 1025 else 1026 opt_rad="-rad rrtm" 1027 fi ;; 956 1028 ecrad) iflag_rrtm=2 ; NSW=6 ; opt_rad="-rad ecrad" ;; 957 1029 *) echo Only oldrad rrtm ecrad for rad option ; exit 958 1030 esac 959 1031 960 if [ $mysvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi 1032 if [ $mysvn -le 4185 -a $rad = "ecrad" ] ; then 1033 echo "ecrad only available for LMDZ rev starting with 4186 " ; exit 1034 fi 961 1035 962 1036 ################################################################## … … 984 1058 echo '##################################################################' 985 1059 986 if [ "$env_file" != "" ] ; then mv arch/arch-${arch}.env arch/arch-${arch}.orig ; \cp -f $env_file arch/arch-${arch}.env ; fi 987 988 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " ; else makelmdz="makelmdz $optim -arch $arch" ; fi 1060 if [ "$env_file" != "" ] ; then 1061 mv arch/arch-${arch}.env arch/arch-${arch}.orig 1062 \cp -f $env_file arch/arch-${arch}.env 1063 fi 1064 1065 if [ $compile_with_fcm = 1 ] ; then 1066 makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " 1067 else 1068 makelmdz="makelmdz $optim -arch $arch" 1069 fi 989 1070 990 1071 # sequential compilation 991 1072 if [ "$sequential" = 1 ] ; then 992 1073 echo Sequential compilation command, saved in compile.sh: 993 echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " 994 echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " > compile.sh 1074 echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp " \ 1075 "-d ${grid_resolution} -v $veget_version gcm " 1076 echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp " \ 1077 "-d ${grid_resolution} -v $veget_version gcm " > compile.sh 995 1078 chmod +x ./compile.sh 996 1079 if [ $bench = 1 ] ; then … … 1031 1114 echo Compiling ORCHIDEE in parallel mode `date` 1032 1115 echo logfile $orchideelog 1033 echo "NOTE : to recompile it when necessary, use ./compile_orc.sh in modipsl/modeles/ORCHIDEE" 1034 echo ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch > compile_orc.sh 1035 echo ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel -arch $arch >> compile_orc.sh 1036 echo echo Now you must also recompile LMDZ, by running ./compile.sh in modeles/LMDZ >> compile_orc.sh 1116 echo "NOTE : to recompile it when necessary, use ./compile_orc.sh " \ 1117 "in modipsl/modeles/ORCHIDEE" 1118 echo ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc \ 1119 -parallel $parallel -arch $arch > compile_orc.sh 1120 echo ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc \ 1121 -parallel $parallel -arch $arch >> compile_orc.sh 1122 echo echo Now you must also recompile LMDZ, by running ./compile.sh \ 1123 in modeles/LMDZ >> compile_orc.sh 1037 1124 chmod u+x compile_orc.sh 1038 ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch > $orchideelog 2>&1 1039 ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel -arch $arch >> $orchideelog 2>&1 1125 ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc \ 1126 -parallel $parallel -arch $arch > $orchideelog 2>&1 1127 ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel \ 1128 -arch $arch >> $orchideelog 2>&1 1040 1129 echo End of ORCHIDEE compilation in parallel mode `date` 1041 1130 elif [ $veget != 'NONE' ] ; then … … 1067 1156 if [ ${hostname:0:5} = jean- -a "$cosp" = "v2" ] ; then 1068 1157 1069 echo LMDZ compilation command in parallel mode, saved in compile.sh, is : 1070 echo "(ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige ! )" 1071 # ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige 1072 echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh 1073 echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm 1158 echo LMDZ compilation command in parallel mode, saved in compile.sh, \ 1159 is : 1160 echo "(ATTENTION le probleme de cospv2 sur jean-zay en mode prod " \ 1161 "n est pas corrige ! )" 1162 # ATTENTION le probleme de cospv2 sur jean-zay en mode prod n 1163 # est pas corrige 1164 echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \ 1165 $opt_makelmdz_xios -d \$resol -v $veget_version -mem \ 1166 -parallel $parallel gcm >> compile.sh 1167 echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \ 1168 $opt_makelmdz_xios -d \$resol -v $veget_version -mem \ 1169 -parallel $parallel gcm 1074 1170 else 1075 echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh 1076 echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm 1171 echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \ 1172 $opt_makelmdz_xios -d \$resol -v $veget_version -mem \ 1173 -parallel $parallel gcm >> compile.sh 1174 echo ./$makelmdz $optim $OPT_MAKELMDZ $opt_rad $opt_cosp \ 1175 $opt_makelmdz_xios -d \$resol -v $veget_version -mem \ 1176 -parallel $parallel gcm 1077 1177 fi 1078 1178 chmod +x ./compile.sh 1079 1179 1080 1180 if [ $bench = 1 ] ; then 1081 echo Compiling LMDZ in parallel mode `date`, LMDZ log file: $lmdzlog ; ./compile.sh > $lmdzlog 2>&1 1181 echo Compiling LMDZ in parallel mode `date`, LMDZ log file: $lmdzlog 1182 ./compile.sh > $lmdzlog 2>&1 1082 1183 fi 1083 1184 … … 1094 1195 gcm="" 1095 1196 #for exe in gcm.e bin/gcm_${grid_resolution}_phylmd_seq_orch.e bin/gcm_${grid_resolution}_phylmd_seq.e bin/gcm_${grid_resolution}_phylmd_para_mem_orch.e bin/gcm_${grid_resolution}_phylmd_para_mem.e ; do 1096 for exe in gcm.e bin/gcm_${grid_resolution}_phylmd${suff_exe}${suff_orc}.e ; do if [ -f $exe ] ; then gcm=$exe ; fi 1197 for exe in gcm.e bin/gcm_${grid_resolution}_phylmd${suff_exe}${suff_orc}.e 1198 do 1199 if [ -f $exe ] ; then gcm=$exe ; fi 1097 1200 done 1098 1201 … … 1116 1219 1117 1220 if [ $bench = tuto ] ; then 1118 myget Training/tutorial.tar ; tar xvf tutorial.tar ; cd TUTORIAL ; ./init.sh 1221 myget Training/tutorial.tar ; tar xvf tutorial.tar ; cd TUTORIAL 1222 ./init.sh 1119 1223 1120 1224 elif [[ $bench = 1 && ! -d BENCH${grid_resolution} ]] ; then … … 1168 1272 cp ../DefLists/file_def_hist*xml . 1169 1273 # adapt iodef.xml to use attached mode 1170 sed -e 's@"using_server" type="bool">true@"using_server" type="bool">false@' iodef.xml > tmp 1274 sed -e 's@"using_server" type="bool">true@"using_server" type="bool">false@' \ 1275 iodef.xml > tmp 1171 1276 \mv -f tmp iodef.xml 1172 1277 … … 1176 1281 do 1177 1282 if [ "$histfile" = "file_def_histday_lmdz.xml" ] ; then 1178 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".TRUE."@' $histfile > tmp ; \mv -f tmp $histfile 1179 sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile > tmp ; \mv -f tmp $histfile 1180 sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile 1283 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".TRUE."@' \ 1284 $histfile > tmp 1285 \mv -f tmp $histfile 1286 sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile \ 1287 > tmp 1288 \mv -f tmp $histfile 1289 sed -e 's@compression_level="2"@compression_level="0"@' \ 1290 $histfile > tmp 1291 \mv -f tmp $histfile 1181 1292 else 1182 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' $histfile > tmp ; \mv -f tmp $histfile 1293 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' \ 1294 $histfile > tmp 1295 \mv -f tmp $histfile 1183 1296 fi 1184 1297 done … … 1190 1303 if [ "$cosp" = "v1" ] ; then 1191 1304 histfile=file_def_histdayCOSP_lmdz.xml 1192 sed -e 's@enabled=".FALSE."@enabled=".TRUE."@' $histfile > tmp ; \mv -f tmp $histfile 1193 sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile > tmp ; \mv -f tmp $histfile 1194 sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile 1305 sed -e 's@enabled=".FALSE."@enabled=".TRUE."@' $histfile > tmp 1306 \mv -f tmp $histfile 1307 sed -e 's@output_level="_AUTO_"@output_level="5"@' $histfile > tmp 1308 \mv -f tmp $histfile 1309 sed -e 's@compression_level="2"@compression_level="0"@' \ 1310 $histfile > tmp 1311 \mv -f tmp $histfile 1195 1312 fi 1196 1313 if [ "$cosp" = "v2" ] ; then 1197 1314 histfile=file_def_histdayCOSPv2_lmdz.xml 1198 sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile 1315 sed -e 's@compression_level="2"@compression_level="0"@' \ 1316 $histfile > tmp 1317 \mv -f tmp $histfile 1199 1318 contextfile=context_lmdz.xml 1200 sed -e 's@src="./file_def_histdayCOSP_lmdz.xml"@src="./file_def_histdayCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile 1201 sed -e 's@src="./file_def_histmthCOSP_lmdz.xml"@src="./file_def_histmthCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile 1202 sed -e 's@src="./file_def_histhfCOSP_lmdz.xml"@src="./file_def_histhfCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile 1319 sed -e 's@src="./file_def_histdayCOSP_lmdz.xml"@src="./file_def_histdayCOSPv2_lmdz.xml"@' \ 1320 $contextfile > tmp 1321 \mv -f tmp $contextfile 1322 sed -e 's@src="./file_def_histmthCOSP_lmdz.xml"@src="./file_def_histmthCOSPv2_lmdz.xml"@' \ 1323 $contextfile > tmp 1324 \mv -f tmp $contextfile 1325 sed -e 's@src="./file_def_histhfCOSP_lmdz.xml"@src="./file_def_histhfCOSPv2_lmdz.xml"@' \ 1326 $contextfile > tmp 1327 \mv -f tmp $contextfile 1203 1328 fieldfile=field_def_lmdz.xml 1204 sed -e 's@field_def_cosp1.xml@field_def_cospv2.xml@' $fieldfile > tmp ; \mv -f tmp $fieldfile 1329 sed -e 's@field_def_cosp1.xml@field_def_cospv2.xml@' $fieldfile \ 1330 > tmp 1331 \mv -f tmp $fieldfile 1205 1332 fi 1206 1333 … … 1218 1345 # Adjusting bench physiq.def to radiative code chosen 1219 1346 cd BENCH${grid_resolution} 1220 sed -e 's/iflag_rrtm=.*.$/iflag_rrtm='$iflag_rrtm'/' -e 's/NSW=.*.$/NSW='$NSW'/' physiq.def > tmpdef 1347 sed -e 's/iflag_rrtm=.*.$/iflag_rrtm='$iflag_rrtm'/' \ 1348 -e 's/NSW=.*.$/NSW='$NSW'/' physiq.def > tmpdef 1221 1349 \mv tmpdef physiq.def 1222 1350 cd .. … … 1253 1381 if [ ${hostname:0:5} = jean- ] ; then 1254 1382 . ../arch/arch-${arch}.env 1255 echo "srun -n 2 -A $idris_acct@cpu gcm.e > listing 2>&1" >> bench.sh 1383 echo "srun -n 2 -A $idris_acct@cpu gcm.e > listing 2>&1" \ 1384 >> bench.sh 1256 1385 else 1257 1386 echo "$mpirun -np 2 gcm.e > listing 2>&1" >> bench.sh … … 1259 1388 # Add rebuild, using reb.sh if it is there 1260 1389 echo 'if [ -f reb.sh ] ; then' >> bench.sh 1261 echo ' ./reb.sh histday ; ./reb.sh histmth ; ./reb.sh histhf ; ./reb.sh histins ; ./reb.sh stomate_history ; ./reb.sh sechiba_history ; ./reb.sh sechiba_out_2 ' >> bench.sh 1390 echo ' ./reb.sh histday ; ./reb.sh histmth ; ./reb.sh histhf ; ' \ 1391 './reb.sh histins ; ./reb.sh stomate_history ; ' \ 1392 './reb.sh sechiba_history ; ./reb.sh sechiba_out_2 ' >> bench.sh 1262 1393 echo 'fi' >> bench.sh 1263 1394 else … … 1276 1407 if [ "$with_xios" = "y" ] ; then 1277 1408 cp ../../ORCHIDEE/src_xml/context_orchidee.xml . 1278 echo '<context id="orchidee" src="./context_orchidee.xml"/>' > add.tmp 1409 echo '<context id="orchidee" src="./context_orchidee.xml"/>' \ 1410 > add.tmp 1279 1411 cp ../../ORCHIDEE/src_xml/field_def_orchidee.xml . 1280 1412 cp ../../ORCHIDEE/src_xml/file_def_orchidee.xml . … … 1282 1414 if [ -f ../../ORCHIDEE/src_xml/context_input_orchidee.xml ] ; then 1283 1415 cp ../../ORCHIDEE/src_xml/context_input_orchidee.xml . 1284 echo '<context id="orchidee" src="./context_input_orchidee.xml"/>' >> add.tmp 1416 echo '<context id="orchidee" ' \ 1417 'src="./context_input_orchidee.xml"/>' >> add.tmp 1285 1418 fi 1286 1419 sed -e '/id="LMDZ"/r add.tmp' iodef.xml > tmp 1287 1420 mv tmp iodef.xml 1288 sed -e'{/sechiba1/ s/enabled="_AUTO_"/type="one_file" enabled=".TRUE."/}' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml 1289 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml 1290 sed -e 's@output_level="_AUTO_"@output_level="1"@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml 1291 sed -e 's@output_freq="_AUTO_"@output_freq="1d"@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml 1292 sed -e 's@compression_level="4"@compression_level="0"@' file_def_orchidee.xml > tmp ; \mv -f tmp file_def_orchidee.xml 1293 sed -e 's@XIOS_ORCHIDEE_OK = n@XIOS_ORCHIDEE_OK = y@' orchidee.def > tmp ; \mv -f tmp orchidee.def 1421 sed -e'{/sechiba1/ s/enabled="_AUTO_"/type="one_file" enabled=".TRUE."/}' \ 1422 file_def_orchidee.xml > tmp 1423 \mv -f tmp file_def_orchidee.xml 1424 sed -e 's@enabled="_AUTO_"@type="one_file" enabled=".FALSE."@' \ 1425 file_def_orchidee.xml > tmp 1426 \mv -f tmp file_def_orchidee.xml 1427 sed -e 's@output_level="_AUTO_"@output_level="1"@' \ 1428 file_def_orchidee.xml > tmp 1429 \mv -f tmp file_def_orchidee.xml 1430 sed -e 's@output_freq="_AUTO_"@output_freq="1d"@' \ 1431 file_def_orchidee.xml > tmp 1432 \mv -f tmp file_def_orchidee.xml 1433 sed -e 's@compression_level="4"@compression_level="0"@' \ 1434 file_def_orchidee.xml > tmp 1435 \mv -f tmp file_def_orchidee.xml 1436 sed -e 's@XIOS_ORCHIDEE_OK = n@XIOS_ORCHIDEE_OK = y@' \ 1437 orchidee.def > tmp 1438 \mv -f tmp orchidee.def 1294 1439 fi 1295 1440 fi
Note: See TracChangeset
for help on using the changeset viewer.