Changeset 4408


Ignore:
Timestamp:
04/29/19 17:04:57 (5 years ago)
Author:
jgipsl
Message:

Redirect output from compilation into file

File:
1 edited

Legend:

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

    r4407 r4408  
    99submitdir=$( pwd ) 
    1010modipsl=$submitdir/../.. 
    11 echo modipsl=$modipsl  
    12 echo submitdir=$submitdir 
    1311arch_path=$submitdir/ARCH  
    1412export ROOT=$modipsl/modeles/DYNAMICO 
     
    3028netcdf_lib="" 
    3129 
     30# Output text file for compilation of each component 
     31outfile=$submitdir/out_compile_icolmdzor 
     32rm -f $outfile; echo > $outfile 
     33echo; echo "Text output from compilation will be stored in file out_compile_icolmdzor"; echo  
     34 
    3235#### Read arguments  
    3336# Loop over all arguments to modify default set up 
     
    98101done 
    99102 
     103echo "Following arguments are set in current compiling:" >> $outfile  
     104echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch, full_flag=$full_flag regular_latlon=$regular_latlon" >> $outfile  
     105echo >> $outfile 
    100106 
    101107### Read host dependent default values 
     
    125131# The link arch.env is also set in config.card and will be used by libIGCM to ensure the same running environnement. 
    126132if [ -f ARCH/arch-${fcm_arch}.env ] ; then 
     133    echo >> $outfile 
     134    echo "The file ARCH/arch-${fcm_arch}.env will now be sourced with modules needed for compilation." 
     135    echo "Note that this new environement will be kept after compilation." 
     136    echo "You might want to source again your personal environment after compilation. This must be done manually or by reconnection." 
     137    echo " Personal module list before sourcing of ARCH/arch.env file:"    >> $outfile  
     138    module list   >> $outfile 2>&1 
     139 
    127140    rm -f ARCH/arch.env 
    128141    ln -s arch-${fcm_arch}.env ARCH/arch.env 
    129     source ARCH/arch.env 
    130 fi 
    131  
    132 ##### End host.sh 
    133 echo 
    134 echo "Following arguments are set in current compiling:" 
    135 echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch, full_flag=$full_flag regular_latlon=$regular_latlon" 
     142    source ARCH/arch.env   >> $outfile 2>&1 
     143 
     144    echo >> $outfile 
     145    echo " New module list after sourcing of ARCH/arch.env file:"    >> $outfile  
     146    module list   >> $outfile 2>&1 
     147fi 
    136148 
    137149#### 2 Do the compilation  
     
    139151cd $modipsl/modeles/IOIPSL 
    140152echo; echo "NOW COMPILE IOIPSL" 
    141 echo ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag 
    142 ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag 
     153echo >> $outfile ; echo " NOW COMPILE IOIPSL"   >> $outfile  
     154 
     155echo ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag   >> $outfile  
     156     ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag   >> $outfile 2>&1 
    143157# Test if compiling succeded  
    144158if [[ $? != 0 ]] ; then  
     
    150164cd $modipsl/modeles/XIOS 
    151165echo; echo "NOW COMPILE XIOS" 
    152 echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path --job 4 $full_flag 
    153 ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_flag 
     166echo >> $outfile ; echo " NOW COMPILE XIOS"   >> $outfile  
     167echo ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_flag   >> $outfile  
     168     ./make_xios --$optmode --arch $fcm_arch --arch_path $arch_path ${netcdf_lib} --job 4 $full_flag   >> $outfile 2>&1 
    154169# Test if compiling succeded  
    155170if [[ $? != 0 ]] ; then  
     
    169184cd $modipsl/modeles/ORCHIDEE 
    170185echo; echo "NOW COMPILE ORCHIDEE" 
    171 echo    ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} $full_flag 
    172 ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} $full_flag 
     186echo >> $outfile ; echo " NOW COMPILE ORCHIDEE"   >> $outfile  
     187 
     188echo    ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} $full_flag    >> $outfile  
     189        ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} $full_flag    >> $outfile 2>&1 
    173190# Test if compiling finished 
    174191if [[ $? != 0 ]] ; then 
     
    181198# Compile LMDZ as library to couple to DYNAMICO 
    182199echo; echo "NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO" 
    183 echo ./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 
    184 ./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 
     200echo >> $outfile ; echo " NOW COMPILE LMDZ FOR COUPLING TO DYNAMICO"   >> $outfile  
     201 
     202echo ./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  
     203     ./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 
    185204# Test if compiling finished 
    186205if [[ $? != 0 ]] ; then 
     
    191210 
    192211## 2.5 Compile DYNAMICO 
     212cd $modipsl/modeles/DYNAMICO 
    193213echo; echo "NOW COMPILE DYNAMICO " 
    194 cd $modipsl/modeles/DYNAMICO 
    195 echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_flag 
    196 ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_flag 
     214echo >> $outfile ; echo " NOW COMPILE DYNAMICO"   >> $outfile  
     215 
     216echo ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_flag    >> $outfile  
     217     ./make_icosa -$optmode -parallel $parallel -external_ioipsl -with_xios -arch $fcm_arch -arch_path $arch_path -job 8 $full_flag    >> $outfile 2>&1 
    197218# Test if compiling finished 
    198219if [[ $? != 0 ]] ; then 
     
    202223 
    203224## 2.6 Compile interface ICOSA_LMDZ 
     225cd $modipsl/modeles/ICOSA_LMDZ 
    204226echo; echo "NOW COMPILE ICOSA_LMDZ " 
    205 cd $modipsl/modeles/ICOSA_LMDZ 
    206 echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_flag 
    207  
    208 ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_flag 
     227echo >> $outfile ; echo " NOW COMPILE ICOSA_LMDZ"   >> $outfile  
     228 
     229echo ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_flag    >> $outfile  
     230     ./make_icosa_lmdz -nodeps -p lmd -$optmode -parallel $parallel -with_orchidee -arch ${fcm_arch} -arch_path ${arch_path} -job 8 $full_flag    >> $outfile 2>&1 
    209231# Test if compiling finished 
    210232if [[ $? != 0 ]] ; then 
     
    228250    # Compile LMDZ regular lat-lon exectuable 
    229251    echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm_3d}" 
    230     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 
    231     ./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 
     252    echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm_3d}"   >> $outfile  
     253 
     254    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  
     255         ./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 
    232256    # Test if compiling finished 
    233257    if [[ $? != 0 ]] ; then 
     
    238262    # Compile ce0l initialization program for LMDZ regular lat-lon exectuable 
    239263    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm_3d}" 
    240     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 ce0l 
    241     ./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 ce0l 
     264    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm_3d}"   >> $outfile  
     265 
     266    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 ce0l    >> $outfile  
     267         ./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 ce0l    >> $outfile 2>&1 
    242268    # Test if compiling finished 
    243269    if [[ $? != 0 ]] ; then 
     
    267293 
    268294 
    269 echo  
    270 echo "ALL COMPILING FINISHED" 
    271 echo 
     295echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile 
     296echo; echo "ALL COMPILING FINISHED" 
    272297 
    273298exit 
Note: See TracChangeset for help on using the changeset viewer.