source: CONFIG/UNIFORM/v6/IPSLCM6.2/compile_ipslcm6.sh @ 4998

Last change on this file since 4998 was 4975, checked in by jgipsl, 4 years ago

Update as done in LMDZOR_v6.3 in changeset [4973]:

  • Change automatiquement -parallel mpi_omp vers -parallel mpi sur obelix
  • Ajoute test si le fichier fcm.bld.lock dans la compilatiation d'ORCHIDEE et efface le s'il existe
  • Also add more names for machines at Climserv (loholt|camelot)

v7/ICOLMDZOR_v7/ARCH/arch-X64_IRENE.env : as done in v6.2 configurations to avoid error message from makelmdz_fcm when doing module purge.

  • Property svn:executable set to *
File size: 17.8 KB
RevLine 
[4268]1#!/bin/bash
2#set -vx
3# Default options
4#
5#
6#
[4409]7date
[4268]8#### 1  Set up the compiling options
9#### Define some directories
10submitdir=$( pwd )
11modipsl=$submitdir/../..
[4275]12arch_path=$submitdir/ARCH
[4611]13mysrc_path=$submitdir/SOURCES
[4268]14
[4278]15#### Set default options
[4471]16# Atmospheric resolution, for LMDZ/ORCHIDEE in regular mode
17resol_atm=144x142x79
18# Oceanic resolution, for NEMO (ORCA2/ORCA1/ORCA025)
19resol_oce=ORCA1
20# Version of ice model lim2/lim3
[4611]21icemodel=lim3
22# Coupled with ocean biogeochemistry (y/n)
23oceanbio=y
[4471]24# Version ESM CO2: CO2 interactif ocean/atmosphere (y/n)
25esmco2=n
[4707]26# Version ESM AER : Aer interactif chemistry / atmosphere (y/n)
27esmaer=n
[4641]28# Also compile ce0l subprogram to LMDZ (y/n)
29ce0l=n
[4471]30
[4268]31# Optimization mode
32# optmode=prod/dev/debug
33optmode=prod
34# fcm_arch
35fcm_arch=default
36# Default values to be overritten
[4339]37parallel=mpi_omp
[4268]38export fcm_arch parallel xios
39full_flag=""
[4611]40full_nemo=n
[4707]41full_inca=""
[4641]42full_xios=""
43full_lmdz=""
44full_orch=""
[4268]45
[4641]46
47
[4408]48# Output text file for compilation of each component
[4622]49datestr=`LC_ALL=C date +"%Y%m%dT%H%M"`
50outfile=$submitdir/out_compile_ipslcm6.$datestr
51echo > $outfile
[4641]52echo; echo "Text output from compilation will be stored in file out_compile_ipslcm6.$datestr"; echo 
[4408]53
[4278]54#### Read arguments
[4268]55# Loop over all arguments to modify default set up
56while (($# > 0)) ; do
[4278]57    case $1 in
[4641]58        "-h") cat <<end_help
[4268]59########################################################################
[4471]60# Usage of the script compile_ipslcm6.sh
[4268]61#
62########################################################################
63
[4471]64./compile_ipslcm6.sh [Options]
[4268]65
66
[4611]67Options: [LR / VLR / MR1 / MR025] Model resolution, choose only one. Default: LR.
[4471]68         [ESMCO2] Compile IPSLCM6 for CO2 interactif ocean/atmosphere.
[4707]69         [ESMAER] Compile IPSLCM6 for AER interactif on atmosphere
[4471]70         [-full] Full recompilation of all components. This option can be added to all other options.
[4611]71         [-cleannemo] Full recompilation of NEMO component  only.
[4471]72         [-debug / -dev / -prod] Level of optimization. One of these can be added to all other compile options. Default: -prod.
[4268]73
[4407]74
[4471]75Example 1: Default compilation of IPSLCM6 for resoltion LR
76          (Resolution atmos: 144x142x79, ocean: ORCA1)
77./compile_ipslcm6.sh
[4268]78
[4471]79Example 2: Compilation of IPSLCM6 for resolution MR025
80           (atmos: 256x256x79, ocean: ORCA025, NOPISCES)
81./compile_ipslcm6.sh MR025
[4268]82
[4471]83Example 3: Compilation of IPSLCM6 for ESM CO2
[4611]84./compile_ipslcm6.sh ESMCO2 -cleannemo
[4471]85
86Example 4: Default resoltuion (LR) compiled in debug mode
87./compile_ipslcm6.sh -debug
88
89Example 5: Default compilation with full recompilation of all components. No clean is needed.
90./compile_ipslcm6.sh -full
91
92Example 6: Full recompilation of resolution MR05 in debug mode
93./compile_ipslcm6.sh MR025 -debug -full
94
[4641]95end_help
96exit;;
97        "VLR")         resol_atm=96x95x39; resol_oce=ORCA2 ; icemodel=lim2; oceanbio=y; shift ;;
98        "LR")          resol_atm=144x142x79; resol_oce=ORCA1 ; icemodel=lim3; oceanbio=y; shift ;;
99        "MR1")         resol_atm=256x256x79; resol_oce=ORCA1 ; icemodel=lim3; oceanbio=y; shift ;;
100        "MR025")       resol_atm=256x256x79; resol_oce=ORCA025 ; icemodel=lim3; oceanbio=n;   shift ;;
101        "ESMCO2")      esmco2=y;  shift ;;
[4707]102        "ESMAER")      esmaer=y; shift ;;
[4641]103        "CE0L")        ce0l=y ; shift ;;
104        "-parallel")   parallel=$2 ; shift ; shift ;;
105        "-arch")       fcm_arch="$2" ; shift ; shift ;;
106        "-debug")      optmode=debug ; shift ;;
107        "-dev")        optmode=dev ; shift ;;
108        "-prod")       optmode=prod ; shift ;;
109        "-full")       full_flag="-full"; full_nemo=y ; full_xios="--full" ; full_lmdz="-full" ; full_orch="-full" ; shift ;;
110        "-full_xios")  full_xios="--full" ; shift ;;  # Note only full_xios is using double dash: --full
111        "-full_lmdz")  full_lmdz="-full"  ; shift ;;
112        "-full_orch")  full_orch="-full"  ; shift ;;
113        "-full_nemo")  full_nemo=y ; shift ;;
[4707]114        "-full_inca")  full_inca="-clean"; shift ;;
[4641]115        "-cleannemo")  full_nemo=y ; shift ;;
[4644]116        *)             echo "unknown option "$1" , exiting..." ; exit
[4278]117    esac
118done
[4268]119
[4641]120echo "Following options are set in current compiling:" >> $outfile
121echo "   resol_atm=${resol_atm}, resol_oce=${resol_oce}, icemodel=${icemodel}, oceanbio=${oceanbio}" >> $outfile 
[4471]122echo "   esmco2=${esmco2}" >> $outfile 
[4641]123echo "   ce0l=${ce0l}" >> $outfile 
124echo "   optmode = $optmode, parallel = $parallel, fcm_arch = $fcm_arch " >> $outfile 
125echo "   full_flag=$full_flag, full_xios=$full_xios, full_lmdz=$full_lmdz, full_orch=$full_orch, full_nemo=$full_nemo," >> $outfile 
[4408]126echo >> $outfile
[4268]127
[4278]128### Read host dependent default values
129### These variables will not be changed if they were set as argument
[4268]130###./host.sh $host
131# Later : Following lines should be set in host.sh file
132# begin host.sh
133if [ $fcm_arch == default ] ; then
[4278]134    # Find out current host and source specific paths and commands for the host
135    case $( hostname -s ) in
[4932]136        jean-zay*)
137            fcm_arch=X64_JEANZAY;;
[4278]138        irene*)
[4391]139            fcm_arch=X64_IRENE;;
[4278]140        asterix*|obelix*)
[4975]141            fcm_arch=ifort_LSCE
142            if [ "${parallel}" == "mpi_omp" ] ; then
143                echo "Warning!! Currently at Obelix hybrid mode is not possible."
144                echo "          Option -parallel mpi_omp is now changed to -parallel mpi"
145                echo ""
146                parallel=mpi
147            else
148                echo "You used -parallel" $parallel
149            fi ;;
150        ciclad*|climserv*|loholt*|camelot*)
[4391]151            fcm_arch=ifort_CICLAD;;
[4278]152        *)
[4391]153            echo Current host is not known. You must use option -arch to specify which architecuture files to use.
[4278]154            echo Exit now.
155            exit
156    esac
[4268]157fi
158
[4452]159# Set a link to arch.env if arch-${fcm_arch}.env file exist for current fcm_arch.
[4391]160# The link arch.env is also set in config.card and will be used by libIGCM to ensure the same running environnement.
161if [ -f ARCH/arch-${fcm_arch}.env ] ; then
[4408]162    echo >> $outfile
[4932]163    echo "The file ARCH/arch-${fcm_arch}.env will now be sourced with modules needed for compilation for all components."
[4470]164    echo "Note that this new environement might be kept after compilation." 
165    echo "If this is the case, source again your personal environment after compilation. "
166    echo " Personal module list before sourcing of ARCH/arch.env file:"    >> $outfile 
167    module list   >> $outfile 2>&1
168
169    # Make a link to this file, to be used also in config.card
[4391]170    rm -f ARCH/arch.env
171    ln -s arch-${fcm_arch}.env ARCH/arch.env
[4470]172
173    # Source the file
174    source ARCH/arch.env   >> $outfile 2>&1
175    echo >> $outfile 
176    echo " New module list after sourcing of ARCH/arch.env file:"    >> $outfile 
177    module list   >> $outfile 2>&1
[4391]178fi
179
[4268]180#### 2 Do the compilation
181## 2.1 Compile ioipsl
182cd $modipsl/modeles/IOIPSL
[4278]183echo; echo "NOW COMPILE IOIPSL"
[4408]184echo >> $outfile ; echo " NOW COMPILE IOIPSL"   >> $outfile 
185
[4411]186# Check if compilation with fcm is included in IOIPSL
187if [ ! -f makeioipsl_fcm ] ; then
188  echo "The file makeiopsl_fcm do not exist. Probably this is not the right version of IOIPSL."
189  echo "Version of IOIPSL with fcm compilation is needed to compile with this script. Stop now."
190  exit
191fi
192
[4408]193echo ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag   >> $outfile 
194     ./makeioipsl_fcm -$optmode -parallel -arch ${fcm_arch} -arch_path $arch_path -j 8 $full_flag   >> $outfile 2>&1
[4268]195# Test if compiling succeded
196if [[ $? != 0 ]] ; then
[4278]197    echo "THERE IS A PROBLEM IN IOIPSL COMPILATION - STOP"
198    exit
[4268]199fi
200
[4611]201## 2.2 Compile oasis3-mct
[4627]202cd $modipsl/oasis3-mct/util/make_dir
[4611]203echo; echo "NOW COMPILE OASIS3-MCT"
204echo >> $outfile ; echo " NOW COMPILE OASIS3-MCT"   >> $outfile
[4627]205cp $mysrc_path/OASIS3-MCT/make_${fcm_arch} make.inc
[4611]206
[4627]207echo make -f TopMakefileOasis3 >> $outfile
208     make -f TopMakefileOasis3 >> $outfile 2>&1
209
210
[4611]211## 2.3 Compile xios
[4268]212cd $modipsl/modeles/XIOS
[4278]213echo; echo "NOW COMPILE XIOS"
[4408]214echo >> $outfile ; echo " NOW COMPILE XIOS"   >> $outfile 
[4641]215echo ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path --job 4 $full_xios   >> $outfile 
216     ./make_xios --use_oasis oasis3_mct --$optmode --arch $fcm_arch --arch_path $arch_path --job 4 $full_xios   >> $outfile 2>&1
[4268]217# Test if compiling succeded
218if [[ $? != 0 ]] ; then
[4278]219    echo "THERE IS A PROBLEM IN XIOS COMPILATION - STOP"
220    exit
[4268]221fi
[4391]222# Move executables to modipsl/bin
[4457]223if [ -f $modipsl/modeles/XIOS/bin/xios_server.exe ] ; then
224    mv $modipsl/modeles/XIOS/bin/xios_server.exe $modipsl/bin/xios_server_${optmode}.exe
[4391]225else
226    echo "THERE IS A PROBLEM IN XIOS COMPILATION EXECUTABLE MISSING - STOP"
227    exit
228fi
[4268]229
[4391]230
[4611]231## 2.4 Compile orchidee
[4268]232cd $modipsl/modeles/ORCHIDEE
[4278]233echo; echo "NOW COMPILE ORCHIDEE"
[4408]234echo >> $outfile ; echo " NOW COMPILE ORCHIDEE"   >> $outfile 
235
[4975]236# Check if the compilation of ORCHIDEE was previsouly interupted prematured.
237# In that case, the files fcm.bld.lock exist. If the file exist, it is here removed to avoid makeorchidee_fcm
238# to ask question and wait for interactivly answer from the user.
239if [ -f build/fcm.bld.lock ] ; then
240    echo >> $outfile
241    echo " WARNING!! The file ORCHIDEE/build/fcm.bld.lock exist. "   >> $outfile
242    echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
243    echo "           The file will now be removed. "   >> $outfile
244    echo >> $outfile
245    rm -f build/fcm.bld.lock
246fi
247
[4641]248echo    ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch   >> $outfile 
249        ./makeorchidee_fcm -j 8 -xios -parallel $parallel -$optmode -arch ${fcm_arch} -arch_path $arch_path $full_orch   >> $outfile 2>&1
[4268]250# Test if compiling finished
251if [[ $? != 0 ]] ; then
252    echo "THERE IS A PROBLEM IN ORCHIDEE COMPILATION - STOP"
253    exit
254fi
255
[4408]256
[4611]257## 2.5 Compile NEMO
258nemo_root=$modipsl/modeles/NEMOGCM/CONFIG
259if [ ${icemodel} == lim2 ] ; then
260   addkeys="key_lim2_vp key_diahth key_oasis3"
261   delkeys="key_nosignedzero key_mpp_rep"
262else
[4626]263   addkeys="key_top key_pisces key_age key_cfc key_cpl_carbon_cycle key_gas key_oasis3"
[4611]264   if [ ${oceanbio} == y ] ; then
265      if [ ${esmco2} == y ] ; then
266         delkeys="key_nosignedzero key_mpp_rep"
267      else
268         delkeys="key_nosignedzero key_mpp_rep key_cpl_carbon_cycle key_gas"
269      fi
270   else
271      delkeys="key_nosignedzero key_mpp_rep key_top key_pisces key_cfc key_age key_cpl_carbon_cycle key_gas"
272   fi
273fi
274
275if [ ${oceanbio} == n ] ; then
276   echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES"
277   echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and without PISCES"   >> $outfile
278else
279   echo; echo "NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES"
280   echo >> $outfile ; echo " NOW COMPILE NEMO. Resolution = ${resol_oce} with icemodel ${icemodel} and PISCES"   >> $outfile
281fi
282echo >> $outfile ; echo cd $nemo_root  >> $outfile
283echo >> $outfile ; echo cp $modipsl/config/IPSLCM6/SOURCES/NEMO/arch-${fcm_arch}.fcm ../ARCH/.   >> $outfile
284echo >> $outfile
285
286cd $nemo_root ; cp $mysrc_path/NEMO/arch-${fcm_arch}.fcm ../ARCH/.
287
288if [ ${resol_oce} == ORCA2 ]   ; then  cfg_wrk=ORCA2_LIM_PISCES    ; fi
289if [ ${resol_oce} == ORCA1 ]   ; then  cfg_wrk=ORCA1_LIM3_PISCES    ; fi
290if [ ${resol_oce} == ORCA025 ] ; then  cfg_wrk=ORCA025_LIM3_PISCES  ; fi
291
292echo cp $modipsl/config/IPSLCM6/SOURCES/NEMO/*.*90 $nemo_root/$cfg_wrk/MY_SRC/   >> $outfile
293echo >> $outfile
294cp $mysrc_path/NEMO/*.*90  $nemo_root/$cfg_wrk/MY_SRC/
295
296if [ $full_nemo == y ] ; then
[4641]297   # To make a full compilation, first make a clean to remove all files produced during previous compilation
[4611]298   echo ./makenemo -m ${fcm_arch} -n $cfg_wrk clean   >> $outfile
299   echo >> $outfile
300   ./makenemo -m ${fcm_arch} -n $cfg_wrk clean  >> $outfile 2>&1
301fi
[4627]302echo ./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys"  del_key "$delkeys"   >> $outfile
303echo >> $outfile
304./makenemo -m ${fcm_arch} -n $cfg_wrk -j16 add_key "$addkeys"  del_key "$delkeys"  >> $outfile 2>&1
[4611]305
[4627]306
[4611]307# Test if compiling finished
308if [[ $? != 0 ]] ; then
309    echo "THERE IS A PROBLEM IN NEMO COMPILATION - STOP"
310    exit
311fi
312
[4627]313echo >> $outfile
[4629]314echo "Move nemo executable to modipsl/bin" >> $outfile
[4627]315echo ls -lrt $nemo_root/$cfg_wrk/BLD/bin   >> $outfile
316ls -lrt $nemo_root/$cfg_wrk/BLD/bin  >> $outfile
317echo >> $outfile
318
[4642]319if [ -f $nemo_root/$cfg_wrk/BLD/bin/nemo.exe ] ; then
320    if [ ${esmco2} == y ] ;  then
[4645]321        mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa.ESMCO2_${resol_oce}_${optmode}
[4642]322    else
[4645]323        mv $nemo_root/$cfg_wrk/BLD/bin/nemo.exe $modipsl/bin/opa_${resol_oce}_${optmode}
[4642]324    fi
325fi
[4611]326
327
328## 2.6 Compile LMDZ for regular latlon configuration
[4707]329# If necessary compile INCA modele with AER configuration
330if [ ${esmaer} == y ] ;  then
331    cd $modipsl/modeles/INCA
332    #compile INCA regulat lat_lon chimie librairy
333    echo; echo "NOW COMPILE INCA AER on resolution = ${resol_atm}"
334    echo ./makeinca_fcm -chimie AER -$optmode -xios -parallel mpi_omp -resol ${resol_atm} -j 8 -arch ${fcm_arch}  -arch_path $arch_path $full_flag $full_inca >> $outfile 
335    ./makeinca_fcm -chimie AER -$optmode -xios -parallel mpi_omp -resol ${resol_atm} -j 8 -arch ${fcm_arch} -arch_path $arch_path  $full_flag $full_inca >> $outfile 2>&1
336
337    # Test if compiling finished
338    if [[ $? != 0 ]] ; then
339        echo "THERE IS A PROBLEM IN INCA COMPILATION - STOP"
340        exit
341    fi
342
343    echo "Move inca.dat modipsl/bin"
344    if [[ -f $modipsl/modeles/INCA/SIMULATIONS/AER/inca.dat ]] ;  then 
345        mv $modipsl/modeles/INCA/SIMULATIONS/AER/inca.dat $modipsl/bin/inca_${resol_atm}_${optmode}_AER.dat ;
346    else
347        echo "THERE IS A PROBLEM IN INCA COMPILATION - STOP"
348        exit   
349    fi
350       
351fi 
352
353
[4932]354# Compile LMDZ regular lat-lon executable
[4469]355cd $modipsl/modeles/LMDZ
356echo; echo "NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"
357echo >> $outfile ; echo " NOW COMPILE LMDZ REGULAR LAT-LON MODE. Resolution = ${resol_atm}"   >> $outfile 
[4268]358
[4622]359# Check if the compilation of LMDZ was previsouly interupted prematured.
360# In that case, the files dimension.h and .lock exist. If the files exist, they are here removed to avoid makelmdz_fcm
361# to ask question and wait for interactivly answer from the user.
362if [ -f libf/grid/dimensions.h ] || [ -f .lock ] ; then
363  echo >> $outfile
364  echo " WARNING!! The file LMDZ/libf/grid/dimension.h and/or the LMDZ/.lock exist. "   >> $outfile
365  echo "           This means that the compilation is either currently on going in another terminal was previous interupted before the end."   >> $outfile
366  echo "           The files dimension.h and .lock will now be removed. "   >> $outfile
367  echo >> $outfile
368  rm -f libf/grid/dimensions.h
369  rm -f .lock
370fi
371
[4707]372if [ ${esmaer} == n ] ;  then
373    echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
374    ./makelmdz_fcm -d ${resol_atm} -c OMCT -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1
375else
376    #in esm aer case add chemistry option to lmdz compilation
377    echo ./makelmdz_fcm -d ${resol_atm} -c OMCT -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 
378    ./makelmdz_fcm -d ${resol_atm} -c OMCT -rrtm true -$optmode -mem -parallel $parallel -chimie INCA -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz gcm    >> $outfile 2>&1
379fi 
[4469]380# Test if compiling finished
381if [[ $? != 0 ]] ; then
382    echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
383    exit
384fi
[4408]385
[4469]386# Move executables to modipsl/bin folder
[4627]387echo >> $outfile
[4641]388echo "Move gcm.e executable to modipsl/bin" >> $outfile
[4627]389echo ls -lrt $modipsl/modeles/LMDZ/bin   >> $outfile
390ls -lrt $modipsl/modeles/LMDZ/bin  >> $outfile
391echo >> $outfile
[4707]392if [ ${esmaer} == n ] ;  then
393    suffix=_${resol_atm}_phylmd_para_mem_orch_couple.e
394else
395    suffix=_${resol_atm}_phylmd_para_mem_orch_couple_inca.e
396fi
[4643]397echo gcm suffix = $suffix
[4627]398
[4641]399if [ -f $modipsl/modeles/LMDZ/bin/gcm${suffix} ] ;  then
[4707]400    if [ ${esmaer} == n ] ;  then
401        mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}.e
402    else
403        mv $modipsl/modeles/LMDZ/bin/gcm${suffix} $modipsl/bin/gcm_${resol_atm}_${optmode}_AER.e
404    fi
[4641]405else
406    echo "ERROR gcm${suffix} executable does not exist." 
407    echo "THERE IS A PROBLEM IN LMDZ REGULAR LATLON COMPILATION - STOP"
408    exit
409fi 
[4278]410
[4268]411
[4641]412# Compile ce0l initialization program for LMDZ regular lat-lon exectuable
413if [ $ce0l == y ] ; then
414    echo; echo "NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"
415    echo >> $outfile ; echo " NOW COMPILE CE0L OF LMDZ. Resolution = ${resol_atm}"   >> $outfile 
416   
417    echo ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 
418    ./makelmdz_fcm -d ${resol_atm} -p lmd -rrtm true -$optmode -mem -parallel $parallel -io xios -v orchidee2.1 -arch $fcm_arch -arch_path $arch_path -j 8 $full_lmdz ce0l    >> $outfile 2>&1
419    # Test if compiling finished
420    if [[ $? != 0 ]] ; then
421        echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP"
422        exit
423    fi
424
425
426    # Move executables to modipsl/bin folder
427    echo >> $outfile
428    echo "Move ce0l.e executable to modipsl/bin" >> $outfile
429    echo ls -lrt $modipsl/modeles/LMDZ/bin   >> $outfile
430    ls -lrt $modipsl/modeles/LMDZ/bin  >> $outfile
431    echo >> $outfile
432    suffix=_${resol_atm}_phylmd_para_mem_orch.e
433    echo ce0l suffix = $suffix
434
435    if [ -f $modipsl/modeles/LMDZ/bin/ce0l${suffix} ] ;  then
436        mv $modipsl/modeles/LMDZ/bin/ce0l${suffix} $modipsl/bin/ce0l_${resol_atm}_${optmode}.e
437    else
438        echo "ERROR ce0l${suffix} executable does not exist." 
439        echo "THERE IS A PROBLEM IN CE0L (LMDZ) REGULAR LATLON COMPILATION - STOP"
440        exit
441    fi 
442fi
443
[4408]444echo >>$outfile ; echo "ALL COMPILING FINISHED" >> $outfile
[4628]445echo ls -lrt modipsl/bin >> $outfile
446ls -lrt $modipsl/bin >> $outfile
[4278]447
[4628]448echo; echo "ALL COMPILING FINISHED" ; echo
449echo "Executables are found in modipsl/bin"
450echo "Check that executable names correspond with the name set in config.card before launching the job"
[4629]451echo ls -lrt modipsl/bin
452ls -lrt $modipsl/bin
[4628]453
[4409]454date
[4627]455
[4268]456exit
457
458
Note: See TracBrowser for help on using the repository browser.