Changeset 4893 for BOL/script_install_amaury/install_lmdz.sh
- Timestamp:
- Apr 8, 2024, 10:51:53 AM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install_amaury/install_lmdz.sh
r4891 r4893 79 79 opt_cosp="" 80 80 81 make_j=8 82 81 83 # Check if on a Mac 82 84 if [[ $(uname) = "Darwin" ]]; then … … 140 142 141 143 -arch_dir where to find the arch files (default <$arch_dir>) 144 145 -make_j number of processes to parallelize installations (default <$make_j>) 142 146 143 147 ........fin … … 173 177 "-arch_dir") arch_dir=$2; shift; shift;; 174 178 "-veget") veget=$2; shift; shift;; 179 "-make_j") make_j=$2; shift; shift;; 175 180 *) bash install_lmdz.sh -h; exit 1 176 181 esac … … 312 317 # Copy arch to different components 313 318 # TODO check that this doesn't error if the source and destination are the same 314 for dir in "IOIPSL" "ORCHIDEE" "LMDZ" ; do319 for dir in "IOIPSL" "ORCHIDEE" "LMDZ" "XIOS"; do 315 320 \cp -f "$arch_dir/arch-$arch.fcm" "$MODEL/modipsl/modeles/$dir/arch" 316 321 \cp -f "$arch_dir/arch-$arch.path" "$MODEL/modipsl/modeles/$dir/arch" … … 319 324 # TODO TEMP compat w/ old orch version - make a proper case later 320 325 sed -i'' -e "s/-I//" -e "s/-L//" "$MODEL/modipsl/modeles/ORCHIDEE/arch/arch-$arch.path" # /!\ we only replace first occurence on purpose 326 327 # Adapt for XIOS, which uses different naming conventions 328 # TODO >:c ugly fdefault-real-8 fix 329 sed -i'' -e "s/%COMPILER/%FCOMPILER/" -e "s/%LINK/%LINKER/" -e "s/-fdefault-real-8//" "$MODEL/modipsl/modeles/XIOS/arch/arch-$arch.fcm" 321 330 } 322 331 … … 425 434 if [[ $with_xios = 1 ]]; then 426 435 cd "$MODEL/modipsl/modeles" 427 xioslog="$(pwd)/ xios.log"436 xioslog="$(pwd)/XIOS/xios.log" 428 437 echo "##########################################################" 429 438 echo "Compiling XIOS (log $xioslog) $(date)" … … 445 454 446 455 cd XIOS 447 if ! ./make_xios --arch "$arch" --job 8 --arch_path "$arch_dir"> "$xioslog" 2>&1; then456 if ! ./make_xios --arch "$arch" --job 8 > "$xioslog" 2>&1; then 448 457 echo "XIOS compilation failed, exiting"; exit 1 449 458 fi … … 451 460 echo "Compiled XIOS $(date)" 452 461 fi 462 463 XIOS_LIBDIR_="$MODEL/modipsl/modeles/XIOS/lib" 464 XIOS_INCDIR_="$MODEL/modipsl/modeles/XIOS/inc" 453 465 } 454 466 … … 458 470 elif [[ $veget = "CMIP6" ]]; then 459 471 veget_version=orchidee2.0 460 orchidee_rev=6592461 472 else # specific orchidee revision newer than CMIP6, on 2_1 or 2_2 branches 462 473 veget_version=orchidee2.1 463 orchidee_rev="$veget"464 474 if [[ $veget -lt 4465 ]]; then 465 475 echo 'ORCHIDEE version must be >=4465, exiting' … … 510 520 local varenv="IOIPSL_LIBDIR_=$IOIPSL_LIBDIR_ IOIPSL_INCDIR_=$IOIPSL_INCDIR_ ORCHPATH=$ORCHPATH" 511 521 if [[ $parallel = "none" ]]; then 512 echo "$varenv ./makeorchidee_fcm $xios_orchid $opt_orc -parallel none -arch $arch -j 8" > compile.sh522 echo "$varenv ./makeorchidee_fcm $xios_orchid $opt_orc -parallel none -arch $arch -j $make_j" > compile.sh 513 523 else 514 524 if [[ ! -d src_parallel ]]; then … … 516 526 fi 517 527 { 518 echo "$varenv ./makeorchidee_fcm -j 8-clean $xios_orchid $opt_orc -parallel $parallel -arch $arch"519 echo "$varenv ./makeorchidee_fcm -j 8$xios_orchid $opt_orc -parallel $parallel -arch $arch"528 echo "$varenv ./makeorchidee_fcm -j $make_j -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch" 529 echo "$varenv ./makeorchidee_fcm -j $make_j $xios_orchid $opt_orc -parallel $parallel -arch $arch" 520 530 } > compile.sh 521 531 fi … … 576 586 577 587 # Compile 578 local varenv="IOIPSL_LIBDIR_=$IOIPSL_LIBDIR_ IOIPSL_INCDIR_=$IOIPSL_INCDIR_ ORCH_LIBDIR_=$ORCH_LIBDIR_ ORCHPATH=$ORCHPATH "579 makelmdz="makelmdz_fcm $optim_debug -arch $arch -j 8"588 local varenv="IOIPSL_LIBDIR_=$IOIPSL_LIBDIR_ IOIPSL_INCDIR_=$IOIPSL_INCDIR_ ORCH_LIBDIR_=$ORCH_LIBDIR_ ORCHPATH=$ORCHPATH XIOS_INCDIR_=$XIOS_INCDIR_ XIOS_LIBDIR_=$XIOS_LIBDIR_" 589 makelmdz="makelmdz_fcm $optim_debug -arch $arch -j $make_j" 580 590 if [[ $parallel = "none" ]]; then 581 591 echo "$varenv ./$makelmdz $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " > compile.sh … … 603 613 604 614 if [[ $bench = "tuto" ]]; then 605 myget Training/tutorial.tar; tar xf tutorial.tar; cd TUTORIAL615 myget "Training/tutorial.tar"; tar xf tutorial.tar; cd TUTORIAL 606 616 ./init.sh 607 617 elif [[ $bench = 1 ]]; then … … 810 820 install_netcdf 811 821 install_IOIPSL 812 #install_XIOS # TODO disabled for now, did not decide which flags/arch to use for compile 822 install_XIOS 813 823 compile_orchidee 814 824 compile_lmdz
Note: See TracChangeset
for help on using the changeset viewer.