Changeset 3610


Ignore:
Timestamp:
Nov 29, 2019, 12:33:40 PM (4 years ago)
Author:
Laurent Fairhead
Message:

Rajout d'une option debug + modif pour jean-zay
FH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3573 r3610  
    8585#                  96x71x19  standard configuration
    8686grid_resolution=144x142x79
     87grid_resolution=96x95x39
    8788grid_resolution=48x36x19
     89grid_resolution=32x32x39
    8890
    8991## parallel can take the values none/mpi/omp/mpi_omp
     
    161163
    162164    -SCM        install 1D version automatically
     165
     166    -debug      compile everything in debug mode
    163167
    164168    -opt_makelmdz     to call makelmdz or makelmdz_fcm with additional options
     
    186190                  esac ;;
    187191     "-bench") bench=$2 ; shift ; shift ;;
     192     "-debug") optim=-debug ; shift ;;
    188193     "-name") MODEL=$2 ; shift ; shift ;;
    189194     "-netcdf") netcdf=$2 ; shift ; shift ;;
     
    196201
    197202#Chemin pour placer le modele
    198 if [ "$MODEL" = "" ] ; then MODEL=./LMDZ$version$svn ; fi
     203if [ "$MODEL" = "" ] ; then MODEL=./LMDZ$version$svn$optim ; fi
    199204
    200205
     
    224229            o_ins_make="-t jeanzay" ;
    225230            make=gmake ;
     231            module purge
    226232            module load intel-compilers/19.0.4 ;
    227233            module load intel-mpi/19.0.4 ;
     
    272278            else
    273279               echo "Cannot find mpif90" ;
    274                exit ;
     280               if [ $parallel = none ] ; then exit ; fi ;
    275281            fi ;
    276282            par_comp=${path_mpi}/mpif90 ;
     
    427433   export CXXFLAGS="-O2 -ip -fpic -mcmodel=large"
    428434   export fpp_flags="-P -traditional"
    429    compile_with_fcm=1
     435   # Pourquoi forcer la compilation fcm. Marche mieux sans
     436   #compile_with_fcm=1
    430437
    431438elif [ $compiler = mpiifort ] ; then
    432    compile_with_fcm=1
     439   echo on ne fait rien la
     440   # Pourquoi forcer la compilation fcm. Marche mieux sans
     441   #compile_with_fcm=1
    433442
    434443else
     
    500509
    501510
    502 for logiciel in csh wget tar gzip make $compiler gcc ; do
     511for logiciel in wget tar gzip make $compiler gcc ; do
    503512if [ "`which $logiciel`" = "" ] ; then
    504513echo You must first install $logiciel on your system
     
    713722# Compile IOIPSL on jean-zay
    714723       cd $MODEL/modipsl/modeles/IOIPSL/src
    715        gmake
     724       gmake > ioipsl.log
     725       cd $MODEL/modipsl/modeles/IOIPSL/tools
     726       gmake > ioipsl.log
    716727   
    717728  fi # of if  [${hostname:0:5} = ada33 ]
     
    756767if [ "$veget" = 1 ] ; then
    757768  cd $MODEL/modipsl/modeles/ORCHIDEE
     769  # Correctif suite debug Jean-Zay
     770  sed -i -e 's/9010  FORMAT(A52,F17.14)/9010  FORMAT(A52,F20.14)/' src_stomate/stomate.f90
     771  opt_orc="-prod" ; if [ "$optim" = "-debug" ] ; then opt_orc="-debug" ; fi
     772
    758773  orchideelog=`pwd`/orchidee.log
    759774  echo '########################################################'
     
    770785         set +e ; svn update -r $orchidee_rev ; set -e
    771786      fi
     787      # Correctif suite debug Jean-Zay
     788      if [ -f src_global/time.f90 ] ; then sed -i -e 's/CALL tlen2itau/\!CALL tlen2itau/' src_global/time.f90 ; fi
    772789###################################################################
    773790     veget_version=orchidee2.0
     
    791808     cd ../
    792809# compiling ORCHIDEE sequential mode
    793      ./makeorchidee_fcm -j 8 -noxios -prod -parallel none -arch $arch > $orchideelog 2>&1
    794      echo ./makeorchidee_fcm -j 8 -noxios -prod -parallel none -arch $arch
     810     ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel none -arch $arch > $orchideelog 2>&1
     811     echo ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel none -arch $arch
    795812     echo End of the first compilation of orchidee ; pwd
    796813  else
     
    894911
    895912echo install.sh avant_compilation `date`
    896 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -arch $arch -j 8" ; else makelmdz="makelmdz -arch $arch" ; fi
     913if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm $optim -arch $arch -j 8 " ; else makelmdz="makelmdz $optim -arch $arch" ; fi
    897914
    898915# use the orchidee interface that has no z0h
     
    903920# sequential compilation and bench
    904921if [ "$sequential" = 1 ] ; then
    905 echo "./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
     922echo "./$makelmdz $optim $OPT_MAKELMDZ $optim -rrtm true $opt_cosp -d ${grid_resolution} -v $veget_version gcm " >> compile.sh
    906923chmod +x ./compile.sh
    907924if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
     
    942959     echo compiling ORCHIDEE parallel mode
    943960     echo logfile $orchideelog
    944      ./makeorchidee_fcm -j 8 -clean -noxios -prod -parallel $parallel -arch $arch > $orchideelog 2>&1
    945      ./makeorchidee_fcm -j 8 -noxios -prod -parallel $parallel -arch $arch >> $orchideelog 2>&1
    946      echo ./makeorchidee_fcm -j 8 -clean -noxios -prod -parallel $parallel -arch $arch
    947      echo ./makeorchidee_fcm -j 8 -noxios -prod -parallel $parallel -arch $arch
     961     ./makeorchidee_fcm -j 8 -clean -noxios $opt_orc -parallel $parallel -arch $arch > $orchideelog 2>&1
     962     ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel $parallel -arch $arch >> $orchideelog 2>&1
     963     echo ./makeorchidee_fcm -j 8 -clean -noxios $opt_orc -parallel $parallel -arch $arch
     964     echo ./makeorchidee_fcm -j 8 -noxios $opt_orc -parallel $parallel -arch $arch
    948965  elif [ $veget = 1 ] ; then
    949966    echo '##########################################################'
     
    972989  if [ ${hostname:0:5} = ada33 ] ; then echo "module load intel/2017.2" > compile.sh ; fi
    973990  echo resol=${grid_resolution} >> compile.sh
    974   echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
    975   echo ./$makelmdz $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
     991  echo ./$makelmdz $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm >> compile.sh
     992  echo ./$makelmdz $optim $OPT_MAKELMDZ -rrtm true $opt_cosp $opt_makelmdz_xios -d \$resol -v $veget_version -mem -parallel $parallel gcm
    976993  chmod +x ./compile.sh
    977994  if [ $bench != 0 ] ; then ./compile.sh > $lmdzlog 2>&1 ; fi
Note: See TracChangeset for help on using the changeset viewer.