Changeset 6638
- Timestamp:
- 10/05/23 14:27:02 (8 months ago)
- Location:
- CONFIG/UNIFORM/v7/IPSLCM7
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG/UNIFORM/v7/IPSLCM7/compile_ipslcm7.sh
r6629 r6638 44 44 optchimie=GES 45 45 46 # subconfig : which sub-configuration to compile. By default, the full extracted configuration is compiled. 47 subconfig=default 48 46 49 # orchversion tells if ORCHIDEE_2_2 or ORCHIDEE_trunk is compiled. This is used as argument and also in the suffix of the executables. 47 50 # orchcomp is the key word needed for LMDZ for the compilation of coherent interface. Only used internal to the compilation script. … … 59 62 60 63 61 echo "create out_compile_ipslcm7 link "62 64 rm -f out_compile_ipslcm7 63 65 ln -s ${outfile} out_compile_ipslcm7 64 65 66 66 67 … … 80 81 Options: [-full] Full recompilation of all components. This option can be added to all other options. 81 82 [-cleannemo] Full recompilation of NEMO component only. 82 [-regular_latlon ]83 [-regular_latlon XXXxYYYxZZ] Define which regular grid to compile in addition to the icosahedric grid. It is mandatory to specify the grid size. 83 84 [-debug / -dev / -prod] Level of optimization. One of these can be added to all other compile options. Default: -prod. 84 85 [-subconfig X] Set this option if you want to compile a sub-configuration. X can be: ICOLMDZORINCA, ICOLMDZOR, LMDZORINCA or LMDZOR. 86 If this option is not set, all extracted components are compiled. 85 87 86 88 Example 1: Default compilation of IPSLCM7 for resolution LR … … 117 119 "-prod") optmode=prod ; shift ;; 118 120 "-regular_latlon") regular_latlon=yes ; resol_atm=$2 ; shift ; shift ;; 121 "-subconfig") subconfig=$2 ; shift ; shift ;; 119 122 "-full") full_flag="-full"; full_nemo=y ; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; shift ;; 120 123 "-full_xios") full_xios="--full" ; shift ;; # Note only full_xios is using double dash: --full … … 133 136 done 134 137 138 139 # Define which sub-configuration to compile. By default all extracted source components are compiled. 140 source define_config.sh 141 135 142 echo "Following options are set in current compiling:" >> $outfile 136 143 echo " regular_latlon=$regular_latlon (if yes, then resol_atm=${resol_atm})" >> $outfile … … 138 145 echo " optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 139 146 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" >> $outfile 147 echo " compinca=$compinca compnemo=$compnemo compoasis=$compoasis compdyna=$compdyna complmdz=y comporch=y compxios=y" >> $outfile 140 148 echo >> $outfile 149 141 150 142 151 ### Read host dependent default values … … 227 236 fi 228 237 238 if [ $compoasis == y ] ; then 229 239 ## 2.2 Compile oasis3-mct 230 240 cd $modipsl/oasis3-mct/util/make_dir … … 236 246 make -f TopMakefileOasis3 >> $outfile 2>&1 237 247 248 else 249 echo ; echo No compilation of OASIS 250 fi 238 251 239 252 ## 2.3 Compile xios … … 241 254 echo; echo "NOW COMPILE XIOS" 242 255 echo >> $outfile ; echo " NOW COMPILE XIOS" >> $outfile 243 echo ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios >> $outfile 244 ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios >> $outfile 2>&1 256 if [ $compoasis == y ] ; then 257 argoasis="--use_oasis oasis3_mct " 258 else 259 argoasis=" " 260 fi 261 echo ./make_xios $argoasis --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios >> $outfile 262 ./make_xios $argoasis --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_xios >> $outfile 2>&1 245 263 # Test if compiling succeded 246 264 if [[ $? != 0 ]] ; then … … 300 318 301 319 320 if [ $compnemo == y ] ; then 302 321 ## 2.5 Compile NEMO 303 322 nemo_root=$modipsl/modeles/NEMO … … 364 383 fi 365 384 366 385 else 386 echo ; echo No compilation of NEMO 387 fi 388 389 if [ $compinca == y ] ; then 367 390 ##2.6 Compile INCA 368 391 cd $modipsl/modeles/INCA … … 395 418 fi 396 419 397 420 else 421 echo ; echo No compilation of INCA 422 fi 398 423 399 424 ## 2.7 Compile LMDZ … … 432 457 if [ $lmdzsvn -le 4185 -a $rad = "ecrad" ] ; then echo "ecrad only available for LMDZ rev starting with 4186 " ; exit ; fi 433 458 434 echo ./makelmdz_fcm -p lmd -c OMCT $opt_rad -$optmode -mem -parallel $parallel -libphy -v $orchcomp -chimie INCA -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz >> $outfile 435 ./makelmdz_fcm -p lmd -c OMCT $opt_rad -$optmode -mem -parallel $parallel -libphy -v $orchcomp -chimie INCA -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz >> $outfile 2>&1 459 if [ $compinca == y ] ; then 460 arginca="-chimie INCA " 461 else 462 arginca=" " 463 fi 464 465 if [ $compoasis == y ] ; then 466 argoasis="-c OMCT " 467 else 468 argoasis=" " 469 fi 470 echo ./makelmdz_fcm -p lmd $argoasis $opt_rad -$optmode -mem -parallel $parallel -libphy -v $orchcomp $arginca -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz >> $outfile 471 ./makelmdz_fcm -p lmd $argoasis $opt_rad -$optmode -mem -parallel $parallel -libphy -v $orchcomp $arginca -io xios -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz >> $outfile 2>&1 472 473 436 474 # Test if compiling finished 437 475 if [[ $? != 0 ]] ; then … … 439 477 exit 440 478 fi 479 441 480 442 481 … … 446 485 echo >> $outfile ; echo " NOW COMPILE DYNAMICO" >> $outfile 447 486 448 echo ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl -with_oasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 449 ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl -with_oasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 2>&1 487 if [ $compoasis == y ] ; then 488 argoasis="-with_oasis " 489 else 490 argoasis=" " 491 fi 492 if [ $compinca == y ] ; then 493 arginca="-with_inca " 494 else 495 arginca=" " 496 fi 497 498 499 echo ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl $argoasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 500 ./make_icosa -$optmode -with_fcm1 -parallel $parallel -external_ioipsl $argoasis -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_dyna >> $outfile 2>&1 450 501 # Test if compiling finished 451 502 if [[ $? != 0 ]] ; then … … 460 511 echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ" >> $outfile 461 512 462 echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_oasis -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile463 ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_oasis -with_orchidee -with_inca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile 2>&1513 echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel $argoasis -with_orchidee $arginca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile 514 ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel $argoasis -with_orchidee $arginca -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_dyna >> $outfile 2>&1 464 515 # Test if compiling finished 465 516 if [[ $? != 0 ]] ; then … … 469 520 # Move executables to modipsl/bin 470 521 if [ -f $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe ] ; then 471 mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe 472 #create link to be use by IPSLCM and LMDZOR without any change in the executable name 473 cd $modipsl/bin 474 rm -f icosa_lmdz_${orchversion}_${optmode}.exe 475 ln -s icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe icosa_lmdz_${orchversion}_${optmode}.exe 522 if [ $compinca == y ] ; then 523 mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe 524 # Create link to be use by IPSLCM and LMDZOR without any change in the executable name 525 cd $modipsl/bin 526 rm -f icosa_lmdz_${orchversion}_${optmode}.exe 527 ln -s icosa_lmdz_${orchversion}_${optmode}_${optchimie}.exe icosa_lmdz_${orchversion}_${optmode}.exe 528 else 529 mv $modipsl/modeles/ICOSA_LMDZ/bin/icosa_lmdz.exe $modipsl/bin/icosa_lmdz_${orchversion}_${optmode}.exe 530 fi 476 531 else 477 532 echo "THERE IS A PROBLEM IN ICOSA_LMDZ COMPILATION EXECUTABLE MISSING - STOP" … … 500 555 rm -f .lock 501 556 fi 502 echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -p lmd $opt_rad -$optmode -mem -parallel $parallel -chimie INCA -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 503 ./makelmdz_fcm -d ${resol_atm} -c OMCT -p lmd $opt_rad -$optmode -mem -parallel $parallel -chimie INCA -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 2>&1 557 558 if [ $compinca == y ] ; then 559 arginca="-chimie INCA" 560 else 561 arginca="" 562 fi 563 564 if [ $compoasis == y ] ; then 565 argoasis="-c OMCT" 566 else 567 argoasis="" 568 fi 569 echo ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd $opt_rad -$optmode -mem -parallel $parallel $arginca -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 570 ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd $opt_rad -$optmode -mem -parallel $parallel $arginca -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm >> $outfile 2>&1 504 571 # Test if compiling finished 505 572 if [[ $? != 0 ]] ; then … … 514 581 suffix=${suffix}_seq_orch_inca.e 515 582 else 516 suffix=${suffix}_para_mem_orch_couple_inca.e 583 if [ $compoasis == y ] ; then 584 suffix=${suffix}_para_mem_orch_couple 585 else 586 suffix=${suffix}_para_mem_orch 587 fi 588 if [ $compinca == y ] ; then 589 suffix=${suffix}_inca.e 590 else 591 suffix=${suffix}.e 592 fi 517 593 fi 518 594 echo gcm suffix = $suffix … … 521 597 echo "Move gcm.e executable to modipsl/bin" 522 598 if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ; then 523 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${orchversion}_${optmode}_${optchimie}.e 524 #create link to be use by IPSLCM and LMDZOR without any change in the executable name 525 cd $modipsl/bin 526 rm -f gcm_${resol_atm}_${orchversion}_${optmode}.e 527 ln -s gcm_${resol_atm}_${orchversion}_${optmode}_${optchimie}.e gcm_${resol_atm}_${orchversion}_${optmode}.e 599 if [ $compinca == y ] ; then 600 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${orchversion}_${optmode}_${optchimie}.e 601 # Create link to be use by IPSLCM and LMDZOR without any change in the executable name 602 cd $modipsl/bin 603 rm -f gcm_${resol_atm}_${orchversion}_${optmode}.e 604 ln -s gcm_${resol_atm}_${orchversion}_${optmode}_${optchimie}.e gcm_${resol_atm}_${orchversion}_${optmode}.e 605 else 606 mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${orchversion}_${optmode}.e 607 fi 528 608 else 529 609 echo "ERROR gcm${suffix} executable does not exist." … … 538 618 suffix=${suffix}_seq_orch.e 539 619 else 540 suffix=${suffix}_para_mem_orch_couple.e 620 if [ $compoasis == y ] ; then 621 suffix=${suffix}_para_mem_orch_couple.e 622 else 623 suffix=${suffix}_para_mem_orch.e 624 fi 541 625 fi 542 626 echo ce0l suffix = $suffix 543 627 544 628 # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 545 629 cd $modipsl/modeles/LMDZ … … 547 631 echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}" >> $outfile 548 632 549 echo ./makelmdz_fcm -d ${resol_atm} -c OMCT-p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile550 ./makelmdz_fcm -d ${resol_atm} -c OMCT-p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 2>&1633 echo ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 634 ./makelmdz_fcm -d ${resol_atm} $argoasis -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v $orchcomp -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l >> $outfile 2>&1 551 635 # Test if compiling finished 552 636 if [[ $? != 0 ]] ; then
Note: See TracChangeset
for help on using the changeset viewer.