Index: /BOL/script_install/install.sh
===================================================================
--- /BOL/script_install/install.sh	(revision 1589)
+++ /BOL/script_install/install.sh	(revision 1590)
@@ -39,5 +39,5 @@
 
 
-real=r4
+#real=r4
 real=r8
 
@@ -58,5 +58,5 @@
 veget=0
 bench=1
-## compilo=pgf90 ou g95 ou gfortran sur PC linux
+## compilo=pgf90 ou g95 ou gfortran ou ifort sur PC linux
 compilo=gfortran
 pclinux=1
@@ -77,7 +77,15 @@
    if [ $real = r8 ] ; then OPTPREC="-fdefault-real-8 -DNC_DOUBLE" ; fi
    OPTIM='-O3'
-else #pgf90
-   if [ $real = r8 ] ; then echo "Option real 8 non disponible pour pgf90" ; exit ; fi
+elif [ $compilo = pgf90 ] ; then
+   if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi
    OPTIM='-O2 -Munroll -Mnoframe -Mautoinline -Mcache_align'
+   # with pgf90, compile with fcm
+   compile_with_fcm=1
+else 
+   # ifort
+   if [ $real = r8 ] ; then OPTPREC="-real-size 64 -DNC_DOUBLE" ; fi
+   OPTIM="-O2 -ip -mkl=sequential -align all -static "
+   # with ifort, compile with fcm
+   compile_with_fcm=1
 fi
 OPTIMGCM="$OPTIM $OPTPREC"
@@ -220,4 +228,14 @@
    export F90=pgf90
    export F90FLAGS="$OPTIMNC"
+elif [ $compilo = ifort ] ; then
+   export CPP="icc -E"
+   export F77=ifort
+   export FFLAGS="-O2 -ip -fpic -mcmodel=large"
+   export F90=ifort
+   export FCFLAGS="-O2 -ip -fpic -mcmodel=large"
+   export CC=icc
+   export CFLAGS="-O2 -ip -fpic -mcmodel=large"
+   export CXX=icpc
+   export CXXFLAGS="-O2 -ip -fpic -mcmodel=large"
 else
    echo Le compilateur $compilo pas prevu ; exit
@@ -261,4 +279,6 @@
 elif [ $compilo = g95 ] ; then
   fmod='fmod='
+elif [ $compilo = ifort ] ; then
+  fmod='module '
 else # gfortran
   fmod='I '
@@ -366,4 +386,18 @@
 -e 's/g95/gfortran/g' \
 -e 's/-fmod=/-I/g' \
+-e 's/-fno-second-underscore//' -e 's/-fstatic//' \
+-e 's/-lparallel//' \
+-e 's/-lorglob//' \
+-e 's/-ffixed-form//' -e 's/-ffree-form//' \
+-e 's/set OPT_LINUX.*.$/set OPT_LINUX=\"'"$OPTIMGCM"\"'/' makegcm.orig >| makegcm
+  elif [ $compilo = ifort ] ; then
+sed \
+-e 's:\#setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
+-e 's:\#setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
+-e 's:setenv NCDFINC.*.$:setenv NCDFINC '"$ncdfdir"'/include:' \
+-e 's:setenv NCDFLIB.*.$:setenv NCDFLIB '"$ncdfdir"'/lib:' \
+-e 's/set FC_LINUX.*.$/set FC_LINUX='$compilo'/' \
+-e 's/g95/ifort/g' \
+-e 's/-fmod=/-module /g' \
 -e 's/-fno-second-underscore//' -e 's/-fstatic//' \
 -e 's/-lparallel//' \
@@ -405,6 +439,6 @@
 cd arch
 # fichier arch-local.path
-echo "NETCDF_LIBDIR=\"-L/${ncdfdir}/lib -lnetcdf\"" > arch-local.path
-echo "NETCDF_INCDIR=-I/${ncdfdir}/include" >> arch-local.path
+echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path
+echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
 echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path
 echo 'IOIPSL_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
@@ -415,6 +449,6 @@
 sed -e s:"%COMPILER            pgf95":"%COMPILER            g95":1 \
     -e s:"%LINK                pgf95":"%LINK                g95":1 \
-    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         ":1 \
-    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTIMGCM":1 \
+    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
+    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
    arch-linux-32bit.fcm > arch-local.fcm
    if [ $real = r8 ] ; then
@@ -426,6 +460,6 @@
 sed -e s:"%COMPILER            pgf95":"%COMPILER            gfortran":1 \
     -e s:"%LINK                pgf95":"%LINK                gfortran":1 \
-    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         ":1 \
-    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTIMGCM":1 \
+    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
+    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
    arch-linux-32bit.fcm > arch-local.fcm
    if [ $real = r8 ] ; then
@@ -436,8 +470,21 @@
 elif [ $compilo = pgf90 ] ; then
 sed -e s:"-Wl,-Bstatic -L/usr/lib/gcc-lib/i386-linux/2.95.2":" ":1 \
-    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         ":1 \
-    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTIMGCM":1 \
+    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
+    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
    arch-linux-32bit.fcm > arch-local.fcm
-   if [ $real = r8] ; then
+   if [ $real = r8 ] ; then
+     sed -e s:"%FPP_DEF             ":"%FPP_DEF             NC_DOUBLE":1 \
+     arch-local.fcm > arch-local.fcm.new
+     mv -f arch-local.fcm.new arch-local.fcm
+   fi
+elif [ $compilo = ifort ] ; then
+sed -e s:"%COMPILER            pgf95":"%COMPILER            ifort":1 \
+    -e s:"%LINK                pgf95":"%LINK                ifort":1 \
+    -e s:"-Wl,-Bstatic -L/usr/lib/gcc-lib/i386-linux/2.95.2":" ":1 \
+    -e s:"%PROD_FFLAGS         -fast":"%PROD_FFLAGS         $OPTIM":1 \
+    -e s:"%BASE_FFLAGS         ":"%BASE_FFLAGS         $OPTPREC":1 \
+    -e s:"%DEBUG_FFLAGS        -g -O0 -Kieee -Ktrap=fp -Mbounds":"%DEBUG_FFLAGS        -g -no-ftz -traceback -ftrapuv -fp-stack-check -check":1 \
+   arch-linux-32bit.fcm > arch-local.fcm
+   if [ $real = r8 ] ; then
      sed -e s:"%FPP_DEF             ":"%FPP_DEF             NC_DOUBLE":1 \
      arch-local.fcm > arch-local.fcm.new
@@ -470,5 +517,6 @@
 	./makelmdz_fcm -d ${grid_resolution} -arch local -v $ok_veget gcm
 else
-# Compilation avec makegcm
+# Compilation avec makegcm:
+#       3 times! because some dependecies are not well resolved with makegcm
 	./makegcm -d ${grid_resolution} -v $ok_veget gcm
 	./makegcm -d ${grid_resolution} -v $ok_veget gcm
