Index: /XIOS/dev/XIOS_DEV_CMIP6/make_xios
===================================================================
--- /XIOS/dev/XIOS_DEV_CMIP6/make_xios	(revision 1449)
+++ /XIOS/dev/XIOS_DEV_CMIP6/make_xios	(revision 1450)
@@ -10,5 +10,8 @@
 netcdf_lib="netcdf4_par"
 compil_mode="prod"
-
+arch_path="arch"
+arch_default_path="arch"
+arch_defined="FALSE"
+arch_path_defined="FALSE"
 
 # Traitement de la ligne de commande
@@ -26,5 +29,5 @@
 	    echo "       [--avail] : to know available target architectures "
 	    echo "       [--full] : to generate dependencies and recompile from scratch"
-	    echo "       [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"
+	    echo "       [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"i
         echo "       [--use_extern_boost : to use external boost library"
 	    echo "       [--doc] : to generate Doxygen documentation (not available yet)"
@@ -38,5 +41,6 @@
          "--dev")   compil_mode="dev"   ; shift ;;
          "--debug") compil_mode="debug" ; shift ;;
-         "--arch")  arch=$2     ; shift ; shift ;;
+         "--arch")  arch=$2     ; arch_defined="TRUE"; shift ; shift ;;
+         "--arch_path")  arch_path=$2     ; arch_path_defined="TRUE"; shift ; shift ;;
          "--avail") ls arch/*.fcm | cut -d"-" -f2 | cut -d"." -f1 ; exit ;; 
          "--full")  compil_full="true"  ; shift ;;
@@ -46,5 +50,5 @@
          "--job")   job=$2              ; shift ; shift ;;
          "--netcdf_lib")   netcdf_lib=$2 ; shift ; shift ;;
-         "--memtrack")   use_memtrack="true" ; shift ;;
+         "--memtrack")  use_memtrack="true" memtrack=$2  ; shift ; shift ;;
          *)         code="$1"           ; shift ;;
       esac
@@ -74,22 +78,38 @@
 mkdir .void_dir
 
-if [[ !(-z $arch) ]]
-   then
-      rm -f  $install_dir/arch.path
-      rm -f  $install_dir/arch.fcm
-      rm -f  $install_dir/arch.env
-      ln -s  $install_dir/arch/arch-${arch}.path $install_dir/arch.path
-      ln -s  $install_dir/arch/arch-${arch}.fcm  $install_dir/arch.fcm
-
-      if test -f $install_dir/arch/arch-${arch}.env
-      then
-        ln -s $install_dir/arch/arch-${arch}.env arch.env
-      else
-        ln -s $install_dir/.void_file arch.env
-      fi
-
-      source $install_dir/arch.env
-      source $install_dir/arch.path
+if [[ "$arch_defined" == "TRUE" ]]
+then
+  rm -f arch.path
+  rm -f arch.fcm
+  rm -f arch.env
+
+  if test -f $arch_path/arch-${arch}.path
+  then
+    ln -s $arch_path/arch-${arch}.path arch.path
+  elif test -f $arch_default_path/arch-${arch}.path
+  then
+    ln -s $arch_default_path/arch-${arch}.path arch.path
+  fi
+        
+  if test -f $arch_path/arch-${arch}.fcm
+  then
+    ln -s $arch_path/arch-${arch}.fcm arch.fcm
+  elif test -f $arch_default_path/arch-${arch}.fcm
+  then
+    ln -s $arch_default_path/arch-${arch}.fcm arch.fcm
+  fi
+
+  if test -f $arch_path/arch-${arch}.env
+  then
+    ln -s $arch_path/arch-${arch}.env arch.env
+  elif test -f $arch_default_path/arch-${arch}.env
+  then
+    ln -s $arch_default_path/arch-${arch}.env arch.env
   else
+    ln -s .void_file arch.env
+  fi
+  source arch.env
+  source arch.path
+else
       echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!"
       exit 1
@@ -151,5 +171,5 @@
     XIOS_FINCDIR="$OASIS_INCDIR $XIOS_FINCDIR"
     XIOS_LIB="$OASIS_LIBDIR $OASIS_LIB $XIOS_LIB"
-fi
+fi 
 
 # Setting path for boost
@@ -158,5 +178,4 @@
    ln -s $PWD/.void_dir $PWD/extern/boost
 else
-   ln -s $PWD/extern/boost $PWD/extern/boost
    export BOOST_INCDIR="-I${PWD}/extern/boost"
    export BOOST_LIBDIR=""
@@ -164,13 +183,23 @@
 fi
 
-
 if [[ "$use_memtrack" == "true" ]]
    then
-   XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"
    XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK"
+
+    if [[ "$memtrack" == "light" ]]
+    then
+	XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT"
+    elif [[ "$memtrack" == "FULL"  ]]
+    then
+      XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"
+      XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL"
+    else
+	echo "Bad choice for --memtrack argument : choose between 'light','full'"
+	exit
+    fi
 fi 
 
-XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR"
-XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR"
+XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR"
+XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR"
 
 XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB"
Index: /XIOS/trunk/make_xios
===================================================================
--- /XIOS/trunk/make_xios	(revision 1449)
+++ /XIOS/trunk/make_xios	(revision 1450)
@@ -10,5 +10,8 @@
 netcdf_lib="netcdf4_par"
 compil_mode="prod"
-
+arch_path="arch"
+arch_default_path="arch"
+arch_defined="FALSE"
+arch_path_defined="FALSE"
 
 # Traitement de la ligne de commande
@@ -26,5 +29,5 @@
 	    echo "       [--avail] : to know available target architectures "
 	    echo "       [--full] : to generate dependencies and recompile from scratch"
-	    echo "       [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"
+	    echo "       [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"i
         echo "       [--use_extern_boost : to use external boost library"
 	    echo "       [--doc] : to generate Doxygen documentation (not available yet)"
@@ -38,5 +41,6 @@
          "--dev")   compil_mode="dev"   ; shift ;;
          "--debug") compil_mode="debug" ; shift ;;
-         "--arch")  arch=$2     ; shift ; shift ;;
+         "--arch")  arch=$2     ; arch_defined="TRUE"; shift ; shift ;;
+         "--arch_path")  arch_path=$2     ; arch_path_defined="TRUE"; shift ; shift ;;
          "--avail") ls arch/*.fcm | cut -d"-" -f2 | cut -d"." -f1 ; exit ;; 
          "--full")  compil_full="true"  ; shift ;;
@@ -46,5 +50,5 @@
          "--job")   job=$2              ; shift ; shift ;;
          "--netcdf_lib")   netcdf_lib=$2 ; shift ; shift ;;
-         "--memtrack")   use_memtrack="true" ; shift ;;
+         "--memtrack")  use_memtrack="true" memtrack=$2  ; shift ; shift ;;
          *)         code="$1"           ; shift ;;
       esac
@@ -74,22 +78,38 @@
 mkdir .void_dir
 
-if [[ !(-z $arch) ]]
-   then
-      rm -f  $install_dir/arch.path
-      rm -f  $install_dir/arch.fcm
-      rm -f  $install_dir/arch.env
-      ln -s  $install_dir/arch/arch-${arch}.path $install_dir/arch.path
-      ln -s  $install_dir/arch/arch-${arch}.fcm  $install_dir/arch.fcm
-
-      if test -f $install_dir/arch/arch-${arch}.env
-      then
-        ln -s $install_dir/arch/arch-${arch}.env arch.env
-      else
-        ln -s $install_dir/.void_file arch.env
-      fi
-
-      source $install_dir/arch.env
-      source $install_dir/arch.path
+if [[ "$arch_defined" == "TRUE" ]]
+then
+  rm -f arch.path
+  rm -f arch.fcm
+  rm -f arch.env
+
+  if test -f $arch_path/arch-${arch}.path
+  then
+    ln -s $arch_path/arch-${arch}.path arch.path
+  elif test -f $arch_default_path/arch-${arch}.path
+  then
+    ln -s $arch_default_path/arch-${arch}.path arch.path
+  fi
+        
+  if test -f $arch_path/arch-${arch}.fcm
+  then
+    ln -s $arch_path/arch-${arch}.fcm arch.fcm
+  elif test -f $arch_default_path/arch-${arch}.fcm
+  then
+    ln -s $arch_default_path/arch-${arch}.fcm arch.fcm
+  fi
+
+  if test -f $arch_path/arch-${arch}.env
+  then
+    ln -s $arch_path/arch-${arch}.env arch.env
+  elif test -f $arch_default_path/arch-${arch}.env
+  then
+    ln -s $arch_default_path/arch-${arch}.env arch.env
   else
+    ln -s .void_file arch.env
+  fi
+  source arch.env
+  source arch.path
+else
       echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!"
       exit 1
@@ -151,5 +171,5 @@
     XIOS_FINCDIR="$OASIS_INCDIR $XIOS_FINCDIR"
     XIOS_LIB="$OASIS_LIBDIR $OASIS_LIB $XIOS_LIB"
-fi
+fi 
 
 # Setting path for boost
@@ -158,5 +178,4 @@
    ln -s $PWD/.void_dir $PWD/extern/boost
 else
-   ln -s $PWD/extern/boost $PWD/extern/boost
    export BOOST_INCDIR="-I${PWD}/extern/boost"
    export BOOST_LIBDIR=""
@@ -164,13 +183,23 @@
 fi
 
-
 if [[ "$use_memtrack" == "true" ]]
    then
-   XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"
    XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK"
+
+    if [[ "$memtrack" == "light" ]]
+    then
+	XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT"
+    elif [[ "$memtrack" == "FULL"  ]]
+    then
+      XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"
+      XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL"
+    else
+	echo "Bad choice for --memtrack argument : choose between 'light','full'"
+	exit
+    fi
 fi 
 
-XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR"
-XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR"
+XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR"
+XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR"
 
 XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB"
