Index: trunk/libIGCM/libIGCM_sys/IGCM_add_out.awk
===================================================================
--- trunk/libIGCM/libIGCM_sys/IGCM_add_out.awk	(revision 373)
+++ trunk/libIGCM/libIGCM_sys/IGCM_add_out.awk	(revision 670)
@@ -55,5 +55,4 @@
   Information_found=0
   Information_ksh_SX_found=0
-  vargas_found=0
 
   RealTime=0.
@@ -110,5 +109,6 @@
 #      printf("RealTime = %10.5f\n",Res)
       if ( Res > RealTime ) {
-	RealTime=Res
+        myprint( "NEC Real Time updated" )
+	    RealTime=Res
       }
       next
@@ -116,4 +116,5 @@
     	  
     if( info=="User Time (sec)" ) {
+      myprint( "NEC User Time " )
       UserTime=UserTime+Res
       next
@@ -210,4 +211,5 @@
 
 # csh time
+# 0.000+u 0.000+s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
   else if (match($0, "[0-9.]+u [0-9.]+s .+"))
   {
@@ -217,8 +219,12 @@
     UserTime=(substr($1,1,match($1, "u")-1))
     SysTime=(substr($2,1,match($2, "s")-1))
+    # si hours ?
     RealTime=(substr($3,1,match($3, ":")-1)*60. + substr($3,match($3, ":")+1))
 
   }
 # linux system time
+### example :
+### 2.02user 6.60system 12:41.62elapsed 1%CPU (0avgtext+0avgdata 25520maxresident)k
+### 2.02user 6.60system 5:12:41.62elapsed 1%CPU (0avgtext+0avgdata 25520maxresident)k
   else if (match($0, ".*user .*system .*elapsed .*CPU .*"))
   {
@@ -228,30 +234,108 @@
     UserTime=(substr($1,1,match($1, "user")-1))
     SysTime=(substr($2,1,match($2, "system")-1))
-    RealTime=(substr($3,1,match($3, ":")-1)*60.+substr($3, match($3, ":")+1, match($3, "elapsed")))
-
-  }
-# AIX vargas system time
-  else if (match($0, "real   [0-9]*"))
-  {
-    myprint( "vargas" )
-    vargas_found=1  
-    counter=counter+1
-
-    RealTime=substr($0,8)
+    ### RealTime=(substr($3,1,match($3, ":")-1)*60.+substr($3, match($3, ":")+1, match($3, "elapsed"))) what for hours????
+
+    RealTime=0
+    if (match($3, "[0-9]*:[0-9]*:[0-9]*\\.[0-9]*elapsed"))
+    {
+      #### $3= 5:12:41.62elapsed
+      myprint( "linux elapsed in hours " )
+      sub1=(match($3, ":")-1)
+      sub2=sub1+2
+      min=(substr($3,sub2))
+      sub3=(match(min, ":")-1)
+      sub4=sub3+2
+      fin=(substr(min,sub4))
+      sub5=(match(fin, "elapsed")-1)
+      RealTime=((substr($3,1,sub1))*60+substr(min,1,sub3))*60+(substr(min,sub4,sub5))
+      myprint( " real time seconds " RealTime )
+    }
+    else if (match($3, "[0-9]*:[0-9]*\\.[0-9]*elapsed"))
+    {
+      #### $3=12:41.62elapsed
+      myprint( "linux elapsed in minutes " )
+      sub1=(match($3, ":")-1)
+      sub2=sub1+2
+      fin=(substr($3,sub2))
+      sub3=(match(fin, "elapsed")-1)
+      RealTime=(substr($3,1,sub1))*60+(substr($3,sub2,sub3))
+      myprint( " real time seconds " RealTime )
+    }
+    else if (match($3, "[0-9]*\\.[0-9]*elapsed"))
+    {
+      #### $3=41.62elapsed
+      myprint( "linux elapsed in second " )
+      RealTime=(substr($3,1,match($3, "elapsed")-1))
+      myprint( " real time seconds " RealTime )
+    }
     next
   }
-  else if (vargas_found=1 )
-  {
-    if (match($0, "user   [0-9]*"))
-      {
-	UserTime=substr($0,8)
-	next
-      }
-    if (match($0, "sys    [0-9]*"))
-      {
-	SysTime=substr($0,7)
-	next
-      }
-  }
+# curie system time (if not linux) or vargas
+### curie (with tab)
+### real    9m38.96s
+### user    0m4.45s
+### sys     0m6.41s
+### vargas (with space)
+### real   2891.80
+### user   0.28
+### sys    0.45
+
+  else if (match($1, "real"))
+  {
+    myprint( "curie ou vargas ?" )
+
+    # real    9m38.96s or real   2891.80
+    if (match($2, ".*s.*"))
+    {
+      myprint( "curie" )
+      counter=counter+1
+      ### real    9m38.96s
+      ### real  5h9m38.96s
+      RealTime=((substr($2,1,match($2, "h")-1)*60.)+substr($2,match($2, "h")+1,match($2, "m")-1))*60.+substr($2,match($2, "m")+1,match($2, "s"))
+      next
+    }
+    else
+    {
+      myprint( "vargas" )
+      counter=counter+1
+   
+      ### real 2891.80
+      RealTime=$2
+    next
+    }
+  }
+  else if (match($1, "user"))
+  {
+    # user(tab)0m4.45s or user   0.28
+    if (match($2, ".*s.*"))
+    {
+       myprint( "curie user" )
+       UserTime=((substr($2,1,match($2, "h")-1)*60.)+substr($2,match($2, "h")+1,match($2, "m")-1))*60.+substr($2,match($2, "m")+1,match($2, "s"))
+       next
+    }
+    else
+    {
+      myprint( "vargas user" )
+      UserTime=$2
+      next
+    }
+  }
+  else if (match($1, "sys"))
+  {
+    # 0m6.41s or 0.45
+    if (match($2, ".*s.*"))
+    {
+      myprint( "curie sys" )
+      SysTime=((substr($2,1,match($2, "h")-1)*60.)+substr($2,match($2, "h")+1,match($2, "m")-1))*60.+substr($2,match($2, "m")+1,match($2, "s"))
+      next
+    }
+    else
+    {
+      myprint( "vargas sys" )
+      SysTime=$2
+      next
+    }
+  }
+
 # Get information with time output on SX hosts
 # ksh time
