Changeset 6827
- Timestamp:
- 05/13/24 11:38:26 (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh
r6808 r6827 53 53 netcdf_lib="" 54 54 55 ## Arguments in order to compress temporary files after compilation 56 tar=no 57 comp_tar=yes 58 55 59 # Output text file for compilation of each component 56 60 datestr=`LC_ALL=C date +"%Y%m%dT%H%M"` … … 90 94 and a link will be set to the choosen model version. Default version is currently ORCHIDEE_2_2 (-orch22). 91 95 [-orchdriver] Activate compilation of orchidee offline drivers 96 [-tar]: option to compress XIOS repository that takes many inodes without compilation 97 [-comp_tar]: option to compile and compress XIOS repository if compilation succed 98 [-notar]: do not compress XIOS repository 99 92 100 93 101 Example 1: Default compilation of IPSLCM7 … … 114 122 Example 7: Compilation of sub-configuration LMDZOR : 115 123 ./compile_ipslcm7.sh -subconfig LMDZOR 124 125 Example 5: Compile without compressing XIOS and LMDZ/libo in tar files 126 ./compile_ipslcm7.sh -notar 116 127 117 128 end_help … … 140 151 "-orchdriver") orchdriver="-driver"; shift ;; 141 152 "-chimie") optchimie=$2; shift ; shift;; 153 "-tar") tar=yes ; shift ;; 154 "-comp_tar") comp_tar=yes ; shift ;; 155 "-notar") comp_tar=no ; shift ;; 142 156 *) echo "unknown option "$1" , exiting..." ; exit 143 157 esac … … 153 167 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 154 168 echo " full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch, full_nemo=$full_nemo, full_dyna=$full_dyna, full_oasis=$full_oasis" >> $outfile 169 echo " tar=$tar, comp_tar=$comp_tar" >> $outfile 155 170 echo " compinca=$compinca compnemo=$compnemo compoasis=$compoasis compdyna=$compdyna complmdz=y comporch=y compxios=y" >> $outfile 156 171 echo >> $outfile … … 163 178 else 164 179 echo "ERROR in version of ORCHIDEE. It is only possible to have orch22 or orch4 for now" 180 fi 181 182 # Compress XIOS and LMDZ/libo without compiling if tar=yes 183 if [ $tar == yes ] ; then 184 echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." 185 echo >> $outfile 186 echo "Option tar activated to compress XIOS and LMDZ/libo. No compilation will be done." >> $outfile 187 if [[ -d $modipsl/modeles/XIOS ]] ; then 188 echo " Now tar XIOS repository" 189 echo " Now tar XIOS repository" >> $outfile 190 tar -cf $modipsl/modeles/XIOS.tar $modipsl/modeles/XIOS 191 rm -rf $modipsl/modeles/XIOS 192 else 193 echo " No XIOS repository to compress" 194 echo " No XIOS repository to compress" >> $outfile 195 fi 196 197 if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 198 echo "Now tar LMDZ/libo repository" 199 echo "Now tar LMDZ/libo repository" >> $outfile 200 tar -cf $modipsl/modeles/LMDZ/libo.tar $modipsl/modeles/LMDZ/libo 201 rm -rf $modipsl/modeles/LMDZ/libo 202 else 203 echo " No LMDZ/libo repository to compress" 204 echo " No LMDZ/libo repository to compress" >> $outfile 205 fi 206 207 echo "END OF SCRIPT" 208 echo "END OF SCRIPT" >> $outfile 209 exit 165 210 fi 166 211 … … 275 320 276 321 ## 2.3 Compile xios 322 echo; echo "NOW DECOMPRESS XIOS IF NEEDED" 323 # First check if XIOS needs to be decompressed 324 # In priority search for modeles/XIOS_${optmode}.tar but if it doesn't exist take 325 # the first which is found. 326 if [[ -d $modipsl/modeles/XIOS ]] ; then 327 echo "Found XIOS -> no decompress needs to be do"; >> $outfile 328 elif [[ -f $modipsl/modeles/XIOS_${optmode}.tar ]]; then 329 echo >> $outfile 330 echo "Found XIOS_${optmode}.tar -> decompress repository" >> $outfile 331 # Do not write "tar -xf ... -C $modipsl/modeles because it's modeles/XIOS that is compressed, not only XIOS/ 332 tar -xf $modipsl/modeles/XIOS_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 333 elif [[ -f $modipsl/modeles/XIOS_prod.tar ]]; then 334 echo >> $outfile 335 echo "Found XIOS_prod.tar -> decompress repository" >> $outfile 336 tar -xf $modipsl/modeles/XIOS_prod.tar -C $modipsl/ >> $outfile 2>&1 337 elif [[ -f $modipsl/modeles/XIOS_debug.tar ]]; then 338 echo >> $outfile 339 echo "Found XIOS_debug.tar -> decompress repository" >> $outfile 340 tar -xf $modipsl/modeles/XIOS_debug.tar -C $modipsl/ >> $outfile 2>&1 341 elif [[ -f $modipsl/modeles/XIOS_dev.tar ]]; then 342 echo >> $outfile 343 echo "Found XIOS_dev.tar -> decompress repository" >> $outfile 344 tar -xf $modipsl/modeles/XIOS_dev.tar -C $modipsl/ >> $outfile 2>&1 345 elif [[ -f $modipsl/modeles/XIOS.tar ]]; then 346 echo >> $outfile 347 echo "Found XIOS.tar -> decompress repository" >> $outfile 348 tar -xf $modipsl/modeles/XIOS.tar -C $modipsl/ >> $outfile 2>&1 349 else 350 echo "XIOS source code was not found. Exit" 351 echo "XIOS source code was not found. Exit" >> $outfile 352 exit 353 fi 354 277 355 cd $modipsl/modeles/XIOS 278 356 echo; echo "NOW COMPILE XIOS" … … 461 539 cd $modipsl/modeles/LMDZ 462 540 541 # First check if LMDZ/libo exist or if it could be decompressed 542 # If neither LMDZ/libo or LMDZ/libo_${optmode}.tar exists, nothing is done. It'll be created 543 # during the compilation. 544 echo; echo "NOW DECOMPRESS LMDZ/libo IF NEEDED" 545 if [[ -d $modipsl/modeles/LMDZ/libo ]] ; then 546 echo "Found LMDZ/libo -> no decompress needs to be done"; >> $outfile 547 elif [[ -f $modipsl/modeles/LMDZ/libo_${optmode}.tar ]]; then 548 echo "Found LMDZ/libo_${optmode}.tar -> decompress repository"; >> $outfile 549 echo >> $outfile 550 tar -xf $modipsl/modeles/LMDZ/libo_${optmode}.tar -C $modipsl/ >> $outfile 2>&1 551 fi 552 553 463 554 # Temporary use of SOURCES/LMDZ to handle modifications needed by IPSLCM7 for LMDZ 4876 464 555 # To be removed for newer versions of LMDZ … … 698 789 fi 699 790 791 # Compress XIOS and LMDZ/libo 792 if [ $comp_tar == yes ] && [ -d $modipsl/modeles/XIOS ] ; then 793 echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" 794 echo "Option comp_tar activated, now compress XIOS and LMDZ/libo" >> $outfile 795 tar -cf $modipsl/modeles/XIOS_${optmode}.tar $modipsl/modeles/XIOS 796 rm -rf $modipsl/modeles/XIOS 797 tar -cf $modipsl/modeles/LMDZ/libo_${optmode}.tar $modipsl/modeles/LMDZ/libo 798 rm -rf $modipsl/modeles/LMDZ/libo 799 fi 800 700 801 echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile 701 802 echo ls -lrt modipsl/bin >> $outfile
Note: See TracChangeset
for help on using the changeset viewer.