Changeset 722 for LMDZ4/branches/V3_test


Ignore:
Timestamp:
Oct 6, 2006, 12:46:42 PM (18 years ago)
Author:
Laurent Fairhead
Message:

Modifs pour compilation Brodie
LF

Location:
LMDZ4/branches/V3_test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/V3_test/create_make_gcm

    r704 r722  
    99libf=$gcm/libf
    1010libo=$gcm/libo
    11 
    12 X6NEC=1
    13 
     11CRAY=0
     12if [ "$machine" = "atlas" -o "$machine" = "etoile" -o "$machine" = "axis" ] ; then
     13  CRAY=1
     14fi
     15XNEC=0
     16if [ "$machine" = "rhodes" ] ; then
     17  XNEC=1
     18fi
     19X6NEC=0
     20if [ "$machine" = "mercure" ] ; then
     21  X6NEC=1
     22fi
     23X8BRODIE=0
     24if [ "$machine" = "brodie" ] ; then
     25  X8BRODIE=1
     26fi
     27VPP=0
     28if [ "$machine" = "nymphea0" ] ; then
     29  VPP=1
     30fi
     31#
    1432echo "#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
    1533echo "# Definitions de Macros pour Make"
     
    2038echo "GCM     = "$gcm
    2139echo 'LIBF    = $(GCM)/libf'
    22 echo 'LIBO    = $(GCM)/libo'
     40if [ "$CRAY" = '0' ] ; then
     41#   echo 'LIBO    = $(GCM)/libo/$(MACHINE)'
     42   echo 'LIBO    = $(LIBOGCM)/$(MACHINE)'
     43else
     44   echo 'LIBO    = $(GCM)/libo'
     45fi
     46#echo 'LOCAL_DIR=$(GCM)'
     47#echo $localdir
    2348echo "LOCAL_DIR=`echo $localdir`"
    2449echo 'BIBIO    = $(LIBF)/bibio'
     
    3459echo '# Les differentes librairies pour l"edition des liens:'
    3560echo
    36 echo 'dyn3d            = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a'
    37 echo 'dyn3d_par      = $(LIBO)/libdyn3d_par.a $(LIBO)/lib$(FILTRE).a'
    38 echo 'dyn2d            = $(LIBO)/libdyn2d.a'
    39 echo 'dyn1d            = $(LIBO)/libdyn1d.a'
    40 echo 'L_DYN      = -ldyn$(DIM)d$(FLAG_PARA)'
    41 echo 'L_FILTRE   = -l$(FILTRE)'
    42 echo 'L_PHY = -lphy$(PHYS) '
    43 echo 'L_BIBIO    = -lbibio'
    44 echo 'L_ADJNT    ='
     61if ( [ "$XNEC" = '1' ] || [ "$X6NEC" = '1' ] || [ "$X8BRODIE" = '1' ] ) ; then
     62  echo 'dyn3d      = $(LIBO)/libsxdyn3d.a $(LIBO)/libsx$(FILTRE).a'
     63  echo 'dyn3dpar     = $(LIBO)/libsxdyn3dpar.a $(LIBO)/libsx$(FILTRE).a'
     64  echo 'dyn2d      = $(LIBO)/libsxdyn2d.a'
     65  echo 'dyn1d      = $(LIBO)/libsxdyn1d.a'
     66  echo 'L_DYN      = -lsxdyn$(DIM)d'
     67  echo 'L_FILTRE   = -lsx$(FILTRE)'
     68  echo 'L_PHY = -lsxphy$(PHYS) '
     69  echo 'L_BIBIO    = -lsxbibio'
     70  echo 'L_ADJNT    ='
     71else
     72  echo 'dyn3d            = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a'
     73  echo 'dyn3dpar      = $(LIBO)/libdyn3dpar.a $(LIBO)/lib$(FILTRE).a'
     74  echo 'dyn2d            = $(LIBO)/libdyn2d.a'
     75  echo 'dyn1d            = $(LIBO)/libdyn1d.a'
     76  echo 'L_DYN      = -ldyn$(DIM)d$(FLAG_PARA)'
     77  echo 'L_FILTRE   = -l$(FILTRE)'
     78  echo 'L_PHY = -lphy$(PHYS) '
     79  echo 'L_BIBIO    = -lbibio'
     80  echo 'L_ADJNT    ='
     81fi
    4582
    4683echo
     
    65102echo "PROG = code"
    66103echo
    67 echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) '
     104#echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) '
     105echo 'main : $(DYN) bibio phys $(OPTION_DEP) '
    68106echo '  cd $(LIBO) ; $(RANLIB) lib*.a ; cd $(GCM) ;\'
    69107echo '  cd $(LOCAL_DIR); \'
     
    75113echo 'phys : $(LIBPHY)'
    76114echo
    77 echo 'chimie : $(LIBO)/libchimie.a'
     115#echo 'chimie : $(LIBO)/libchimie.a'
    78116echo
    79117echo 'bibio : $(LIBO)/libbibio.a'
     
    187225            fi
    188226         fi
     227         if ( [ "$XNEC" -eq '1' ] || [ "$X6NEC" = '1' ] || [ "$X8BRODIE" = '1' ] ) ; then
     228           echo '       sxar r $(LIBO)/libsx'$diri'.a '$fili'.o ; \'
     229         fi
    189230         echo ' $(AR) r $(LIBO)/lib'$diri'.a '$fili'.o ; $(RM) '$fili'.o ; \'
    190231         echo ' cd $(GCM)'
  • LMDZ4/branches/V3_test/makegcm

    r714 r722  
    6565      set NCDFINC=`grep sx6nec ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
    6666      set NCDFLIB=`grep sx6nec ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
     67    else  if ( `hostname` == brodie ) then
     68      set NCDFINC=`grep sx8brodie ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
     69      set NCDFLIB=`grep sx8brodie ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
    6770    else
    6871      echo 'Probleme de definition des variables NCDFINC et NCDFLIB'
     
    113116set XNEC=0
    114117set X6NEC=0
     118set X8BRODIE=0
    115119if ( `uname` == HP-UX ) then
    116120   set machine=HP
     
    128132   set machine=ALPHA
    129133   set DEC=1
    130 else if ( `uname` == Linux && `hostname` != mercure ) then
     134else if ( `uname` == Linux && `hostname` != mercure  && `hostname` != brodie ) then
    131135   set machine=LINUX
    132136   set LINUX=1
     
    143147   set machine=X6NEC
    144148   set X6NEC=1
     149else if ( `hostname` == brodie) then
     150   set machine=X8BRODIE
     151   set X8BRODIE=1
    145152else
    146153   echo Vous travaillez sur une machine non prevue par le reglement
     
    270277   set optim90=' -clear -float0 -f3 -size_t64 -P stack -Wf "-init stack=nan -init heap=nan" -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume "'
    271278   set optimtru90=' -clear -f4 -float0 -size_t64 -P stack -Wf "-init stack=nan -init heap=nan" -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R2 -R3 -R4 -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume"'
     279   set optim="$optim90"
     280   set optimbis=" "
     281   set mod_suffix="mod"
     282   set mod_loc_dir="./"
     283#################
     284else if $X8BRODIE then
     285#################
     286   set optdbl='-dw -Wf\"-A dbl4\"' 
     287   set optim90=' -clear -float0 -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume "'
     288   set optimtru90=' -clear -f4 -float0 -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R2 -R3 -R4 -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume"'
    272289   set optim="$optim90"
    273290   set optimbis=" "
     
    556573set FLAG_PARA=''
    557574if ( "$parallel" == 'true' ) then
    558    set cppflags="$cppflags -DCPP_PARALLEL"
     575   set cppflags="$cppflags -DCPP_PARA"
    559576   set FLAG_PARA='_par'
    560577endif
     
    625642    set nomlib=F90_${dim_}_t${ntrac}
    626643endif
    627 if ( $NEC || $XNEC || $X6NEC) then
     644if ( $NEC || $XNEC || $X6NEC || $X8BRODIE ) then
    628645    set nomlib=F90_${dim_}_t${ntrac}
    629646endif
     
    786803# On adapte d'abord certains include à F90
    787804##########################################
    788 sed -e 's/^c/\!/' $libf/grid/dimensions.h >! $libf/grid/dimensions90.tmp
    789 if ( ! -f $libf/grid/dimensions90.h || `diff $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h | wc -w` ) then
    790       \mv $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h
    791 endif
     805#sed -e 's/^c/\!/' $libf/grid/dimensions.h >! $libf/grid/dimensions90.tmp
     806#if ( ! -f $libf/grid/dimensions90.h || `diff $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h | wc -w` ) then
     807#      \mv $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h
     808#endif
    792809awk 'BEGIN {} { sub ("^c","\!") ; if ($0 ~ /^     s/) {if (NR > 1) print p0," &"; sub ("     s","     \\&")} else { if (NR > 1) print p0  } p0=$0 } END { print p0}' $libf/dyn3d/paramet.h >! $libf/dyn3d/paramet90.tmp
    793810# sed -n -e 's/^c/\!/' -e '1 h' -e '2,$ H' -e '$ { x ; s/\n     s/ \&\n     \& /g ; p }' $libf/dyn3d/paramet.h >! $libf/dyn3d/paramet90.tmp
     
    956973   endif
    957974   set mod_loc_dir="./"
     975##################
     976else if $X8BRODIE then
     977##################
     978   set f77=sxmpif90
     979   set f90=sxmpif90
     980   if $MODIPSL then
     981     set opt_link="$opt_link -L$MODIPSLDIR"
     982     if ($veget == true) then
     983       set opt_link="$opt_link -lsxsechiba -lsxparameters -lsxstomate"
     984     endif
     985     if ($couple == true) then
     986        if ($psmile == true) then
     987        set opt_link="$opt_link -lsxioipsl -float0 $optdbl -P static $NCDFLIB "
     988        else
     989        set opt_link="$opt_link -lsxioipsl -loasis2.4_mpi2 -float0 $optdbl -P static $NCDFLIB "
     990        endif
     991     else
     992       set opt_link="$opt_link -lsxioipsl -float0 $optdbl -P static $NCDFLIB "
     993     endif
     994   else
     995#     set opt_link=" -float0 $optdbl -P static -L$MODIPSLDIR -lsxsechiba -lsxparameters -lsxstomate -lsxioipsl $NCDFLIB "
     996     set opt_link=" -float0 $optdbl -P static -L$MODIPSLDIR -lsxioipsl $NCDFLIB "
     997
     998   endif
     999   set mod_loc_dir="./"
    9581000#################
    9591001else
     
    9761018set make="gmake RANLIB=ls"
    9771019else if $X6NEC then
     1020set make="gmake RANLIB=ls"
     1021else if $X8BRODIE then
    9781022set make="gmake RANLIB=ls"
    9791023else
     
    10151059 set optim90=" $optim90 -I$libo "
    10161060 set optimtru90=" $optimtru90 -I$libo "
     1061else if $X8BRODIE then
     1062 set optim90=" $optim90 -I$libo "
     1063 set optimtru90=" $optimtru90 -I$libo "
    10171064else if $LINUX then
    10181065 if ( $FC_LINUX == "pgf90" ) then
     
    10381085#  set ar=sxar
    10391086else if $X6NEC then
     1087  set link="sxld $opt_link"
     1088  set link="$f90 "
     1089else if $X8BRODIE then
    10401090  set link="sxld $opt_link"
    10411091  set link="$f90 "
Note: See TracChangeset for help on using the changeset viewer.