Index: /LMDZ4/branches/V3_test/create_make_gcm
===================================================================
--- /LMDZ4/branches/V3_test/create_make_gcm	(revision 721)
+++ /LMDZ4/branches/V3_test/create_make_gcm	(revision 722)
@@ -9,7 +9,25 @@
 libf=$gcm/libf
 libo=$gcm/libo
-
-X6NEC=1
-
+CRAY=0
+if [ "$machine" = "atlas" -o "$machine" = "etoile" -o "$machine" = "axis" ] ; then
+  CRAY=1
+fi
+XNEC=0
+if [ "$machine" = "rhodes" ] ; then
+  XNEC=1
+fi
+X6NEC=0
+if [ "$machine" = "mercure" ] ; then
+  X6NEC=1
+fi
+X8BRODIE=0
+if [ "$machine" = "brodie" ] ; then
+  X8BRODIE=1
+fi
+VPP=0
+if [ "$machine" = "nymphea0" ] ; then
+  VPP=1
+fi
+#
 echo "#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
 echo "# Definitions de Macros pour Make"
@@ -20,5 +38,12 @@
 echo "GCM     = "$gcm
 echo 'LIBF    = $(GCM)/libf'
-echo 'LIBO    = $(GCM)/libo'
+if [ "$CRAY" = '0' ] ; then
+#   echo 'LIBO    = $(GCM)/libo/$(MACHINE)'
+   echo 'LIBO    = $(LIBOGCM)/$(MACHINE)'
+else
+   echo 'LIBO    = $(GCM)/libo'
+fi
+#echo 'LOCAL_DIR=$(GCM)'
+#echo $localdir
 echo "LOCAL_DIR=`echo $localdir`"
 echo 'BIBIO    = $(LIBF)/bibio'
@@ -34,13 +59,25 @@
 echo '# Les differentes librairies pour l"edition des liens:'
 echo
-echo 'dyn3d            = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a'
-echo 'dyn3d_par      = $(LIBO)/libdyn3d_par.a $(LIBO)/lib$(FILTRE).a'
-echo 'dyn2d            = $(LIBO)/libdyn2d.a'
-echo 'dyn1d            = $(LIBO)/libdyn1d.a'
-echo 'L_DYN      = -ldyn$(DIM)d$(FLAG_PARA)'
-echo 'L_FILTRE   = -l$(FILTRE)'
-echo 'L_PHY = -lphy$(PHYS) '
-echo 'L_BIBIO    = -lbibio'
-echo 'L_ADJNT    ='
+if ( [ "$XNEC" = '1' ] || [ "$X6NEC" = '1' ] || [ "$X8BRODIE" = '1' ] ) ; then
+  echo 'dyn3d      = $(LIBO)/libsxdyn3d.a $(LIBO)/libsx$(FILTRE).a'
+  echo 'dyn3dpar     = $(LIBO)/libsxdyn3dpar.a $(LIBO)/libsx$(FILTRE).a'
+  echo 'dyn2d      = $(LIBO)/libsxdyn2d.a'
+  echo 'dyn1d      = $(LIBO)/libsxdyn1d.a'
+  echo 'L_DYN      = -lsxdyn$(DIM)d'
+  echo 'L_FILTRE   = -lsx$(FILTRE)'
+  echo 'L_PHY = -lsxphy$(PHYS) '
+  echo 'L_BIBIO    = -lsxbibio'
+  echo 'L_ADJNT    ='
+else
+  echo 'dyn3d            = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a'
+  echo 'dyn3dpar      = $(LIBO)/libdyn3dpar.a $(LIBO)/lib$(FILTRE).a'
+  echo 'dyn2d            = $(LIBO)/libdyn2d.a'
+  echo 'dyn1d            = $(LIBO)/libdyn1d.a'
+  echo 'L_DYN      = -ldyn$(DIM)d$(FLAG_PARA)'
+  echo 'L_FILTRE   = -l$(FILTRE)'
+  echo 'L_PHY = -lphy$(PHYS) '
+  echo 'L_BIBIO    = -lbibio'
+  echo 'L_ADJNT    ='
+fi
 
 echo
@@ -65,5 +102,6 @@
 echo "PROG = code"
 echo
-echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) '
+#echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) '
+echo 'main : $(DYN) bibio phys $(OPTION_DEP) '
 echo '	cd $(LIBO) ; $(RANLIB) lib*.a ; cd $(GCM) ;\'
 echo '	cd $(LOCAL_DIR); \'
@@ -75,5 +113,5 @@
 echo 'phys : $(LIBPHY)'
 echo
-echo 'chimie : $(LIBO)/libchimie.a'
+#echo 'chimie : $(LIBO)/libchimie.a'
 echo
 echo 'bibio : $(LIBO)/libbibio.a'
@@ -187,4 +225,7 @@
             fi
 	 fi
+	 if ( [ "$XNEC" -eq '1' ] || [ "$X6NEC" = '1' ] || [ "$X8BRODIE" = '1' ] ) ; then
+           echo '	sxar r $(LIBO)/libsx'$diri'.a '$fili'.o ; \'
+         fi
          echo '	$(AR) r $(LIBO)/lib'$diri'.a '$fili'.o ; $(RM) '$fili'.o ; \'
          echo '	cd $(GCM)'
Index: /LMDZ4/branches/V3_test/makegcm
===================================================================
--- /LMDZ4/branches/V3_test/makegcm	(revision 721)
+++ /LMDZ4/branches/V3_test/makegcm	(revision 722)
@@ -65,4 +65,7 @@
       set NCDFINC=`grep sx6nec ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
       set NCDFLIB=`grep sx6nec ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
+    else  if ( `hostname` == brodie ) then
+      set NCDFINC=`grep sx8brodie ../../util/AA_make.gdef| grep NCDF_INC|sed -e "s/^.* =//"`
+      set NCDFLIB=`grep sx8brodie ../../util/AA_make.gdef| grep NCDF_LIB|sed -e 's/^.* =//'`
     else
       echo 'Probleme de definition des variables NCDFINC et NCDFLIB'
@@ -113,4 +116,5 @@
 set XNEC=0
 set X6NEC=0
+set X8BRODIE=0
 if ( `uname` == HP-UX ) then
    set machine=HP
@@ -128,5 +132,5 @@
    set machine=ALPHA
    set DEC=1
-else if ( `uname` == Linux && `hostname` != mercure ) then
+else if ( `uname` == Linux && `hostname` != mercure  && `hostname` != brodie ) then
    set machine=LINUX
    set LINUX=1
@@ -143,4 +147,7 @@
    set machine=X6NEC
    set X6NEC=1
+else if ( `hostname` == brodie) then
+   set machine=X8BRODIE
+   set X8BRODIE=1
 else
    echo Vous travaillez sur une machine non prevue par le reglement
@@ -270,4 +277,14 @@
    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 "'
    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"'
+   set optim="$optim90"
+   set optimbis=" "
+   set mod_suffix="mod"
+   set mod_loc_dir="./"
+#################
+else if $X8BRODIE then
+#################
+   set optdbl='-dw -Wf\"-A dbl4\"'  
+   set optim90=' -clear -float0 -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume "'
+   set optimtru90=' -clear -f4 -float0 -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R2 -R3 -R4 -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume"'
    set optim="$optim90"
    set optimbis=" "
@@ -556,5 +573,5 @@
 set FLAG_PARA=''
 if ( "$parallel" == 'true' ) then
-   set cppflags="$cppflags -DCPP_PARALLEL"
+   set cppflags="$cppflags -DCPP_PARA"
    set FLAG_PARA='_par'
 endif
@@ -625,5 +642,5 @@
     set nomlib=F90_${dim_}_t${ntrac}
 endif
-if ( $NEC || $XNEC || $X6NEC) then
+if ( $NEC || $XNEC || $X6NEC || $X8BRODIE ) then
     set nomlib=F90_${dim_}_t${ntrac}
 endif
@@ -786,8 +803,8 @@
 # On adapte d'abord certains include à F90
 ##########################################
-sed -e 's/^c/\!/' $libf/grid/dimensions.h >! $libf/grid/dimensions90.tmp
-if ( ! -f $libf/grid/dimensions90.h || `diff $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h | wc -w` ) then
-      \mv $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h
-endif
+#sed -e 's/^c/\!/' $libf/grid/dimensions.h >! $libf/grid/dimensions90.tmp
+#if ( ! -f $libf/grid/dimensions90.h || `diff $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h | wc -w` ) then
+#      \mv $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h
+#endif
 awk '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
 # 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
@@ -956,4 +973,29 @@
    endif
    set mod_loc_dir="./"
+##################
+else if $X8BRODIE then
+##################
+   set f77=sxmpif90
+   set f90=sxmpif90
+   if $MODIPSL then
+     set opt_link="$opt_link -L$MODIPSLDIR"
+     if ($veget == true) then
+       set opt_link="$opt_link -lsxsechiba -lsxparameters -lsxstomate"
+     endif
+     if ($couple == true) then
+	if ($psmile == true) then
+	set opt_link="$opt_link -lsxioipsl -float0 $optdbl -P static $NCDFLIB "
+	else
+	set opt_link="$opt_link -lsxioipsl -loasis2.4_mpi2 -float0 $optdbl -P static $NCDFLIB "
+	endif
+     else
+       set opt_link="$opt_link -lsxioipsl -float0 $optdbl -P static $NCDFLIB "
+     endif
+   else
+#     set opt_link=" -float0 $optdbl -P static -L$MODIPSLDIR -lsxsechiba -lsxparameters -lsxstomate -lsxioipsl $NCDFLIB "
+     set opt_link=" -float0 $optdbl -P static -L$MODIPSLDIR -lsxioipsl $NCDFLIB "
+
+   endif
+   set mod_loc_dir="./"
 #################
 else
@@ -976,4 +1018,6 @@
 set make="gmake RANLIB=ls"
 else if $X6NEC then
+set make="gmake RANLIB=ls"
+else if $X8BRODIE then
 set make="gmake RANLIB=ls"
 else
@@ -1015,4 +1059,7 @@
  set optim90=" $optim90 -I$libo "
  set optimtru90=" $optimtru90 -I$libo "
+else if $X8BRODIE then
+ set optim90=" $optim90 -I$libo "
+ set optimtru90=" $optimtru90 -I$libo "
 else if $LINUX then
  if ( $FC_LINUX == "pgf90" ) then
@@ -1038,4 +1085,7 @@
 #  set ar=sxar
 else if $X6NEC then
+  set link="sxld $opt_link"
+  set link="$f90 "
+else if $X8BRODIE then
   set link="sxld $opt_link"
   set link="$f90 "
