Index: LMDZ4/branches/IPSL-CM4_IPCC_branch/create_make_gcm
===================================================================
--- LMDZ4/branches/IPSL-CM4_IPCC_branch/create_make_gcm	(revision 716)
+++ LMDZ4/branches/IPSL-CM4_IPCC_branch/create_make_gcm	(revision 744)
@@ -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_branch/makegcm
===================================================================
--- LMDZ4/branches/IPSL-CM4_IPCC_branch/makegcm	(revision 716)
+++ LMDZ4/branches/IPSL-CM4_IPCC_branch/makegcm	(revision 744)
@@ -53,4 +53,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'
@@ -101,4 +104,5 @@
 set XNEC=0
 set X6NEC=0
+set X8BRODIE=0
 if ( `uname` == HP-UX ) then
    set machine=HP
@@ -116,5 +120,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
@@ -131,4 +135,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
@@ -246,4 +253,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=" "
@@ -458,4 +476,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"
@@ -478,5 +502,5 @@
    set optimtru90="$optimtru90 -DCPP_VEGET"
    set link_veget=" -lsechiba -lparameters -lstomate"
-   if ( $XNEC ) then
+   if ( $XNEC || $X6NEC || $X8BRODIE ) then
       set link_veget=" -lsxsechiba -lsxparameters -lsxstomate"
    endif
@@ -549,5 +573,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
@@ -843,4 +867,29 @@
    endif
    set mod_loc_dir="./"
+##################
+else if $X8BRODIE then
+##################
+   set f77=sxmpif90
+   set f90=sxmpif90
+   set opt_link="$opt_link -float0 -Wf,-A dbl4 -L$MODIPSLDIR -lblas"
+   set opt_link="$opt_link  $link_veget"
+   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 $optdbl -P static $NCDFLIB "
+	else
+	set opt_link="$opt_link -lsxioipsl -loasis2.4_mpi2 $optdbl -P static $NCDFLIB "
+	endif
+     else
+       set opt_link="$opt_link -lsxioipsl $optdbl -P static $NCDFLIB "
+     endif
+   else
+     set opt_link="$opt_link $optdbl -P static -lsxioipsl $NCDFLIB "
+   endif
+   set mod_loc_dir="./"
 #################
 else
@@ -863,4 +912,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
@@ -924,4 +975,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 optimtru90=" $optimtru90 -module $libo "
@@ -943,5 +997,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
 
