Changeset 4663


Ignore:
Timestamp:
08/16/19 15:12:59 (5 years ago)
Author:
jgipsl
Message:

As done in compilat_ipslcm6.sh [4622]:

  • Add date on the output text file to avoid deleating preivously file if recompilation
  • Check and remove dimensions.h and .lock in LMDZ to avoid makelmdz_fcm interupt the compilation with the question:

"WARNING: you are probably already compiling the model somewhere else.
Wait until the first compilation is finished before launching this one.
If you are sure that you are not compiling elsewhere, just answer
yes (or 'oui') to the question below to proceed.
Do you wish to continue?"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v7/ICOLMDZOR_v7/compile_icolmdzor.sh

    r4409 r4663  
    3030 
    3131# Output text file for compilation of each component 
    32 outfile=$submitdir/out_compile_icolmdzor 
     32datestr=`LC_ALL=C date +"%Y%m%dT%H%M"` 
     33outfile=$submitdir/out_compile_icolmdzor.$datestr 
    3334rm -f $outfile; echo > $outfile 
    34 echo; echo "Text output from compilation will be stored in file out_compile_icolmdzor"; echo  
     35echo; echo "Text output from compilation will be stored in file out_compile_icolmdzor.$datestr"; echo  
    3536 
    3637#### Read arguments  
     
    201202echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile  
    202203 
     204# Check if the compilation of LMDZ was previsouly interupted prematured.  
     205# In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm  
     206# to ask question and wait for interactivly answer from the user. 
     207if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 
     208  echo >> $outfile 
     209  echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile 
     210  echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile 
     211  echo "           The files dimension.h and .lock will now be removed. "   >> $outfile 
     212  echo >> $outfile 
     213  rm -f libf/grid/dimensions.h 
     214  rm -f .lock 
     215fi 
     216 
    203217echo ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_flag    >> $outfile  
    204218     ./makelmdz_fcm -p lmd -rrtm true -cosp true -$optmode -mem -parallel $parallel -libphy -v orchidee2.1 -io xios -arch $fcm_arch -j 8 $full_flag    >> $outfile 2>&1 
     
    253267    echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm_3d}"   >> $outfile  
    254268 
     269    # Check if the compilation of LMDZ was previsouly interupted prematured.  
     270    # In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm  
     271    # to ask question and wait for interactivly answer from the user. 
     272    if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then 
     273        echo >> $outfile 
     274        echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile 
     275        echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile 
     276        echo "           The files dimension.h and .lock will now be removed. "   >> $outfile 
     277        echo >> $outfile 
     278        rm -f libf/grid/dimensions.h 
     279        rm -f .lock 
     280    fi 
    255281    echo ./makelmdz_fcm -d ${resol_atm_3d} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_flag gcm    >> $outfile  
    256282         ./makelmdz_fcm -d ${resol_atm_3d} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -j 8 $full_flag gcm    >> $outfile 2>&1 
     
    295321 
    296322echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile 
    297 echo; echo "ALL COMPILING FINISHED" 
     323echo ls -lrt modipsl/bin >> $outfile 
     324ls -lrt $modipsl/bin >> $outfile 
     325 
     326echo; echo "ALL COMPILING FINISHED" ; echo 
     327echo "Executables are found in modipsl/bin" 
     328echo "Check that executable names correspond with the name set in config.card before launching the job" 
     329echo ls -lrt modipsl/bin 
     330ls -lrt $modipsl/bin 
    298331 
    299332date 
Note: See TracChangeset for help on using the changeset viewer.