- Timestamp:
- Jul 18, 2018, 11:33:58 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install_lmdz.sh
r3093 r3375 48 48 \cp -f -p ~/LMDZ/pub/$1 . 49 49 else 50 wget http://www.lmd.jussieu.fr/~lmdz/pub/$150 wget -nv http://www.lmd.jussieu.fr/~lmdz/pub/$1 51 51 #dir=~/LMDZ/pub/`dirname $1` ; mkdir -p $dir ; cp -r `basename $1` $dir 52 52 fi … … 73 73 ioipsl=1 74 74 veget=1 75 orchidee_rev="" # ORCHIDEE revision (empty means use the provided version) 75 76 bench=1 76 77 pclinux=1 78 pcmac=0 # default: not on a Mac 77 79 compiler=gfortran 78 80 SCM=0 … … 95 97 with_xios="n" 96 98 opt_makelmdz_xios="" 99 ## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0) 100 compile_with_fcm=1 101 cosp=0 ; opt_cosp="" 102 103 # Check if on a Mac 104 if [ `uname` = "Darwin" ] 105 then 106 pcmac=1 107 export MAKE=make 108 fi 109 #echo "pcmac="$pcmac 97 110 98 111 ######################################################################### … … 133 146 134 147 -gprof to compile with -pg to enable profiling with gprof 148 149 -orchidee_rev "svn_release" : upgrade included ORCHIDEE model to 150 given svn release number (ORCHIDEE svn password required!) 151 (only valid for orchidee2.0 and later) 152 153 -cosp to compile with cosp 154 155 -nofcm to compile without fcm 135 156 136 157 -SCM install 1D version automatically … … 148 169 "-d") grid_resolution=$2 ; shift ; shift ;; 149 170 "-gprof") OPT_GPROF="-pg" ; shift ;; 171 "-cosp") cosp=1 ; opt_cosp="-cosp true" ; shift ;; 172 "-orchidee_rev") orchidee_rev=$2 ; shift ; shift ;; 173 "-nofcm") compile_with_fcm=0 ; shift ;; 150 174 "-SCM") SCM=1 ; shift ;; 151 175 "-opt_makelmdz") OPT_MAKELMDZ="$2" ; shift ; shift ;; … … 169 193 170 194 171 ## compile_with_fcm=1 : use makelmdz_fcm (1) or makelmdz (0)172 compile_with_fcm=1173 195 arch=local 174 196 … … 189 211 o_ins_make="-t ada" ; 190 212 make=gmake ; 191 #module load intel/2013.0 ;213 module load intel/2013.0 ; 192 214 arch=X64_ADA ;; 193 215 194 cicla ) compiler="gfortran" ;216 cicla|camel) compiler="gfortran" ; 195 217 if [ $parallel != none ] ; then 196 module load openmpi/1. 4.5-gfortran ;218 module load openmpi/1.6.5-gfortran ; 197 219 root_mpi=$MPI_HOME ; 198 220 path_mpi=$root_mpi/bin ; … … 212 234 fi 213 235 # For Scientifique Linux with gfortran at LMD : 214 elif [ -f /usr/lib64/openmpi/1.4.5-gfortran/bin/mpif90 -a compiler = "gfortran" ] ; then236 elif [ -f /usr/lib64/openmpi/1.4.5-gfortran/bin/mpif90 -a $compiler = "gfortran" ] ; then 215 237 path_mpi=/usr/lib64/openmpi/1.4.5-gfortran/bin ; 216 238 root_mpi=/usr/lib64/openmpi/1.4.5-gfortran ; 217 239 export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH 218 240 # For Scientifique Linux with ifort at LMD : 219 elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a compiler = "ifort" ] ; then241 elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a $compiler = "ifort" ] ; then 220 242 path_mpi=/usr/lib64/openmpi/1.4.5-ifort/bin ; 221 243 root_mpi=/usr/lib64/openmpi/1.4.5-ifort ; 222 244 export LD_LIBRARY_PATH=${root_mpi}/lib:$LD_LIBRARY_PATH 223 245 # For Scientifique Linux with pgf90 at LMD : 224 elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a compiler = "pgf90" ] ; then246 elif [ -f /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90 -a $compiler = "pgf90" ] ; then 225 247 path_mpi=/usr/lib64/openmpi/1.4.5-pgf/bin ; 226 248 root_mpi=/usr/lib64/openmpi/1.4.5-pgf ; … … 363 385 export CXX=icpc 364 386 export CXXFLAGS="-O2 -ip -fpic -mcmodel=large" 387 export fpp_flags="-P -traditional" 365 388 compile_with_fcm=1 366 389 … … 537 560 tmp >| AA_make.gdef 538 561 562 if [ $pcmac == 1 ] 563 then 564 cp AA_make.gdef tmp 565 sed -e 's/rpath=/rpath,/g' tmp > AA_make.gdef 566 fi 567 539 568 540 569 # We use lines for g95 even for the other compilers to run ins_make … … 546 575 \cp -f ~rdzt401/bin/AA_make.gdef . 547 576 fi 577 548 578 chmod u=rwx ins_make.bash 549 579 ./ins_make.bash $o_ins_make … … 625 655 echo '##########################################################' 626 656 cd $MODEL/modipsl/modeles 657 xioslog=`pwd`/xios.log 658 echo "log file: $xioslog" 627 659 #wget http://www.lmd.jussieu.fr/~lmdz/Distrib/install_xios.bash 628 660 myget import/install_xios.bash 629 661 chmod u=rwx install_xios.bash 630 ./install_xios.bash -prefix $MODEL/modipsl/modeles \ 662 if [ ${hostname:0:5} = ada33 ] ; then 663 ./install_xios.bash \ 664 -prefix /workgpfs/rech/gzi/rgzi027/LMDZ20180221.trunk/modipsl/modeles \ 665 -netcdf /smplocal/pub/NetCDF/4.1.3/mpi -hdf5 /smplocal/pub/HDF5/1.8.9/par \ 666 -MPI /smplocal/intel/compilers_and_libraries_2017.2.174/linux/mpi/intel64/ \ 667 -arch X64_ADA > xios.log 2>&1 668 else 669 ./install_xios.bash -prefix $MODEL/modipsl/modeles \ 631 670 -netcdf ${ncdfdir} -hdf5 ${ncdfdir} \ 632 -MPI $root_mpi -arch $arch 671 -MPI $root_mpi -arch $arch > xios.log 2>&1 672 fi 673 if [ -f XIOS/lib/libxios.a ] ; then 674 echo "OK, XIOS library successfully generated" 675 fi 633 676 fi 634 677 … … 644 687 export ORCHPATH=`pwd` 645 688 if [ -d tools ] ; then 646 orchidee_rev=2247 689 if [ "$orchidee_rev" != "" ] ; then 690 set +e ; svn upgrade ; svn update -r $orchidee_rev ; set -e 691 fi 647 692 veget_version=orchidee2.0 648 693 cd arch … … 661 706 echo "IOIPSL_INCDIR=$ORCHPATH/../../lib" >> arch-local.path 662 707 echo "IOIPSL_LIBDIR=$ORCHPATH/../../lib" >> arch-local.path 708 echo 'XIOS_INCDIR=${ORCHDIR}/../XIOS/inc' >> arch-local.path 709 echo 'XIOS_LIBDIR="${ORCHDIR}/../XIOS/lib -lxios"' >> arch-local.path 663 710 cd ../ 664 711 # compiling ORCHIDEE sequential mode … … 722 769 echo 'ORCH_LIBDIR=$LMDGCM/../../lib' >> arch-local.path 723 770 724 BASE_LD="$BASE_LD -Wl,-rpath=${ncdfdir}/lib" 725 # arch-local.fcm file (adapted from arch-linux-32bit.fcm) 771 if [ $pcmac == 1 ] ; then 772 BASE_LD="$BASE_LD -Wl,-rpath,${ncdfdir}/lib" 773 else 774 BASE_LD="$BASE_LD -Wl,-rpath=${ncdfdir}/lib" 775 fi 776 # Arch-local.fcm file (adapted from arch-linux-32bit.fcm) 726 777 727 778 if [ $real = r8 ] ; then FPP_DEF=NC_DOUBLE ; else FPP_DEF="" ; fi … … 770 821 # sequential compilation and bench 771 822 if [ "$sequential" = 1 ] ; then 772 echo "./$makelmdz $OPT_MAKELMDZ -rrtm true -d ${grid_resolution} -v $veget_version gcm " >> compile.sh 773 chmod +x ./compile.sh ; ./compile.sh > $lmdzlog 2>&1 823 echo "./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh 824 chmod +x ./compile.sh 825 if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi 774 826 echo install.sh apres_compilation `date` 775 827 … … 838 890 if [ ${hostname:0:5} = ada33 ] ; then echo "module load intel/2013.0" > compile.sh ; fi 839 891 echo resol=${grid_resolution} >> compile.sh 840 echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh 841 chmod +x ./compile.sh ; ./compile.sh > $lmdzlog 2>&1 892 echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh 893 chmod +x ./compile.sh 894 if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi 842 895 843 896 echo "Compilation finished"
Note: See TracChangeset
for help on using the changeset viewer.