Changeset 4643 for CONFIG/UNIFORM/v6
- Timestamp:
- 08/09/19 18:35:04 (5 years ago)
- Location:
- CONFIG/UNIFORM/v6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v6/IPSLCM6.2/compile_ipslcm6.sh
r4642 r4643 334 334 echo >> $outfile 335 335 suffix=_${resol_atm}_phylmd_para_mem_orch_couple.e 336 echo gcm .esuffix = $suffix336 echo gcm suffix = $suffix 337 337 338 338 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ; then -
CONFIG/UNIFORM/v6/LMDZOR_v6.2/compile_lmdzor.sh
r4622 r4643 18 18 # Resolution of LMDZ in regular mode 19 19 resol_atm=144x142x79 20 # Also compile ce0l subprogram to LMDZ (y/n) 21 ce0l=y 20 22 21 23 # fcm_arch … … 25 27 export fcm_arch parallel xios 26 28 full_flag="" 29 full_xios="" 30 full_lmdz="" 31 full_orch="" 32 27 33 # Default netcdf_lib is used for XIOS but can be change by argument 28 34 netcdf_lib="" … … 32 38 outfile=$submitdir/out_compile_lmdzor.$datestr 33 39 echo > $outfile 34 echo; echo "Text output from compilation will be stored in file out_compile_lmdzor "; echo40 echo; echo "Text output from compilation will be stored in file out_compile_lmdzor.$datestr"; echo 35 41 36 42 #### Read arguments … … 38 44 while (($# > 0)) ; do 39 45 case $1 in 40 "-h") cat <<fin 41 46 "-h") cat <<end_help 42 47 ######################################################################## 43 48 # Usage of the script compile_lmdzor.sh … … 62 67 ./compile_lmdzor.sh -resol_atm 96x95x79 63 68 64 fin 65 exit;; 66 67 "-parallel") 68 parallel=$2 ; shift ; shift ;; 69 70 "-arch") 71 fcm_arch="$2" ; shift ; shift ;; 72 73 "-xios") 74 xios="$2" ; shift ; shift ;; 75 76 "-debug") 77 optmode=debug ; shift ;; 78 79 "-dev") 80 optmode=dev ; shift ;; 81 82 "-prod") 83 optmode=prod ; shift ;; 84 85 "-resol_atm") 86 resol_atm=$2 ; shift ; shift ;; 87 88 "-full") 89 full_flag="-full"; shift ;; 90 91 "-netcdf_lib_seq") 92 netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 93 94 *) 95 echo "unknown option "$2" , exiting..." 96 exit 69 end_help 70 exit;; 71 "-parallel") parallel=$2 ; shift ; shift ;; 72 "-arch") fcm_arch="$2" ; shift ; shift ;; 73 "-xios") xios="$2" ; shift ; shift ;; 74 "-debug") optmode=debug ; shift ;; 75 "-dev") optmode=dev ; shift ;; 76 "-prod") optmode=prod ; shift ;; 77 "-resol_atm") resol_atm=$2 ; shift ; shift ;; 78 "CE0L") ce0l=y ; shift ;; 79 "-full") full_flag="-full"; shift ;; 80 "-full") full_flag="-full"; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; shift ;; 81 "-full_xios") full_xios="--full" ; shift ;; # Note only full_xios is using double dash: --full 82 "-full_lmdz") full_lmdz="-full" ; shift ;; 83 "-full_orch") full_orch="-full" ; shift ;; 84 "-netcdf_lib_seq") netcdf_lib="--netcdf_lib netcdf4_seq"; shift ;; 85 *) echo "unknown option "$2" , exiting..." ; exit 97 86 esac 98 87 done 99 88 100 echo "Following arguments are set in current compiling:" >> $outfile 101 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch, full_flag=$full_flag resol_atm=${resol_atm}" >> $outfile 89 echo "Following options are set in current compiling:" >> $outfile 90 echo " resol_atm=${resol_atm}" >> $outfile 91 echo " ce0l=${ce0l}" >> $outfile 92 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 93 echo " full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch" >> $outfile 94 echo " parallel = $parallel, fcm_arch = $fcm_arch" >> $outfile 102 95 echo >> $outfile 103 96 … … 171 164 echo; echo "NOW COMPILE XIOS" 172 165 echo >> $outfile ; echo " NOW COMPILE XIOS" >> $outfile 173 echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_ flag>> $outfile174 ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_ flag>> $outfile 2>&1166 echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios >> $outfile 167 ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios >> $outfile 2>&1 175 168 # Test if compiling succeded 176 169 if [[ $? != 0 ]] ; then … … 192 185 echo >> $outfile ; echo " NOW COMPILE ORCHIDEE" >> $outfile 193 186 194 echo ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_ flag-driver >> $outfile195 ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_ flag-driver >> $outfile 2>&1187 echo ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch -driver >> $outfile 188 ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch -driver >> $outfile 2>&1 196 189 # Test if compiling finished 197 190 if [[ $? != 0 ]] ; then … … 199 192 exit 200 193 fi 194 195 # Rename executables to contain $optmode 196 if [ -f $modipsl/bin/orchidee_ol ] ; then mv $modipsl/bin/orchidee_ol $modipsl/bin/orchidee_ol_${optmode} ; fi 197 if [ -f $modipsl/bin/orchideedriver ] ; then mv $modipsl/bin/orchideedriver $modipsl/bin/orchideedriver_${optmode} ; fi 201 198 202 199 … … 220 217 fi 221 218 222 echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_ flaggcm >> $outfile223 ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_ flaggcm >> $outfile 2>&1219 echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 220 ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 2>&1 224 221 # Test if compiling finished 225 222 if [[ $? != 0 ]] ; then … … 228 225 fi 229 226 230 # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 231 echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" 232 echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" >> $outfile 233 234 echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_flag ce0l >> $outfile 235 ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_flag ce0l >> $outfile 2>&1 236 # Test if compiling finished 237 if [[ $? != 0 ]] ; then 238 echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" 239 exit 240 fi 227 # Move executables to modipsl/bin folder 228 echo >> $outfile 229 echo "Move gcm.e executable to modipsl/bin" >> $outfile 230 echo ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile 231 ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile 232 echo >> $outfile 241 233 242 234 # Find executable suffix 243 235 if [ $parallel == seq ] || [ $parallel == none ] ; then 244 suffix=_${resol_atm}_phylmd_seq_orch 236 suffix=_${resol_atm}_phylmd_seq_orch.e 245 237 else 246 suffix=_${resol_atm}_phylmd_para_mem_orch 247 fi 248 echo suffix = $suffix 249 250 # Move executables to modipsl/bin folder 251 echo "Move gcm.e and ce0l executable to modipsl/bin" 252 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix}.e ] ; then mv $modipsl/modeles/LMDZ/bin/gcm${suffix}.e $modipsl/bin/gcm_${resol_atm}_${optmode}.e ; fi 253 if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix}.e ] ; then mv $modipsl/modeles/LMDZ/bin/ce0l${suffix}.e $modipsl/bin/ce0l_${resol_atm}_${optmode}.e ; fi 238 suffix=_${resol_atm}_phylmd_para_mem_orch.e 239 fi 240 echo gcm suffix = $suffix 241 242 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ; then 243 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e 244 else 245 echo "ERROR gcm${suffix} executable does not exist." 246 echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP" 247 exit 248 fi 249 250 251 # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 252 if [ $ce0l == y ] ; then 253 echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" 254 echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" >> $outfile 255 256 echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 257 ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 2>&1 258 # Test if compiling finished 259 if [[ $? != 0 ]] ; then 260 echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" 261 exit 262 fi 263 264 265 # Move executables to modipsl/bin folder 266 echo >> $outfile 267 echo "Move ce0l.e executable to modipsl/bin" >> $outfile 268 echo ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile 269 ls -lrt $modipsl/modeles/LMDZ/bin >> $outfile 270 echo >> $outfile 271 echo ce0l suffix = $suffix 272 273 if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ; then 274 mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}.e 275 else 276 echo "ERROR ce0l${suffix} executable does not exist." 277 echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP" 278 exit 279 fi 280 fi 254 281 255 282 256 283 echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile 257 echo; echo "ALL COMPILING FINISHED" 284 echo ls -lrt modipsl/bin >> $outfile 285 ls -lrt $modipsl/bin >> $outfile 286 287 echo; echo "ALL COMPILING FINISHED" ; echo 288 echo "Executables are found in modipsl/bin" 289 echo "Check that executable names correspond with the name set in config.card before launching the job" 290 echo ls -lrt modipsl/bin 291 ls -lrt $modipsl/bin 258 292 259 293 date 294 260 295 exit 261 262
Note: See TracChangeset
for help on using the changeset viewer.