Index: LMDZ4/branches/IPSL-CM4_IPCC_patches/create_make_gcm
===================================================================
--- LMDZ4/branches/IPSL-CM4_IPCC_patches/create_make_gcm	(revision 705)
+++ LMDZ4/branches/IPSL-CM4_IPCC_patches/create_make_gcm	(revision 742)
@@ -20,4 +20,8 @@
 if [ "$machine" = "mercure" ] ; then
   X6NEC=1
+fi
+X8BRODIE=0
+if [ "$machine" = "brodie" ] ; then
+  X8BRODIE=1
 fi
 VPP=0
@@ -58,5 +62,5 @@
 echo '# Les differentes librairies pour l"edition des liens:'
 echo
-if ( [ "$XNEC" = '1' ] || [ "$X6NEC" = '1' ] ) ; then
+if ( [ "$XNEC" = '1' ] || [ "$X6NEC" = '1' ] || [ "$X8BRODIE" = '1' ] ) ; then
   echo 'dyn3d      = $(LIBO)/libsxdyn3d.a $(LIBO)/libsx$(FILTRE).a'
   echo 'dyn2d      = $(LIBO)/libsxdyn2d.a'
@@ -221,5 +225,5 @@
             fi
 	 fi
-	 if ( [ "$XNEC" -eq '1' ] || [ "$X6NEC" = '1' ] ) ; then
+	 if ( [ "$XNEC" -eq '1' ] || [ "$X6NEC" = '1' ] || [ "$X8BRODIE" = '1' ] ) ; then
            echo '	sxar r $(LIBO)/libsx'$diri'.a '$fili'.o ; \'
          fi
Index: LMDZ4/branches/IPSL-CM4_IPCC_patches/makegcm
===================================================================
--- LMDZ4/branches/IPSL-CM4_IPCC_patches/makegcm	(revision 705)
+++ LMDZ4/branches/IPSL-CM4_IPCC_patches/makegcm	(revision 742)
@@ -52,4 +52,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'
@@ -100,4 +103,5 @@
 set XNEC=0
 set X6NEC=0
+set X8BRODIE=0
 if ( `uname` == HP-UX ) then
    set machine=HP
@@ -115,5 +119,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
@@ -130,4 +134,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
@@ -245,4 +252,15 @@
    set optim90=' -clear -float0 -size_t64 -Ep -DNC_DOUBLE -dw -Wf\"-A dbl4\" -R5 -Wf,"-pvctl loopcnt=40000 fullmsg noassume "'
    set optimtru90=' -clear -f4 -float0 -size_t64 -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='-P stack -Wf,-pvctl res=whole,-A dbl4,-ptr byte -EP -R5 -float0 -dw -Wf,"-pvctl loopcnt=999999 fullmsg noassume" -I/SX/usr/include'
+   set optimtru90="$optim90"
+   set optim90="$optim90"
    set optim="$optim90"
    set optimbis=" "
@@ -453,4 +471,10 @@
 ########################################################################
 
+set cppflags=''
+
+if $X8BRODIE then
+  set cppflags="$cppflags -DNC_DOUBLE -DBLAS -DSGEMV=DGEMV -DSGEMM=DGEMM"
+endif
+
 if ( $io == ioipsl ) then
    set optim="$optim -DCPP_IOIPSL"
@@ -539,5 +563,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
@@ -801,4 +825,29 @@
    endif
    set mod_loc_dir="./"
+##################
+else if $X8BRODIE then
+##################
+   set f77=sxmpif90
+   set f90=sxmpif90
+   if $MODIPSL then
+     set opt_link="$opt_link -float0 -Wf,-A dbl4 -L$MODIPSLDIR -lblas"
+     if ($veget == true) then
+       set opt_link="$opt_link $link_veget"
+     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
@@ -821,4 +870,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
@@ -882,4 +933,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
  set optim90=" $optim90 -module $libo "
@@ -900,5 +954,8 @@
 else if $X6NEC then
   set link="sxld $opt_link"
-  set link="$f90 "
+  set link="$f90 -Wl,-hlib_cyclic "
+else if $X8BRODIE then
+  set link="sxld $opt_link"
+  set link="$f90 -Wl,-hlib_cyclic "
 endif
 
