Changeset 4018 for BOL


Ignore:
Timestamp:
Nov 24, 2021, 12:16:45 PM (3 years ago)
Author:
Laurent Fairhead
Message:

Rajout de commentaire par Adriana

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3983 r4018  
    3434###########################################################################
    3535
    36 echo install.sh DEBUT `date`
     36echo install_lmdz.sh DEBUT `date`
    3737
    3838set -e
     
    8181# - NONE: bucket scheme (default)
    8282# - CMIP6: orchidee version used in CMIP exercise, rev 5661
    83 # - number: orchidee version number (not yet implemented)
     83# - number: orchidee version number
    8484veget=NONE
    8585# choose the resolution for the bench runs
     
    380380       echo 'Please choose a new one (ifort) and change the line'
    381381       echo compiler=xxx
    382        echo in the install.sh script and rerun it
     382       echo in the install_lmdz.sh script and rerun it
    383383       if [ `which gfortran44 | wc -w` -ne 0 ] ; then
    384384          gfortran=gfortran44
     
    559559cd $MODEL
    560560myget src/modipsl_orc_cmip6.$version.tar.gz
    561 echo install.sh wget_OK `date`
     561echo install_lmdz.sh wget_OK `date`
    562562gunzip modipsl_orc_cmip6.$version.tar.gz
    563563tar xvf modipsl_orc_cmip6.$version.tar
    564564\rm modipsl_orc_cmip6.$version.tar
    565565fi
    566 
    567 echo OK1
    568566
    569567if [ $netcdf = 1 ] ; then
     
    607605  fi
    608606fi  # of if [ "$with_xios" = "n" ]
    609 echo install.sh netcdf_OK `date`
     607echo install_lmdz.sh netcdf_OK `date`
    610608fi # of if [ $netcdf = 1 ]
    611609
    612610#======================================================================================
    613 echo OK2 ioipsl=$ioipsl
     611echo OK ioipsl=$ioipsl
    614612echo '##########################################################'
    615613echo 'Installing MODIPSL, the installation package manager for the '
    616614echo 'IPSL models and tools'
    617615echo '##########################################################'
     616echo `date`
    618617
    619618if [ $netcdf = 0 -o $netcdf = 1 ] ; then
     
    671670  fi # of if [ "$use_shell" = "ksh" ]
    672671
     672echo install_lmdz.sh MODIPSL_OK `date`
    673673#=======================================================================================
    674674  cd $MODEL/modipsl/modeles/IOIPSL/src
     
    677677  echo 'Compiling IOIPSL, the interface library with Netcdf'
    678678  echo '##########################################################'
     679  echo `date`
    679680  echo log file : $ioipsllog
    680681
     
    724725   
    725726  fi
    726   echo install.sh ioipsl_OK `date`
     727  echo install_lmdz.sh ioipsl_OK `date`
    727728fi # of if [ $ioipsl = 1 ]
    728729# Saving ioipsl lib for possible parallel compile
     
    737738  cd $MODEL/modipsl/modeles
    738739  xioslog=`pwd`/xios.log
    739   echo "log file: $xioslog"
    740740  #wget http://www.lmd.jussieu.fr/~lmdz/Distrib/install_xios.bash
    741741  myget import/install_xios.bash
    742742  chmod u=rwx install_xios.bash
    743    if [ ${hostname:0:5} = jean- ] ; then
    744 #    echo 'Need to work on install_xios implementation for jean-zay'
    745 #    exit
    746    svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 XIOS
    747    cd XIOS/arch
    748    svn update
    749    cd ..
    750    ./make_xios --prod --arch $arch --job 4 > xios.log 2>&1
    751    else
     743  if [ ${hostname:0:5} = jean- ] ; then
     744     svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5 XIOS
     745     cd XIOS/arch
     746     svn update
     747     cd ..
     748     echo "Compiling XIOS, start" `date` "(it takes about 20 min on Jean-Zay)"
     749     echo "log file: $xioslog"
     750     ./make_xios --prod --arch $arch --job 4 > xios.log 2>&1
     751  else
    752752     ./install_xios.bash -prefix $MODEL/modipsl/modeles \
    753753                      -netcdf ${ncdfdir} -hdf5 ${ncdfdir} \
    754754                      -MPI $root_mpi -arch $arch > xios.log 2>&1
    755    fi
    756    if [ -f XIOS/lib/libxios.a ] ; then
    757      echo "OK, XIOS library successfully generated"
    758    fi
     755  fi # of case Jean-Zay
     756  if [ -f XIOS/lib/libxios.a ] ; then
     757     echo "XIOS library successfully generated"
     758     echo install_lmdz.sh XIOS_OK `date`
     759  fi
    759760fi
    760761
     
    778779     orcbranch=`svn log -v -q svn://forge.ipsl.jussieu.fr/orchidee/ -r $veget |grep ORCHIDEE |head -1| sed -e 's:ORCHIDEE/.*$:ORCHIDEE:' | awk '{print $2}'`
    779780     # switch to that branch
     781     echo IF YOU INSTALL ORCHIDEE THE VERY FIRST TIME, ASK for PASSWORD at orchidee-help@listes.ipsl.fr
    780782     svn switch -r $veget --accept theirs-full svn://forge.ipsl.jussieu.fr/orchidee/$orcbranch
    781783     svn log -r $veget | grep  $veget
     
    793795  orchideelog=`pwd`/orchidee.log
    794796  echo '########################################################'
    795   echo 'Compiling ORCHIDEE, the continental surfaces model '
     797  echo 'Compiling ORCHIDEE, the continental surface model '
    796798  echo '########################################################'
     799  echo Start of the first compilation of orchidee, in sequential mode: `date`
    797800  echo log file : $orchideelog
     801
    798802  export ORCHPATH=`pwd`
    799803  xios_orchid="-noxios"
     
    828832     echo 'XIOS_LIBDIR="${ORCHDIR}/../XIOS/lib -lxios"' >> arch-local.path
    829833     cd ../
    830 # compiling ORCHIDEE sequential mode
    831              
     834
     835     echo ./makeorchidee_fcm -j $xios_orchid $opt_orc -parallel none -arch $arch
    832836     ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel none -arch $arch > $orchideelog 2>&1
    833      echo ./makeorchidee_fcm -j $xios_orchid $opt_orc -parallel none -arch $arch
    834      echo End of the first compilation of orchidee ; pwd
    835   else
     837     pwd
     838  else # of "if [ -d tools ]"
    836839     if [ -d src_parallel ] ; then
    837840       liste_src="parallel parameters global stomate sechiba driver"
     
    846849        cd ..
    847850     done
    848   fi
    849   echo install.sh orchidee_OK `date`
    850 fi # of if [ "$veget" = 1 ]
     851  fi # of "if [ -d tools ]"
     852  echo install_lmdz.sh orchidee_compil_seq_OK `date`
     853fi # of if [ "$veget" != 'NONE' ]
    851854
    852855
     
    854857# Ehouarn: the directory name LMDZ* depends on version/tar file...
    855858if [ -d $MODEL/modipsl/modeles/LMD* ] ; then
    856   echo '##########################################################'
    857   echo 'Compiling LMDZ'
    858   echo '##########################################################'
     859  echo '###############################################################'
     860  echo 'Preparing LMDZ compilation : arch file, svn switch if needed...'
     861  echo '###############################################################'
    859862  cd $MODEL/modipsl/modeles/LMD*
    860863  LMDZPATH=`pwd`
     
    930933
    931934echo '##################################################################'
    932 echo Compile LMDZ
     935echo "Preparing script compile.sh for LMDZ compilation"
     936echo "It will only be run automatically if bench=1"
     937echo Here bench=$bench
    933938echo '##################################################################'
    934 echo log file : $lmdzlog
    935939
    936940if [ "$env_file" != "" ] ; then mv arch/arch-${arch}.env arch/arch-${arch}.orig ; \cp -f $env_file arch/arch-${arch}.env ; fi
    937941
    938 echo install.sh avant_compilation `date`
    939942if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " ; else makelmdz="makelmdz $optim -arch $arch" ; fi
    940943
    941 # sequential compilation and bench
     944# sequential compilation
    942945if [ "$sequential" = 1 ] ; then
    943 echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
    944 chmod +x ./compile.sh
    945 if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
    946 echo install.sh apres_compilation `date`
    947 
    948 
     946  echo Sequential compilation command, saved in compile.sh:
     947  echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm "
     948  echo "./$makelmdz $optim $OPT_MAKELMDZ $optim $opt_rad $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
     949  chmod +x ./compile.sh
     950  if [ $bench != 0 ] ; then
     951    echo install_lmdz.sh start_lmdz_seq_compilation `date`
     952    echo log file: $lmdzlog
     953    ./compile.sh > $lmdzlog 2>&1
     954    echo install_lmdz.sh end_lmdz_seq_compilation `date`
     955  fi
    949956fi # fin sequential
    950 
    951 
    952957
    953958# compiling in parallel mode
     
    956961  echo ' Parallel compile '
    957962  echo '##########################################################'
    958   # saving the sequential libs and binaries
     963  echo "(after saving the sequential libs and binaries)"
    959964  cd $MODEL/modipsl
    960965  tar cf sequential.tar bin/ lib/
     
    978983     mv tmp.fcm arch-local.fcm
    979984     cd ../
    980      echo compiling ORCHIDEE parallel mode
     985     echo Compiling ORCHIDEE in parallel mode `date`
    981986     echo logfile $orchideelog
     987     echo "NOTE : to recompile it when necessary, use ./compile_orc.sh in modipsl/modeles/ORCHIDEE"
     988     echo ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch > compile_orc.sh
     989     echo ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel -arch $arch >> compile_orc.sh
     990     echo echo Now you must also recompile LMDZ, by running ./compile.sh in modeles/LMDZ >> compile_orc.sh
     991     chmod u+x compile_orc.sh
    982992     ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch > $orchideelog 2>&1
    983993     ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel -arch $arch >> $orchideelog 2>&1
    984      echo ./makeorchidee_fcm -j 8 -clean $xios_orchid $opt_orc -parallel $parallel -arch $arch
    985      echo ./makeorchidee_fcm -j 8 $xios_orchid $opt_orc -parallel $parallel -arch $arch
     994     echo End of ORCHIDEE compilation in parallel mode `date`
    986995  elif [ $veget != 'NONE' ] ; then
    987996    echo '##########################################################'
     
    990999    echo '##########################################################'
    9911000    exit
    992   fi # of if [ -d src_parallel ]
     1001  fi # of [ -d src_parallel -a $veget != 'NONE' ]
     1002
    9931003  # LMDZ
    9941004  cd $LMDZPATH
     
    10101020  echo resol=${grid_resolution} >> compile.sh
    10111021  if [ ${hostname:0:5} = jean- -a "$cosp" = "v2" ] ; then
    1012   echo ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige
     1022 
     1023  echo LMDZ compilation command in parallel mode, saved in compile.sh, is :
     1024  echo "(ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige ! )"
    10131025# ATTENTION le probleme de cospv2 sur jean-zay en mode prod n est pas corrige
    10141026     echo ./$makelmdz -dev $optim $OPT_MAKELMDZ $opt_rad $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
     
    10191031  fi
    10201032  chmod +x ./compile.sh
    1021   if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
    1022 
    1023   echo "Compilation finished"
     1033
     1034  if [ $bench != 0 ] ; then
     1035    echo Compiling LMDZ in parallel mode `date`
     1036    echo LMDZ log file: $lmdzlog
     1037    ./compile.sh > $lmdzlog 2>&1
     1038  fi
    10241039 
    10251040fi # of if [ $parallel != "none" ]
     
    10451060else
    10461061   echo '##########################################################'
    1047    echo 'Compilation successfull !! '
     1062   echo 'Compilation successfull !! ' `date`
    10481063   echo '##########################################################'
    10491064   echo The executable is $gcm
     
    10621077\rm -rf BENCH${grid_resolution}
    10631078bench=bench_lmdz_${grid_resolution}
    1064 echo install.sh before bench download  `date`
     1079echo install_lmdz.sh before bench download  `date`
    10651080#wget http://www.lmd.jussieu.fr/~lmdz/Distrib/$bench.tar.gz
    10661081myget 3DBenchs/$bench.tar.gz
    1067 echo install.sh after bench download  `date`
     1082echo install_lmdz.sh after bench download  `date`
    10681083tar xvf $bench.tar.gz
    10691084
Note: See TracChangeset for help on using the changeset viewer.