Index: trunk/SophyaProg/Tests/jtcpitarr.cc
===================================================================
--- trunk/SophyaProg/Tests/jtcpitarr.cc	(revision 1342)
+++ trunk/SophyaProg/Tests/jtcpitarr.cc	(revision 1343)
@@ -301,5 +301,5 @@
     try {
       Matrix a(n,n);
-      a = Sequence(RandomSequence(RandomSequence::Gaussian, 0., 2.5));
+      a = RandomSequence(RandomSequence::Gaussian, 0., 2.5);
       Matrix inva = Inverse(a);
       Matrix diff = id-a*inva;
Index: trunk/SophyaProg/Tests/lpk.cc
===================================================================
--- trunk/SophyaProg/Tests/lpk.cc	(revision 1342)
+++ trunk/SophyaProg/Tests/lpk.cc	(revision 1343)
@@ -11,6 +11,7 @@
 
 
-int lpk_tarr(int n);
-int lpk_tmtx(int n);
+int lpk_rzt_arr(int n);
+int lpk_linsolve_mtx(int n);
+int lpk_svd_mtx(int l, int c, int wsf, bool covu=true);
 
 static double TOLERANCE = 1.e-6;
@@ -25,23 +26,32 @@
 
   if (narg < 2) {
-    cout << " lpk - LinAlg/LapackServer test - Usage lpk t/s [size=5] [prtlev=0] [nprtmax=100]\n" 
-	 << " t:  lpk_tarr() rztest_lapack with TArray<r_4> \n" 
-	 << " s:  lpk_tmtx() LapackServer with TMatrix<r_8> \n" << endl;
+    cout << " lpk - LinAlg/LapackServer test \n" 
+	 << " Usage: lpk linsolve/svd/rzt [sizeL,C=5,5] [prtlev=0] \n" 
+	 << "             [nprtmax=100] [WorkSpaceSizeFactor=2] \n" 
+	 << "   linsolve:  lpk_linsolve_mtx() LapackServer::LinSolve with TMatrix<r_8> \n" 
+	 << "   svd:  lpk_svd_mtx() LapackServer::SVD(a,s,u,vt) with TMatrix<r_8> \n" 
+	 << "   svds:  lpk_svd_mtx() LapackServer::SVD(a,s); with TMatrix<r_8> \n" 
+	 << "   rzt:  lpk_rzt_tarr() rztest_lapack with TArray<r_4> \n" << endl;
     exit(0);
   }
-  int n = 5;
-  int opt = 's';
-  opt = *(arg[1]);
-  if (narg > 2) n = atoi(arg[2]);
+  int l,c;
+  l = c = 5;
+  int wsf = 2;
+  string opt = arg[1];
+  if (narg > 2) sscanf(arg[2], "%d,%d", &l, &c); 
   int nprt = 100;
   int prtlev = 1;
   if (narg > 3) prtlev = atoi(arg[3]);
   if (narg > 4) nprt = atoi(arg[4]);
+  if (narg > 5) wsf = atoi(arg[5]);
 
   int rc = 0;
   BaseArray::SetMaxPrint(nprt, prtlev);
   try {
-    if (opt == 's') rc = lpk_tmtx(n);
-    else rc = lpk_tarr(n);
+    if (opt == "linsolve") rc = lpk_linsolve_mtx(l);
+    else if (opt == "svd") rc = lpk_svd_mtx(l,c,wsf,true);
+    else if (opt == "svds") rc = lpk_svd_mtx(l,c,wsf,false);
+    else if (opt == "rzt") rc = lpk_rzt_arr(l);
+    else { cout << " Unknown option " << opt << " ! " << endl; rc = 66; }
   }
   catch (PThrowable exc) {
@@ -55,17 +65,19 @@
   
   PrtTim(" End of lpk LinAlg/Lapack test ");
-  cout << " ---------------  END of Programme -------------- " << endl;
+  cout << " ---------------  END of Programme -------- (Rc= " 
+       << rc << ") --- " << endl;
   return(rc);
 }
 
-
-int lpk_tmtx(int n)
+// -----------------------------------------------------------------------
+/* Nouvelle-Fonction */
+int lpk_linsolve_mtx(int n)
 {
-  int i,j,k;
+  int i,j;
   BaseArray::SetDefaultMemoryMapping(BaseArray::FortranMemoryMapping);
+  cout << " lpk_linsolve_mtx() - Test of LapackServer::LinSolve()  " << endl;
   Matrix a(n,n);
   for(i=0; i<n; i++)
     for(j=0; j<n; j++)  a(j,i) = GauRnd(0., 1.);
-  cout << " ------------ Matrix A = \n " << a << "\n" << endl; 
   
   Vector x(n), b;
@@ -75,6 +87,5 @@
   b = a*x;
 
-  //  cout << ":::::::: rztest_lapack - Size=" << n << "  ::::::::: " << endl;
-  cout << " ------- lpk_tmtx() LapackServerTest Using TMatrix<r_8> -------- " << endl; 
+  cout << " ---- lpk_tmtx() LapackServer::LinSolve Test Using TMatrix<r_8> ----- " << endl; 
   cout << " ------------ Matrix A = \n " << a << "\n" << endl; 
   cout << " ------------ Matrix X = \n " << x << "\n" << endl; 
@@ -88,4 +99,5 @@
   cout << " ------------ Result B(=X ?) = \n " << b << "\n" << endl; 
   Vector diff = b-x;
+  PrtTim(" End of Compute(diff)");
   cout << " ------------ Vector diff B-X = \n " << diff << "\n" << endl; 
   double min,max;
@@ -102,7 +114,53 @@
 }
 
-int  lpk_tarr(int n)
+// -----------------------------------------------------------------------
+/* Nouvelle-Fonction */
+int lpk_svd_mtx(int m, int n, int wsf, bool covu)
 {
-  int i,j,k;
+  BaseArray::SetDefaultMemoryMapping(BaseArray::FortranMemoryMapping);
+  cout << " lpk_svd_mtx() - Test of LapackServer::SVD " << endl;
+  
+  Matrix a(m , n), aa;
+  a = RandomSequence(RandomSequence::Gaussian, 0., 4.);
+  aa = a;
+  Vector s;
+  Matrix u, vt;
+  cout << " ---- lpk_svd_tmtx() LapackServer::SVD Test Using TMatrix<r_8> ---- " << endl; 
+  cout << " ------------ Matrix A = \n " << a << "\n" << endl; 
+
+  cout << "\n   Calling LapackSVD(a,s,u,vt) .... " << endl;
+  PrtTim(" Calling LapackSVD() ");
+  LapackServer<r_8> lpks;
+  lpks.SetWorkSpaceSizeFactor(wsf);
+  if (covu) lpks.SVD(aa, s, u, vt);
+  else lpks.SVD(aa, s);
+  PrtTim(" End LapackSVD() ");
+
+  cout << " ------------ Result S  = \n " << s << "\n" << endl; 
+  if (!covu) return(0);
+  cout << " ------------ Result U  = \n " << u << "\n" << endl; 
+  cout << " ------------ Result VT = \n " << vt << "\n" << endl; 
+  Matrix sm(m,n);
+  int minmn = (m<n) ? m : n ;
+  for(int k=0; k< minmn ; k++) sm(k,k) = s(k);
+  Matrix diff = u*(sm*vt) - a;
+  PrtTim(" End of Compute(diff)");
+  cout << " ------------ Matrix diff U*S*Vt - A = \n " << diff << "\n" << endl; 
+  double min,max;
+  diff.MinMax(min, max);
+  cout << " Min/Max difference Matrix (?=0) , Min= " << min 
+       << " Max= " << max << endl;
+  if ((fabs(min) > TOLERANCE) || (fabs(max) > TOLERANCE)) {
+    cout << " !!! Difference exceeding tolerance (=" << TOLERANCE << ") !!!" 
+	 << endl;
+    return(99);
+  } 
+  return(0);
+
+}
+
+int  lpk_rzt_arr(int n)
+{
+  int i,j;
   TArray<r_4> a(n,n);
   for(i=0; i<n; i++)
Index: trunk/SophyaProg/Tests/tnt.cc
===================================================================
--- trunk/SophyaProg/Tests/tnt.cc	(revision 1342)
+++ trunk/SophyaProg/Tests/tnt.cc	(revision 1343)
@@ -98,6 +98,7 @@
 cout << " float->string: fvu= " << fvu << " (string)fvu=" << (string)fvu << endl;
 cout << " int->string: ivu= " << ivu << " (string)ivu=" << (string)ivu << endl;
+ complex<double> zzd = zvs;
 cout << "String->complex<double>: zvs = " << zvs 
-     << " (complex<double>)zvs= " << (complex<double>)zvs << endl;
+     << " (complex<double>)zvs= " << zzd << endl;
 cout << "String->double: dvs = " << dvs 
      << " (double)zvs= " << (double)dvs << endl;
