Changeset 14 for tests

Show
Ignore:
Timestamp:
04/09/07 12:02:27 (2 years ago)
Author:
pernet
Message:
 
Location:
tests
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • tests/Makefile

    r4 r14  
    44# root for the blas library, for ex. /home/foo/ATLAS/lib/Linux_P4SSE2 
    55#BLASROOT = /home/cpernet/Logiciels/ATLAS_Opteron64/lib/ 
    6 BLASROOT = /home/pernet/Logiciels/ATLAS/lib/Linux_PIIISSE2 
     6BLASROOT = /home/cpernet/Logiciels/GotoBLAS 
    77 
    88# ATLAS BLAS users : uncomment these lines: 
    9 CXXFLAGS+=-D__LINBOX_HAVE_CBLAS 
    10 LOADLIBES+=-L${BLASROOT} -lcblas -latlas 
     9#CXXFLAGS+=-D__LINBOX_HAVE_CBLAS 
     10#LOADLIBES+=-L${BLASROOT} -lcblas -latlas 
    1111 
    1212# GotoBlas BLAS users : uncomment this line 
    13 #LOADLIBES+=-L${BLASROOT} -lgoto 
     13LOADLIBES+=-L${BLASROOT} -lgoto 
    1414 
    1515# Other BLAS users, uncomment this line 
     
    1717 
    1818# architecture parameter for gcc (-march option) for ex. pentium4, athlon ... 
    19 ARCH = -march=pentium3  
     19#ARCH = -march=pentium3  
    2020#ARCH = -march=pentium4 
    2121#ARCH = -march=athlon 
    2222#ARCH = -march=opteron  
     23ARCH = -march=opteron -m64 -mtune=k8 
    2324 
    2425#---------------------------------------------------------- 
  • tests/test-lqup.C

    r4 r14  
    2020#include "Matio.h" 
    2121#include "timer.h" 
    22 #include "fflas-ffpack/modular-balanced.h" 
     22#include "fflas-ffpack/modular-positive.h" 
    2323#include "fflas-ffpack/ffpack.h" 
    2424 
     
    3636                exit(-1); 
    3737        } 
    38         Field F(atoi(argv[1])); 
     38        Field F((unsigned long)atoi(argv[1])); 
    3939        Field::Element * A; 
    4040         
     
    6363                tim.clear();       
    6464                tim.start();     
    65                 R = FFPACK::LUdivine (F, diag, m, n, A, n, P, Q, 
    66                                               FFPACK::FfpackLQUP, cutoff); 
     65                R = FFPACK::LUdivine_gauss (F, diag, m, n, A, n, P, Q, 
     66                                            FFPACK::FfpackLQUP); 
    6767                tim.stop(); 
    6868                timc+=tim; 
    6969        } 
    7070        //write_field (F,cerr<<"Result = "<<endl, A, m,n,n); 
    71          
     71 
     72//      cerr<<"P = ["; 
     73//      for (size_t i=0; i<n; ++i) 
     74//              cerr<<P[i]<<" "; 
     75//      cerr<<"]"<<endl; 
     76//      cerr<<"Q = ["; 
     77//      for (size_t i=0; i<m; ++i) 
     78//              cerr<<Q[i]<<" "; 
     79//      cerr<<"]"<<endl; 
    7280#if DEBUG 
    7381        Field::Element * L = new Field::Element[m*m]; 
     
    8492                        F.assign (*(U + i*n + j), *(A+ i*n+j)); 
    8593        } 
     94        for (size_t i=R;i<m; ++i) 
     95                for (size_t j=0; j<n; ++j) 
     96                        F.assign(*(U+i*n+j), zero); 
    8697        for ( int i=0; i<m; ++i ){ 
    8798                int j=0; 
    88                 for (; j< ((i<n)?i:n) ; ++j ) 
     99                for (; j< ((i<R)?i:R) ; ++j ) 
    89100                        F.assign( *(L + i*m+j), *(A+i*n+j)); 
    90101                for (; j<m; ++j ) 
     
    92103        } 
    93104 
    94         FFPACK::applyP( F, FFLAS::FflasRight, FFLAS::FflasNoTrans, m,0,m, L, m, Q); 
     105//      write_field(F,cerr<<"L = "<<endl,L,m,m,m); 
     106//      write_field(F,cerr<<"U = "<<endl,U,m,n,n); 
     107        FFPACK::applyP( F, FFLAS::FflasRight, FFLAS::FflasNoTrans, m,0,R, L, m, Q); 
    95108        if (diag == FFLAS::FflasNonUnit) 
    96109                for ( int i=0; i<m; ++i )