Ignore:
Timestamp:
Jun 23, 2014, 10:35:34 AM (11 years ago)
Author:
jghattas
Message:

Updated all compile envrionement with r2064 from the trunk.

Location:
LMDZ5/branches/LMDZ5-DOFOCO
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_ADA.fcm

    r1781 r2071  
    1111%MPI_FFLAGS
    1212%OMP_FFLAGS          -openmp
    13 %BASE_LD             -shared-intel  -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -L/smplocal/pub/FFTW/3.3.3_dyn/lib -lfftw3 -Wl,-rpath=/smplocal/pub/NetCDF/4.1.3/lib:/smplocal/pub/HDF5/1.8.9/seq/lib:/smplocal/pub/FFTW/3.3.3_dyn/lib
    14 %MPI_LD
     13%BASE_LD             -L/smplocal/pub/FFTW/3.3.3_dyn/lib -lfftw3 -shared-intel  -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -Wl,-rpath=/smplocal/pub/NetCDF/4.1.3/mpi/lib:/smplocal/pub/HDF5/1.8.9/par/lib:/smplocal/pub/FFTW/3.3.3_dyn/lib
     14%MPI_LD             
    1515%OMP_LD              -openmp
    1616
  • LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_ADA.path

    r1718 r2071  
    1 NETCDF_LIBDIR="${NETCDF_LDFLAGS:--L/smplocal/pub/NetCDF/4.1.3/lib -lnetcdff -lnetcdf -L/smplocal/pub/HDF5/1.8.9/seq/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz}"
    2 NETCDF_INCDIR="${NETCDF_FFLAGS:--I/smplocal/pub/HDF5/1.8.9/seq/include -I/smplocal/pub/NetCDF/4.1.3/include}"
     1NETCDF_LIBDIR="${NETCDF_LDFLAGS:--L/smplocal/pub/NetCDF/4.1.3/mpi/lib -lnetcdff -lnetcdf -L/smplocal/pub/HDF5/1.8.9/par/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz}"
     2NETCDF_INCDIR="${NETCDF_FFLAGS:--I/smplocal/pub/HDF5/1.8.9/par/include -I/smplocal/pub/NetCDF/4.1.3/mpi/include}"
    33IOIPSL_INCDIR=$LMDGCM/../../lib
    44IOIPSL_LIBDIR=$LMDGCM/../../lib
     5XIOS_INCDIR=$LMDGCM/../XIOS/inc
     6XIOS_LIBDIR=$LMDGCM/../XIOS/lib
    57ORCH_INCDIR=$LMDGCM/../../lib
    68ORCH_LIBDIR=$LMDGCM/../../lib
    7 OASIS_INCDIR=$LMDGCM/../../prism/X64/build/lib/psmile.$couple
    8 OASIS_LIBDIR=$LMDGCM/../../prism/X64/lib
     9OASIS_INCDIR=$LMDGCM/../../oasis3-mct/BLD/build/lib/psmile.MPI1
     10OASIS_LIBDIR=$LMDGCM/../../oasis3-mct/BLD/lib
    911INCA_LIBDIR=$LMDGCM/../INCA/config/lib
    1012INCA_INCDIR=$LMDGCM/../INCA/config/lib
  • LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_CURIE.fcm

    r1725 r2071  
    55%FPP_FLAGS           -P -traditional
    66%FPP_DEF             NC_DOUBLE BLAS SGEMV=DGEMV SGEMM=DGEMM FFT_MKL
    7 %BASE_FFLAGS         -i4 -r8 -auto -align all -I${MKLROOT}/include
     7#%BASE_FFLAGS         -xHost -i4 -r8 -auto -align all -I$(MKL_INC_DIR) -I$(MKL_INC_DIR)/intel64/lp64
     8%BASE_FFLAGS         -i4 -r8 -auto -align all -I$(MKL_INC_DIR) -I$(MKL_INC_DIR)/intel64/lp64
    89%PROD_FFLAGS         -O3
    910%DEV_FFLAGS          -p -g -O2 -traceback -fp-stack-check
  • LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_CURIE.path

    r1640 r2071  
    55ORCH_INCDIR=$LMDGCM/../../lib
    66ORCH_LIBDIR=$LMDGCM/../../lib
    7 OASIS_INCDIR=$LMDGCM/../../prism/X64/build/lib/psmile.$couple
    8 OASIS_LIBDIR=$LMDGCM/../../prism/X64/lib
     7OASIS_INCDIR=$LMDGCM/../../oasis3-mct/BLD/build/lib/psmile.MPI1
     8OASIS_LIBDIR=$LMDGCM/../../oasis3-mct/BLD/lib
    99INCA_LIBDIR=$LMDGCM/../INCA/config/lib
    1010INCA_INCDIR=$LMDGCM/../INCA/config/lib
    11 
     11XIOS_INCDIR=$LMDGCM/../XIOS/inc
     12XIOS_LIBDIR=$LMDGCM/../XIOS/lib
  • LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-gfortran.fcm

    r1936 r2071  
    33%AR                  ar
    44%MAKE                make
    5 %FPP_FLAGS           -P -traditional
    65%FPP_DEF             NC_DOUBLE
    7 %BASE_FFLAGS         -c -fdefault-real-8
     6%BASE_FFLAGS         -fdefault-real-8
    87%PROD_FFLAGS         -O3
    9 %DEV_FFLAGS          -O
    10 %DEBUG_FFLAGS        -ffpe-trap=invalid,zero,overflow -fbounds-check -g3 -O0 -fstack-protector-all
     8%DEV_FFLAGS          -g -O1
     9%DEBUG_FFLAGS        -g -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check -fstack-protector-all
    1110%MPI_FFLAGS
    1211%OMP_FFLAGS         
    13 %BASE_LD     
     12%BASE_LD             
    1413%MPI_LD
    1514%OMP_LD             
  • LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-gfortran.path

    r1936 r2071  
    11NETCDF_LIBDIR="-L/usr/local/lib -lnetcdf"
    22NETCDF_INCDIR=-I/usr/local/include
    3 IOIPSL_INCDIR=$LMDGCM/../../lib
    4 IOIPSL_LIBDIR=$LMDGCM/../../lib
     3#IOIPSL_INCDIR=$LMDGCM/../../lib
     4#IOIPSL_LIBDIR=$LMDGCM/../../lib
     5IOIPSL_INCDIR=/home/jgipsl/INSTALLSH/LMDZ20111103.trunk/modipsl/lib
     6IOIPSL_LIBDIR=/home/jgipsl/INSTALLSH/LMDZ20111103.trunk/modipsl/lib
    57ORCH_INCDIR=$LMDGCM/../../lib
    68ORCH_LIBDIR=$LMDGCM/../../lib
  • LMDZ5/branches/LMDZ5-DOFOCO/bld.cfg

    r1789 r2071  
    2424src::dyn     %SRC_PATH/%DYN
    2525src::phys    %SRC_PATH/%PHYS
     26#src::sisvat  %SRC_PATH/%PHYS/sisvat
     27#src::rrtm  %SRC_PATH/%PHYS/rrtm
    2628src::grid    %SRC_PATH/grid
    2729src::filtrez %SRC_PATH/filtrez
    2830src::bibio   %SRC_PATH/bibio
     31src::dyn3d_common   %SRC_PATH/dyn3d_common
    2932src::cosp    %COSP
    3033src::ext_src %EXT_SRC
    3134
    32 bld::lib::dyn      %DYN
    33 bld::lib::phys     %PHYS
    34 bld::lib::grid      grid
    35 bld::lib::filtrez   filtrez
    36 bld::lib::bibio     bibio
    37 bld::lib::cosp      cosp
    38 bld::lib: ext_src   ext_src
    39 
     35bld::lib            lmdz
    4036
    4137bld::outfile_ext::exe    %SUFF_NAME.e
    42 bld::target              lib%{DYN}.a lib%{PHYS}.a libgrid.a libfiltrez.a libbibio.a libcosp.a libext_src.a
     38bld::target              liblmdz.a
    4339bld::target              %EXEC%SUFF_NAME.e
    44 bld::exe_dep             %{DYN} %{PHYS} grid filtrez bibio cosp ext_src
     40bld::exe_dep             
    4541
    4642
     
    6460
    6561
     62# Example of how to set specific compiling options for a specific file
     63# -> this can be including in the arch.opt file
    6664#bld::tool::fflags::phys::readaerosol         %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -C hopt -pi auto
    67 #bld::tool::fflags::phys::aeropt_2bands       %BASE_FFLAGS %PROD_FFLAGS  %INCDIR
    68 #bld::tool::fflags::phys::radiation_AR4       %BASE_FFLAGS %PROD_FFLAGS1 %INCDIR -C hopt -Wf,-O,extendreorder
    69 #bld::tool::fflags::phys::radiation_AR4_param %BASE_FFLAGS %PROD_FFLAGS1 %INCDIR -C hopt -f3
    70 #bld::tool::fflags::phys::fisrtilp            %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -C hopt
    71 #bld::tool::fflags::phys::cv30_routines       %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -Wf,-O,extendreorder
    72 #bld::tool::fflags::phys::cvltr               %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -C hopt
    73 #bld::tool::fflags::phys::clouds_gno          %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -C hopt
    74 #bld::tool::fflags::dyn::vlsplt_p             %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -C hopt
    75 #bld::tool::fflags::dyn::groupeun_p           %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -C hopt
    7665
    7766
     
    9584bld::excl_dep        use::mod_prism_get_proto
    9685bld::excl_dep        use::mod_prism_put_proto
    97 bld::excl_dep        use::mkl_dfti
     86bld::excl_dep        use::mod_prism
     87bld::excl_dep        use::xios
     88bld::excl_dep        use::iaxis
     89bld::excl_dep        use::iaxis_attr
     90bld::excl_dep        use::icontext_attr
     91bld::excl_dep        use::idate
     92bld::excl_dep        use::idomain_attr
     93bld::excl_dep        use::ifield_attr
     94bld::excl_dep        use::ifile_attr
     95bld::excl_dep        use::ixml_tree
    9896
    9997# Don't generate interface files
     
    106104bld::outfile_ext::mod .mod
    107105bld::tool::SHELL   /bin/bash
     106bld::tool::SHELL   /bin/ksh
  • LMDZ5/branches/LMDZ5-DOFOCO/build_gcm

    r1755 r2071  
    2929fi
    3030
     31job=1
    3132dirname="" #path to where the fcm command will be found
    3233if (( $# >= 1 )) ; then
     
    3940  # add a trailing "/" to $dirname
    4041  dirname=${dirname}"/"
     42  shift;
    4143fi
    4244
    4345# run "fcm build" command
    44 ${dirname}fcm build
     46${dirname}fcm build $*
    4547
    4648# cleanup
  • LMDZ5/branches/LMDZ5-DOFOCO/create_make_gcm

    r1714 r2071  
    55#set -xv
    66
    7 rm -f create_make_gcm.log
    87
    98machine=`hostname`
    109os=`uname`
    1110gcm=`pwd`
     11logfile=$gcm/create_make_gcm.log
     12rm -f $logfile ; touch -f $logfile
    1213libf=$gcm/libf
    1314libo=$gcm/libo
     
    4243echo 'LIBF    = $(GCM)/libf'
    4344if [ "$CRAY" = '0' ] ; then
    44 #   echo 'LIBO    = $(GCM)/libo/$(MACHINE)'
    4545   echo 'LIBO    = $(LIBOGCM)/$(MACHINE)'
    4646else
    4747   echo 'LIBO    = $(GCM)/libo'
    4848fi
    49 #echo 'LOCAL_DIR=$(GCM)'
    50 #echo $localdir
    5149echo "LOCAL_DIR=`echo $localdir`"
    5250echo 'BIBIO    = $(LIBF)/bibio'
    5351echo "FILTRE   = filtre"
    5452echo "PHYS  = "
    55 echo "DYN  = dyn "
    5653echo 'LIBPHY = $(LIBO)/libphy$(PHYS).a'
    5754echo 'DIRMAIN=dyn$(DIM)d$(FLAG_PARA)'
     
    6158echo
    6259echo '# Les differentes librairies pour l"edition des liens:'
    63 echo
    64 echo 'dyn3d            = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a'
    65 echo 'dyn3dpar      = $(LIBO)/libdyn3dpar.a $(LIBO)/lib$(FILTRE).a'
    66 echo 'dyn2d            = $(LIBO)/libdyn2d.a'
    67 echo 'dyn1d            = $(LIBO)/libdyn1d.a'
    68 echo 'L_DYN      = -ldyn$(DIM)d$(FLAG_PARA)'
     60echo 'L_DYN      = -ldyn$(DIM)d$(FLAG_PARA) -ldyn3d_common'
    6961echo 'L_FILTRE   = -l$(FILTRE)'
    7062echo 'L_PHY = -lphy$(PHYS) '
     
    9385echo
    9486echo "PROG = code"
     87echo 'DYN  = dyn$(DIM)d'
    9588echo
    9689#echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) '
     
    9992echo '  cd $(LOCAL_DIR); \'
    10093echo '  $(COMPILE90) $(LIBF)/$(DIRMAIN)/$(SOURCE) -o $(PROG).o ; \'
    101 echo '  $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_PHY) $(L_DYN) $(L_BIBIO) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o '
    102 echo
    103 echo 'dyn : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(FILTRE)$(DIM)d'
     94echo '  $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_PHY) $(L_DYN) $(L_DYN3D_COMMON) $(L_BIBIO) $(L_DYN3D_COMMON) $(L_PHY) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o '
    10495echo
    10596echo 'phys : $(LIBPHY)'
     97echo 'dyn3d : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(LIBO)/lib$(FILTRE).a $(LIBO)/libdyn3d_common.a'
     98echo 'dyn2d : $(LIBO)/libdyn2d.a'
     99echo 'dyn1d :'
     100echo
    106101echo
    107102#echo 'chimie : $(LIBO)/libchimie.a'
     
    143138      done
    144139      echo
    145       echo $listlib >> create_makeg_gcm.log
     140      echo $listlib >> $logfile
    146141      echo
    147142      echo "#=================================================================="
     
    176171##########################################################################
    177172
    178          for stri in ` ( sed -e '/^[cC\!]/d' $trufile | sed -n "/\#include/s/\#include//p" | sed 's/\"//g' ; sed -e '/^[cC\!]/d' $trufile | egrep -i '^ *use ' | sed -e 's/,/ /' | awk ' { print $2 } ' ) ` ; do
    179             echo $trufile $fili $stri >> create_make_gcm.log
     173         for stri in ` ( sed -e '/^[cC\!]/d' $trufile | sed -e "/\#include /s/\#include /XXnclude /" -e "/include /s/include /XXnclude /" -e "/INCLUDE /s/INCLUDE /XXnclude /" | sed -n "/XXnclude /s/XXnclude//p" | sed 's/\"//g' | sort | uniq ; sed -e '/^[cC\!]/d' $trufile | egrep -i '^ *use ' | sed -e 's/,/ /' | awk ' { print $2 } ' | sort | uniq ) ` ; do
     174            echo $trufile $fili $stri >> $logfile
    180175            strj=`echo $stri | tr [A-Z] [a-z]`
    181176            str2=""
    182             for dirinc in filtrez bibio grid dyn3d $diri $diri/*/ ; do
     177            for dirinc in filtrez bibio dyn3d_common grid dyn3d phydev $diri $diri/*/ ; do
    183178# Recherche dans l'ordre hierarchique inverse car seule la derniere
    184179# ligne est conservee
     180               if [ $dirinc = phydev ] ; then
     181                   dirstr='$(PHYS)'
     182                   libstr='phy$(PHYS)'
     183               else
     184                   dirstr=$dirinc
     185                   libstr=$dirinc
     186               fi
     187               echo dirinc $dirinc >> $logfile
    185188               if [ -f $dirinc/$stri ] ; then
    186                   str2='$(LIBF)/'$dirinc/$stri
     189                  str2='$(LIBF)/'$dirstr/$stri
    187190               elif [ -f $dirinc/$strj ] ; then
    188                   str2='$(LIBF)/'$dirinc/$stri
     191                  str2='$(LIBF)/'$dirstr/$stri
    189192               elif [ -f $dirinc/$strj.F90 ]  || [ -f $dirinc/$strj.F ]  ; then
    190                   strlib=`echo $dirinc | awk -F/ ' { print $1 } '`
     193                  strlib=`echo $libstr | awk -F/ ' { print $1 } '`
    191194                  str2='$(LIBO)/lib'$strlib'.a('$strj'.o)'
     195               elif [ -f $dirinc/$stri.F90 ]  || [ -f $dirinc/$stri.F ]  ; then
     196                  strlib=`echo $libstr | awk -F/ ' { print $1 } '`
     197                  str2='$(LIBO)/lib'$strlib'.a('$stri'.o)'
    192198               fi
     199               echo stri $stri  >> $logfile
     200               echo str2 $str2  >> $logfile
    193201            done
     202               echo dernier str2 $str2  >> $logfile
    194203            if [ "$str2" = "" ] ; then
    195                echo Warn: Include $diri $trufile $fili $stri pas trouve >> $gcm/create_make_gcm.log
     204               echo Warn: Include $diri $trufile $fili $stri pas trouve >> $logfile
    196205            elif [ "$str2" = "$str1" ] ; then
    197                echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $gcm/create_make_gcm.log
     206               echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $logfile
    198207            else
    199208               echo $str1 \\
  • LMDZ5/branches/LMDZ5-DOFOCO/makegcm

    r1789 r2071  
    77# options par defaut pour la commande make
    88########################################################################
     9
     10echo ' '
     11echo 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
     12echo 'Attention makegcm n est plus supporte par l equipe de developpement'
     13echo 'Il faut maintenant utiliser ./makelmdz ou ./makelmdz_fcm              '
     14echo 'Si vous tenez absolument a utiliser makegcm, editez le script et'
     15echo 'retirer ces lignes (a vos risques et perils)'
     16echo 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
     17echo ' '
     18
     19exit
     20
     21
    922set dim="96x71x19"
    1023set physique=lmd
    1124set phys="PHYS=$physique"
    12 set include='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/filtrez -I. '
     25set include='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/dyn3d_common -I$(LIBF)/filtrez -I. '
    1326set filtre=filtrez
    1427set grille=reg
     
    2336set OPTIMI='-C debug -eC '
    2437set OPTIMI=' -ftrace '
    25 set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE"
    26 set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE"
     38set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE"
    2739set io=ioipsl
    2840set cosp=false
    29 
    30 set FC_LINUX=g95
    31 set FC_LINUX=g95
    32 #set FC_LINUX=g95
    33 if ( $FC_LINUX == g95 ) then
    34   set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE"
     41set sisvat=false
     42
     43set FC_LINUX=gfortran
     44
     45if ( $FC_LINUX == gfortran ) then
     46  set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE"
    3547else if ( $FC_LINUX == gfortran ) then
    36   set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE"
    37 #   set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE"
    38   set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE"
     48  set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE"
    3949else
    4050# pgf90 options
    41   set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE"
     51  set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE"
    4252endif
    4353
     
    5464setenv IOIPSLDIR /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/modipsl/lib
    5565setenv MODIPSLDIR /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/modipsl/lib
    56 setenv NCDFINC /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/netcdf-4.0.1/include
    57 setenv NCDFLIB /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/netcdf-4.0.1/lib
     66setenv NCDFINC /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/include
     67setenv NCDFLIB /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/lib
    5868
    5969
     
    107117  if ( ! $?NCDFLIB ) then
    108118    echo You must initialize the variable NCDFLIB in your environnement
    109     echo for instance: "setenv NCDFLIB /d3/idelkadi/MODELE_LMDZ/LMDZ20121005.trunk/netcdf-4.0.1/lib
     119    echo for instance: "setenv NCDFLIB /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/lib
    110120    exit
    111121  endif
    112122  if ( ! $?NCDFINC ) then
    113123    echo You must initialize the variable NCDFINC in your environnement
    114     echo for instance: "setenv NCDFINC /d3/idelkadi/MODELE_LMDZ/LMDZ20121005.trunk/netcdf-4.0.1/include
     124    echo for instance: "setenv NCDFINC /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/include
    115125    exit
    116126  endif
     
    262272else if $LINUX then
    263273#################
    264    if ( $FC_LINUX == pgf90 || $FC_LINUX == g95 || $FC_LINUX == gfortran ) then
     274   if ( $FC_LINUX == pgf90 || $FC_LINUX == gfortran || $FC_LINUX == gfortran ) then
    265275     set optim=" $OPT_LINUX "
    266276     set optim90=" $OPT_LINUX "
     
    490500     case -cosp
    491501        set cosp="$2"; shift ; shift ; goto top
     502
     503     case -sisvat
     504        set sisvat="$2" ; shift ; shift ; goto top
    492505
    493506     case -filtre
     
    519532             set optim90="$optim90"" -g -ffpe-trap=invalid,zero,overflow -fbounds-check -Wall "
    520533             set optimtru90="$optimtru90"" -ffpe-trap=invalid,zero,overflow -g -fbounds-check -Wall "
    521            else if ( $FC_LINUX == 'g95' ) then
     534           else if ( $FC_LINUX == 'gfortran' ) then
    522535             set optim="$optim"" -g -fbounds-check -freal=nan -ftrace=full -Wall "
    523536             set optim90="$optim90"" -g -fbounds-check -freal=nan -ftrace=full -Wall "
     
    566579endif
    567580
     581if ( "$sisvat" == 'true' ) then
     582    set cppflags="$cppflags -DCPP_SISVAT"
     583endif
     584
    568585if ( "$physique" == 'nophys' ) then
    569586   set phys="L_PHY= LIBPHY="
     
    581598   set cppflags="$cppflags -DCPP_VEGET"
    582599#   set link_veget=" -lsechiba -lparameters -lstomate  "
    583    set link_veget=" -lsechiba -lparameters -lstomate"
     600   set link_veget=" -lsechiba -lparameters -lstomate   -lorchidee"
    584601   if ( $XNEC || $X8BRODIE || $X6NEC) then
    585602#      set link_veget=" -lsxsechiba -lsxparameters -lsxstomate -lsxorglob -lsxparallel"
     
    841858       set opt_link="$opt_link  -L$MODIPSLDIR $link_veget -L$NCDFLIB -lnetcdf "
    842859     endif
    843    else if ($FC_LINUX == 'g95' || $FC_LINUX == 'gfortran' ) then
     860   else if ($FC_LINUX == 'gfortran' || $FC_LINUX == 'gfortran' ) then
    844861     if ( $io == "ioipsl" ) then
    845        set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdff -lnetcdf -lioipsl -lnetcdff -lnetcdf "
     862       set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB  -lnetcdf -lioipsl -lnetcdf "
    846863     else
    847        set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdff -lnetcdf "
     864       set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf "
    848865     endif
    849866   endif
     
    10151032   set optimtru90=" $optimtru90 -module $libo "
    10161033   set optim90=" $optim90 -module $libo "
    1017  else if ( $FC_LINUX == 'g95' ) then
    1018    set optimtru90=" $optimtru90 -fmod=$libo  "
    1019    set optim90=" $optim90 -fmod=$libo  "
    1020  else if ( $FC_LINUX == 'gfortran' ) then
     1034else if ( $FC_LINUX == 'gfortran' ) then
     1035   set optimtru90=" $optimtru90 -I$libo  "
     1036   set optim90=" $optim90 -I$libo  "
     1037else if ( $FC_LINUX == 'gfortran' ) then
    10211038   set optimtru90=" $optimtru90 -M $libo  "
    10221039   set optim90=" $optim90 -M $libo  "
  • LMDZ5/branches/LMDZ5-DOFOCO/makelmdz

    r1789 r2071  
    2525fcm_path=none
    2626cosp=false
     27sisvat=false
     28rrtm=false
    2729
    2830# guess a default 'arch'
     
    3032## try to recognise machine and infer arch from it
    3133machine=`hostname`
    32 if [[ "$machine" == "brodie" ]]
    33 then
    34   arch="SX8_BRODIE"
    35 fi
    36 if [[ "${machine:0:6}" == "vargas" ]]
    37 then
    38   arch="PW6_VARGAS"
    39 fi
    40 if [[ "${machine:0:6}" == "ciclad" ]]
    41 then
    42   arch="AMD64_CICLAD"
     34if [[ "${machine:0:3}" == "ada" ]]
     35then
     36  arch="X64_ADA"
    4337fi
    4438if [[ "${machine:0:7}" == "platine" ]]
     
    165159          CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
    166160
    167       "-adjnt")
    168           echo "not operational ... work to be done here ";exit
    169           opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "
    170           optim="$optim -Dadj" ; shift ;;
    171 
    172161      "-cosp")
    173162          cosp="$2" ; shift ; shift ;;
     163     
     164      "-sisvat")
     165          sisvat="$2" ; shift ; shift ;;
     166     
     167      "-rrtm")
     168          rrtm="$2" ; shift ; shift ;;
    174169     
    175170      "-mem")
     
    276271LIB="$LIB  ${archfileopt}"
    277272
     273# add Include files defined in arch.fcm file for pre-processing
     274archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm )
     275for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done
     276
    278277if [[ "$physique" != "nophys" ]]
    279278then
     
    306305  FLAG_PARA=''
    307306else
    308   FLAG_PARA="par"
     307  FLAG_PARA="$paramem"
    309308fi
    310309
     
    351350fi
    352351
    353 if [[ "$veget" == "orchidee2.0" ]]
    354 then
    355 # orchidee2.0 :
    356 # Compile with ORCHIDEE 2.0 (or more recent)
     352
     353#==============================================================================
     354if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
     355then
     356
     357   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    357358   CPP_KEY="$CPP_KEY CPP_VEGET"
    358    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    359    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee "
    360 elif [[ "$veget" == "orchidee1.9" ]]
    361 then
    362 # orchidee1.9 :
    363 # Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
    364    CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP"
    365    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    366    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
    367 elif [[ "$veget" == "true" ]]
    368 then
    369 # true :
    370 # Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
    371 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    372    CPP_KEY="$CPP_KEY CPP_VEGET"
    373    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    374    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
    375 elif [[ "$veget" != "false" ]]
    376 then
     359# temporary, for Orchidee versions 1.9.* (before openmp activation)
     360   if [[ "$veget" == "orchidee1.9" ]] ; then
     361      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
     362   fi
     363   if [[ "$veget" == "orchidee2.0" ]] ; then
     364      orch_libs="sechiba parameters stomate parallel orglob orchidee"
     365   else
     366      orch_libs="sechiba parameters stomate parallel orglob"
     367   fi
     368   LIB="${LIB} -L${ORCH_LIBDIR}"
     369   for lib in ${orch_libs} ; do
     370      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
     371         LIB="${LIB} -l${LIBPREFIX}$lib "
     372      fi
     373   done
     374elif [[ "$veget" != "false" ]] ; then
    377375   echo "Option -v $veget does not exist"
    378376   echo "Use ./makelmdz -h for more information"
     
    380378fi
    381379
     380#===============================================================================
    382381if [[ $io == ioipsl ]]
    383382then
     
    385384   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
    386385   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
     386elif [[ $io == xios ]]
     387then
     388   # For now, xios implies also using ioipsl
     389   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
     390   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
     391   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
    387392fi
    388393
     
    396401   INCLUDE="$INCLUDE"' -I$(LIBF)/cosp'
    397402fi
     403
     404if [[ "$sisvat" == "true" ]]
     405then
     406   CPP_KEY="$CPP_KEY CPP_SISVAT"
     407fi
     408
     409if [[ "$rrtm" == "true" ]]
     410then
     411   CPP_KEY="$CPP_KEY CPP_RRTM"
     412fi
     413
    398414
    399415INCLUDE="$INCLUDE ${NETCDF_INCDIR}"
     
    453469########################################################################
    454470
    455 dimension=`echo $dim | wc -w`
    456 echo dimension $dimension
    457 
    458 if (( $dimension == 3 ))
    459 then
    460   cd $LIBFGCM/grid
    461   \rm fxyprim.h
    462   cp -p fxy_${grille}.h fxyprim.h
     471if (( $dimc == 3 )) ; then
     472   cd $LIBFGCM/grid
     473   \rm fxyprim.h
     474   cp -p fxy_${grille}.h fxyprim.h
     475   filtre="FILTRE=$filtre"
     476   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d${FLAG_PARA} -I$(LIBF)/dyn3d_common '
     477elif (( $dimc == 2 )) ; then
     478   filtre="FILTRE= L_FILTRE= "
     479   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d'
     480elif (( $dimc == 1 )) ; then
     481   CPP_KEY="$CPP_KEY CPP_1D"
     482   filtre="L_DYN= DYN= FILTRE= L_FILTRE= DIRMAIN=phy$physique "
     483   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d -I$(LIBF)/dyn3d_common ' # Pas tres propre
    463484else
    464   echo "Probleme dans les dimensions de la dynamique !!"
    465   echo "Non reactive pour l'instant !!!"
    466 fi
    467 
    468 ######################################################################
    469 # Gestion du filtre qui n'existe qu'en 3d.
    470 ######################################################################
    471 
    472 if (( `expr $dimc \> 2` == 1 ))
    473 then
    474    filtre="FILTRE=$filtre"
    475 else
    476    filtre="FILTRE= L_FILTRE= "
    477 fi
    478 echo MACRO FILTRE $filtre
    479 
    480 echo $dimc
    481 
    482 ######################################################################
    483 # Creation du suffixe de la configuration
    484 ######################################################################
    485 
    486 
    487 SUFF_NAME=_${dim_full}
    488 SUFF_NAME=${SUFF_NAME}_phy${physique}
    489 
    490 if [[ "$parallel" != "none" ]]
    491 then
    492   SUFF_NAME=${SUFF_NAME}_para
    493   DYN=dyn${dimc}d${paramem}
    494   if [[ "$paramem" == "mem" ]]
    495   then
    496    SUFF_NAME=${SUFF_NAME}_${paramem}
    497   fi
    498 else
    499   SUFF_NAME=${SUFF_NAME}_seq
    500   DYN=dyn${dimc}d
    501 fi
    502 
    503 if [[ $veget != "false" ]]
    504 then
    505   SUFF_NAME=${SUFF_NAME}_orch
    506 fi
    507 
    508 if [[ $couple != "false" ]]
    509 then
    510   SUFF_NAME=${SUFF_NAME}_couple
    511 fi
    512 
    513 if [[ $chimie == "INCA" ]]
    514 then
    515   SUFF_NAME=${SUFF_NAME}_inca
    516 fi
     485   echo Dimension dimc=$dimc pas prevu ; exit
     486fi
     487
    517488
    518489cd $LMDGCM
     
    531502########################################################################
    532503cd $LMDGCM
     504
    533505find libf -name '*.[Fh]' -print > tmp77
    534506find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90
    535 find libf -name '*.[Fh90]' -print >> tmp90
     507find libf -name '*.F90' -print >> tmp90
    536508
    537509if [[ ! ( -r makefile ) || ! ( -r liste_des_sources_f90 ) || ! ( -r liste_des_sources_f77 ) || ` diff tmp77 liste_des_sources_f77 | wc -w ` -ne 0 || ` diff tmp90 liste_des_sources_f90 | wc -w ` -ne 0 ]]
     
    557529then
    558530  source_code=${code}.F90
     531elif [[ -r $LMDGCM/libf/phy$physique/${code}.F90 ]] ; then
     532  source_code=${code}.F90
    559533fi
    560534
    561535# library directory name:
    562 if [[ "$parallel" == "none" ]]
    563 then
    564   nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod}
    565 else
    566   nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_${FLAG_PARA}
    567 fi
     536nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'`
     537echo $nomlib
    568538
    569539if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
     
    585555  INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique"
    586556fi
    587 INCLUDE="$INCLUDE"' -I$(LIBF)/dyn'${dimc}'d'$FLAG_PARA' -I'${LIBOGCM}/${nomlib}
     557INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib}
    588558
    589559# ranlib utility (check it exists or else default to ls)
     
    645615DIM=$dimc \
    646616FLAG_PARA=$FLAG_PARA \
    647 L_ADJNT="$adjnt" \
     617L_ADJNT=$adjnt \
    648618L_COSP="$lcosp" \
    649619L_CHIMIE="$libchimie" \
     
    660630PROG=$code
    661631
     632
    662633if [[ -r $LIBFGCM/grid/dimensions.h ]]
    663634then
  • LMDZ5/branches/LMDZ5-DOFOCO/makelmdz_fcm

    r1789 r2071  
    2222couple=false
    2323veget=false
     24sisvat=false
     25rrtm=false
    2426chimie=false
    2527parallel=none
     
    2931LIBPREFIX=""
    3032cosp=false
     33job=1
     34full=''
    3135
    3236LMDGCM=`/bin/pwd`
     
    6367[-p PHYS]                  : set of physical parametrizations (in libf/phyPHYS), (default: lmd)
    6468[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
    65 [-c false/MPI1/MPI2]       : coupling with ocean model : MPI1/MPI2/false (default: false)
     69[-c false/MPI1/OMCT]       : coupling with ocean model : MPI1/OMCT/false (default: false)
    6670[-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
    6771          false       : no vegetation model
     
    7983[-filtre NOMFILTRE]        : use filtre from libf/NOMFILTRE (default: filtrez)
    8084[-link LINKS]              : additional links with other libraries
     85[-j n]                     : active parallel compiling on ntask
     86[-full]                    : full recompiling
    8187[-fcm_path path]           : path to the fcm tool (default: tools/fcm/bin)
    8288[-ext_src path]            : path to an additional set of routines to compile with the model
     
    113119          veget="$2" ; shift ; shift ;;
    114120
     121      "-sisvat")
     122          sisvat="$2" ; shift ; shift ;;
     123
     124      "-rrtm")
     125          rrtm="$2" ; shift ; shift ;;
     126
    115127      "-chimie")
    116128          chimie="$2" ; shift ; shift ;;
     
    147159      "-ext_src")
    148160          EXT_SRC=$2 ; shift ; shift ;;
     161      "-j")
     162          job=$2 ; shift ; shift ;;
     163      "-full")
     164          full="-full" ; shift ;;
    149165
    150166      "-arch")
     
    219235if [[ "$couple" != "false" ]]
    220236then
    221    CPP_KEY="$CPP_KEY CPP_COUPLE"
    222    INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
    223    LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io"
     237    if [[ "$couple" == "MPI1" ]]
     238    then
     239        CPP_KEY="$CPP_KEY CPP_COUPLE"
     240        export OASIS_INCDIR=$LMDGCM/../../prism/X64/build/lib/psmile.MPI1
     241        export OASIS_LIBDIR=$LMDGCM/../../prism/X64/lib
     242        INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
     243        LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lmpp_io"
     244    else
     245        CPP_KEY="$CPP_KEY CPP_COUPLE CPP_OMCT"
     246        INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
     247        LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lscrip -lmct -lmpeu"
     248    fi
    224249fi
    225250
     
    248273fi
    249274
    250 if [[ "$veget" == "orchidee2.0" ]]
    251 then
    252 # orchidee2.0 :
    253 # Compile with ORCHIDEE 2.0 (or more recent)
     275if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
     276then
     277#NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
     278#    For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
     279#    option orchidee1.9 : Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
     280   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    254281   CPP_KEY="$CPP_KEY CPP_VEGET"
    255    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    256    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee "
    257 elif [[ "$veget" == "orchidee1.9" ]]
    258 then
    259 # orchidee1.9 :
    260 # Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
    261    CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP"
    262    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    263    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
    264 elif [[ "$veget" == "true" ]]
    265 then
    266 # true :
    267 # Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
    268 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    269    CPP_KEY="$CPP_KEY CPP_VEGET"
    270    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    271    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
    272 elif [[ "$veget" != "false" ]]
    273 then
     282# temporary, for Orchidee versions 1.9.* (before openmp activation)
     283   if [[ "$veget" == "orchidee1.9" ]] ; then
     284      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
     285   fi
     286   if [[ "$veget" == "orchidee2.0" ]] ; then
     287      orch_libs="sechiba parameters stomate parallel orglob orchidee"
     288   else
     289      orch_libs="sechiba parameters stomate parallel orglob"
     290   fi
     291   LIB="${LIB} -L${ORCH_LIBDIR}"
     292   for lib in ${orch_libs} ; do
     293      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
     294         LIB="${LIB} -l${LIBPREFIX}$lib "
     295      fi
     296   done
     297elif [[ "$veget" != "false" ]] ; then
    274298   echo "Option -v $veget does not exist"
    275299   echo "Use ./makelmdz_fcm -h for more information"
     
    277301fi
    278302
     303if [[ "$sisvat" == "true" ]]
     304then
     305   CPP_KEY="$CPP_KEY CPP_SISVAT"
     306   sed -e 's/^#src::sisvat/src::sisvat/' bld.cfg > bld.tmp
     307   mv bld.tmp bld.cfg
     308fi
     309
     310if [[ "$rrtm" == "true" ]]
     311then
     312   CPP_KEY="$CPP_KEY CPP_RRTM"
     313   sed -e 's/^#src::rrtm/src::rrtm/' bld.cfg > bld.tmp
     314   mv bld.tmp bld.cfg
     315fi
     316
    279317if [[ $io == ioipsl ]]
    280318then
     
    282320   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
    283321   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
    284 fi
     322elif [[ $io == xios ]]
     323then
     324   # For now, xios implies also using ioipsl
     325   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
     326   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
     327   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
     328fi
     329
    285330if [[ "$cosp" == "true" ]]
    286331then
     
    468513
    469514rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock
    470 ./build_gcm ${fcm_path}
     515./build_gcm ${fcm_path} -j $job $full
    471516
    472517rm -rf tmp_src
     
    475520ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src
    476521
     522#eventual cleanup for SISVAT
     523sed -e 's/^src::sisvat/#src::sisvat/' bld.cfg > bld.tmp
     524mv bld.tmp bld.cfg
     525
     526#eventual cleanup for RRTM
     527sed -e 's/^src::rrtm/#src::rrtm/' bld.cfg > bld.tmp
     528mv bld.tmp bld.cfg
     529
     530
    477531if [[ -r $LIBFGCM/grid/dimensions.h ]]
    478532then
Note: See TracChangeset for help on using the changeset viewer.