Changeset 3735 for BOL/script_install


Ignore:
Timestamp:
Jun 25, 2020, 11:15:04 AM (4 years ago)
Author:
idelkadi
Message:

Updating install_lmdz.sh in order to run with Cospv2
Cospv2 only runs with XIOS.
To run with Cospv2 :
./install_lmdz.sh -parallel mpi_omp -xios -cospv2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r3733 r3735  
    112112cosp=0 ; opt_cosp1=""
    113113cosp=0 ; opt_cosp2=""
     114cosp=0 ; opt_cospv2=""
    114115opt_cosp=""
    115116
     
    168169    -cosp      to compile with cosp(v1)
    169170 
    170     -cosp2      to compile with cosp(v2)
     171    -cosp2      to compile with cosp(1v2)
     172
     173    -cospv2      to compile with cosp(v2)
    171174
    172175    -nofcm     to compile without fcm
     
    197200     "-cosp") cosp=1 ; opt_cosp1="-cosp true" ; shift ;;
    198201     "-cosp2") cosp2=1 ; opt_cosp2="-cosp2 true" ; shift ;;
     202     "-cospv2") cospv2=1 ; opt_cospv2="-cospv2 true" ; shift ;;
    199203     "-orchidee_rev") orchidee_rev=$2 ; shift ; shift ;;
    200204     "-nofcm") compile_with_fcm=0 ; shift ;;
     
    366370   opt_cosp="$opt_cosp2"
    367371fi
     372if [ "$cospv2" = 1 ] ; then
     373   opt_cosp="$opt_cospv2"
     374fi
    368375
    369376## if also compiling XIOS, cosp must be activate to define axis in *.xml
    370377if [ "$with_xios" = "y" ] ; then
    371   if [ ! "$cosp" = 1 -o "$cosp2" = 1 ] ; then
     378  if [ "$cosp" = 0 -a  "$cosp2" = 0 -a "$cospv2" = 0 ] ; then
    372379   echo "Error, you must use -cosp option when compiling with -xios"
    373380   echo "You need to call Cosp in physical first step to define axis variables"
     
    375382  fi
    376383  opt_makelmdz_xios="-io xios"
     384fi
     385
     386if [ "$cospv2" = 1 -a "$with_xios" = "n" ] ; then
     387  echo "Error, Cospv2 cannot run without Xios"
     388  exit
    377389fi
    378390
     
    10371049tar xvf $bench.tar.gz
    10381050
    1039 if [ "$cosp" = 1 -o "$cosp2" = 1 ] ; then
     1051if [ "$cosp" = 1 -o "$cosp2" = 1 -o "$cospv2" = 1 ] ; then
    10401052  cd BENCH${grid_resolution}
    10411053# copier les fichiers namelist input et output our COSP
    1042   cp ../DefLists/cosp_input_nl.txt .
    1043   cp ../DefLists/cosp_output_nl.txt .
     1054  cp ../DefLists/cosp*_input_nl.txt .
     1055  cp ../DefLists/cosp*_output_nl.txt .
    10441056# Activer la cles ok_cosp pour tourner avec COSP
    10451057  sed -e 's@ok_cosp=n@ok_cosp=y@' config.def > tmp
     
    10891101
    10901102  #activer les sorties pour Cosp
    1091   if [ "$cosp" = 1 ] ; then
     1103  if [ "$cosp" = 1 -o "$cosp2" = 1 ] ; then
    10921104   histfile=file_def_histdayCOSP_lmdz.xml
    10931105   sed -e 's@enabled=".FALSE."@enabled=".TRUE."@' $histfile > tmp ; \mv -f tmp $histfile
     
    10951107   sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile
    10961108  fi
     1109  if [ "$cospv2" = 1 ] ; then
     1110   histfile=file_def_histdayCOSPv2_lmdz.xml
     1111   sed -e 's@compression_level="2"@compression_level="0"@' $histfile > tmp ; \mv -f tmp $histfile
     1112   contextfile=context_lmdz.xml
     1113   sed -e 's@src="./file_def_histdayCOSP_lmdz.xml"@src="./file_def_histdayCOSPv2_lmdz.xml"@' $contextfile > tmp ; \mv -f tmp $contextfile
     1114   fieldfile=field_def_lmdz.xml
     1115   sed -e 's@field_def_cosp1.xml@field_def_cospv2.xml@' $fieldfile > tmp ; \mv -f tmp $fieldfile
     1116  fi
     1117
    10971118  cd ..
    10981119fi
     
    11161137     echo "export OMP_NUM_THREADS=2" >> bench.sh
    11171138   fi
    1118    echo "ulimit -s unlimited" >> bench.sh
     1139   if [ "$cospv2" = 1 -o "$cosp" = 1 -o "$cosp2" = 1 ] ; then
     1140      echo "ulimit -s 200000" >> bench.sh
     1141   else
     1142      echo "ulimit -s unlimited" >> bench.sh
     1143   fi
    11191144   if [ ${hostname:0:5} = jean- ] ; then
    11201145     echo "srun -n 2 -A $idris_acct@cpu gcm.e > listing  2>&1" >> bench.sh
Note: See TracChangeset for help on using the changeset viewer.