Changeset 8562
- Timestamp:
- 2024-05-21T10:03:08+02:00 (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_2_2/ORCHIDEE_OL/compile_orchidee_ol.sh
r8381 r8562 57 57 netcdf_lib="" 58 58 59 ## Arguments in order to compress temporary files after compilation 60 tar=no 61 comp_tar=yes 59 62 60 63 #### Read arguments … … 82 85 When using [-parallel seq], [-without_xios] must as well be set. 83 86 [-netcdf_lib_seq]: option to tell XIOS that linking with netcdf4 sequential library will be used instead of default netcdf4 parallel library 87 [-tar]: option to compress XIOS repository that takes many inodes without compilation 88 [-comp_tar]: option to compile and compress XIOS repository if compilation succed 89 [-notar]: do not compress XIOS repository 84 90 85 91 … … 113 119 "-all_exec") otherexec="-otherexec" ; shift ;; 114 120 "-netcdf_lib_seq") netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 121 "-tar") tar=yes ; shift ;; 122 "-comp_tar") comp_tar=yes ; shift ;; 123 "-notar") comp_tar=no ; shift ;; 115 124 *) echo "unknown option "$1" , exiting..." ; exit 116 125 esac … … 128 137 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 129 138 echo " full_flag=$full_flag, full_xios=$full_xios, full_orch=$full_orch" >> $outfile 139 echo " tar=$tar, comp_tar=$comp_tar" >> $outfile 130 140 echo >> $outfile 131 141 … … 134 144 echo "Option -without_xios must be set if option [-parallel seq] is set" 135 145 echo "Option -without_xios must be set if option [-parallel seq] is set" >> $outfile 146 exit 147 fi 148 149 # Compress XIOS without compiling if tar=yes 150 if [ $tar == yes ] ; then 151 cd $modipsl/modeles 152 echo "Option tar activated to compress XIOS. No compilation will be done." 153 echo >> $outfile 154 echo "option tar activated" >> $outfile 155 if [[ -d $modipsl/modeles/XIOS ]] ; then 156 tar -cf XIOS.tar XIOS 157 rm -rf XIOS 158 echo " Tar XIOS repository" 159 echo " Tar XIOS repository" >> $outfile 160 else 161 echo " No XIOS repository to compress" 162 echo " No XIOS repository to compress" >> $outfile 163 fi 164 echo "END OF SCRIPT" 165 echo "END OF SCRIPT" >> $outfile 136 166 exit 137 167 fi … … 213 243 ## 2.2 Compile xios 214 244 if [ $xios == xios ] ; then 245 cd $modipsl/modeles 246 # First check if XIOS needs to be decompressed 247 # In priority search for modeles/XIOS_${optmode}.tar but if it doesn't exist take 248 # the first which is found. 249 echo; echo "NOW DECOMPRESS XIOS IF NEEDED" 250 if [[ -d $modipsl/modeles/XIOS ]] ; then 251 echo "Found XIOS -> no decompress needs to be done"; >> $outfile 252 elif [[ -f $modipsl/modeles/XIOS_${optmode}.tar ]]; then 253 echo >> $outfile 254 echo "Found XIOS_${optmode}.tar -> decompress repository" >> $outfile 255 tar -xf XIOS_${optmode}.tar >> $outfile 2>&1 256 elif [[ -f $modipsl/modeles/XIOS_prod.tar ]]; then 257 echo >> $outfile 258 echo "Found XIOS_prod.tar -> decompress repository" >> $outfile 259 tar -xf XIOS_prod.tar >> $outfile 2>&1 260 elif [[ -f $modipsl/modeles/XIOS_debug.tar ]]; then 261 echo >> $outfile 262 echo "Found XIOS_debug.tar -> decompress repository" >> $outfile 263 tar -xf XIOS_debug.tar >> $outfile 2>&1 264 elif [[ -f $modipsl/modeles/XIOS_dev.tar ]]; then 265 echo >> $outfile 266 echo "Found XIOS_dev.tar -> decompress repository" >> $outfile 267 tar -xf XIOS_dev.tar >> $outfile 2>&1 268 elif [[ -f $modipsl/modeles/XIOS.tar ]]; then 269 echo >> $outfile 270 echo "Found XIOS.tar -> decompress repository" >> $outfile 271 tar -xf XIOS.tar >> $outfile 2>&1 272 else 273 echo "XIOS source code was not found. Exit" 274 echo "XIOS source code was not found. Exit" >> $outfile 275 exit 276 fi 277 215 278 cd $modipsl/modeles/XIOS 216 279 echo; echo "NOW COMPILE XIOS" … … 265 328 if [ -f $modipsl/bin/teststomate ] ; then mv $modipsl/bin/teststomate $modipsl/bin/teststomate_${optmode} ; fi 266 329 267 330 if [ $comp_tar == yes ] && [ -d $modipsl/modeles/XIOS ] ; then 331 cd $modipsl/modeles 332 echo "Option comp_tar activated, now compress XIOS" 333 echo "Option comp_tar activated, now compress XIOS" >> $outfile 334 tar -cf XIOS_${optmode}.tar XIOS 335 rm -rf XIOS 336 fi 268 337 269 338 echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile
Note: See TracChangeset
for help on using the changeset viewer.