Changeset 43
- Timestamp:
- 08/29/07 18:16:52 (1 year ago)
- Files:
-
- 1 added
- 1 removed
- 18 modified
-
benchmark/Makefile.Rule (modified) (1 diff)
-
benchmark/graph/graph_report.sh (modified) (1 diff)
-
benchmark/html/html_report.sh (modified) (3 diffs)
-
benchmark/html/process.sh (modified) (1 diff)
-
benchmark/run.sh (modified) (4 diffs)
-
benchmark/src/BLAS_LAPACK/check-dgemm.C (modified) (4 diffs)
-
benchmark/src/BLAS_LAPACK/check-dgetrf.C (modified) (4 diffs)
-
benchmark/src/BLAS_LAPACK/check-dgetri.C (modified) (1 diff)
-
benchmark/src/BLAS_LAPACK/check-dtrsm.C (modified) (3 diffs)
-
benchmark/src/BLAS_LAPACK/check-dtrtri.C (modified) (1 diff)
-
benchmark/src/FFLAS_FFPACK/check-fgemm.C (modified) (2 diffs)
-
benchmark/src/FFLAS_FFPACK/check-ftrsm.C (modified) (2 diffs)
-
benchmark/src/FFLAS_FFPACK/check-ftrtri.C (added)
-
benchmark/src/FFLAS_FFPACK/check-lqup.C (modified) (1 diff)
-
benchmark/src/FFLAS_FFPACK/check-trinverse.C (deleted)
-
benchmark/test-src/mesure-FFLAS_FFPACK.sh (modified) (1 diff)
-
benchmark/test-src/parameter.in (modified) (1 diff)
-
include/config-blas.h (modified) (3 diffs)
-
include/fflas-ffpack/fflas.h (modified) (1 diff)
-
tests/test-ftrsm.C (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Makefile.Rule
r42 r43 3 3 ############################ 4 4 ATLAS_CXX=-I/home/cpernet/Logiciels/ATLAS_Opteron64/include/ 5 ATLAS_LIB=-L/home/cpernet/Logiciels/ATLAS_Opteron64/lib -l cblas -latlas5 ATLAS_LIB=-L/home/cpernet/Logiciels/ATLAS_Opteron64/lib -llapack -lcblas -latlas 6 6 GOTO_LIB=-L/home/cpernet/Logiciels/GotoBLAS -lgoto 7 7 FFLAS_FFPACK_PATH=/home/cpernet/Logiciels/fflas-ffpack -
benchmark/graph/graph_report.sh
r42 r43 76 76 77 77 ## TRIANGULAR MATRIX INVERSION 78 f_funct= trinverse78 f_funct=ftrtri 79 79 n_funct=dtrtri 80 80 perl make_graph_file.pl ${TEST_PATH}/ATLAS/timing-check-${f_base}-${PRIME}.txt \ -
benchmark/html/html_report.sh
r42 r43 11 11 read ARCHI_DESCR 12 12 13 TEST_DIR=`ls $HOME_PATH/Target/$ARCHI -I CVS -I GOTO -I ATLAS -I compilation.log| tail -n 1`13 TEST_DIR=`ls $HOME_PATH/Target/$ARCHI -I GOTO -I ATLAS -I compilation.log -I report.xml| tail -n 1` 14 14 echo "Processing testing directory [$TEST_DIR]" 15 15 16 16 TEST_PATH="$HOME_PATH/Target/$ARCHI/$TEST_DIR" 17 17 18 PRIME=65521 18 19 … … 34 35 35 36 ${CURRENT_PATH}/process.sh "Multiple Triangular System Solving" timing-check-dtrsm-${PRIME}.txt \ 36 timing-check-ftrsm-${PRIME}.txt >> ${XML_FILE}37 timing-check-ftrsm-${PRIME}.txt >> ${XML_FILE} 37 38 38 39 ${CURRENT_PATH}/process.sh "Matrix Inversion" timing-check-dgetri-${PRIME}.txt \ … … 40 41 41 42 ${CURRENT_PATH}/process.sh "Triangular Matrix Inversion" timing-check-dtrtri-${PRIME}.txt \ 42 timing-check- trinverse-${PRIME}.txt>> ${XML_FILE}43 timing-check-ftrtri-${PRIME}.txt >> ${XML_FILE} 43 44 echo "</benchmark>" >> ${XML_FILE} 44 45 -
benchmark/html/process.sh
r42 r43 8 8 9 9 10 echo `pwd` 10 11 echo "<test name=\"$1\">" 11 12 echo -n "<prime> " -
benchmark/run.sh
r42 r43 76 76 echo "Compiling BLAS_LAPACK with GOTO..." 77 77 echo "Compiling BLAS_LAPACK with GOTO..." >> ${TARGET_PATH}/compilation.log 78 #make -k GOTO_LINK=true && echo "compilation done" && echo78 make -k GOTO_LINK=true && echo "compilation done" && echo 79 79 80 80 … … 90 90 echo "Compiling FFLAS_FFPACK with ATLAS..." 91 91 echo "Compiling FFLAS_FFPACK with ATLAS..." >> ${TARGET_PATH}/compilation.log 92 make -k ATLAS_LINK=true && echo "compilation done" && echo92 make -k ATLAS_LINK=true && echo "compilation done" && echo 93 93 cd ${CURRENT_PATH}/src/BLAS_LAPACK 94 94 echo "Compiling BLAS_LAPACK with ATLAS..." 95 95 echo "Compiling BLAS_LAPACK with ATLAS..." >> ${TARGET_PATH}/compilation.log 96 #make -k ATLAS_LINK=true && echo "compilation done" && echo96 make -k ATLAS_LINK=true && echo "compilation done" && echo 97 97 else 98 98 echo "Skipping compilation..." … … 116 116 ${TEST_SRC_PATH}/mesure-FFLAS_FFPACK.sh 117 117 echo "running BLAS_LAPACK tests with GOTO..." 118 #${TEST_SRC_PATH}/mesure-BLAS_LAPACK.sh118 ${TEST_SRC_PATH}/mesure-BLAS_LAPACK.sh 119 119 120 120 … … 127 127 echo "running FFLAS_FFPACK tests with ATLAS..." 128 128 ${TEST_SRC_PATH}/mesure-FFLAS_FFPACK.sh 129 #echo "running BLAS_LAPACK tests with ATLAS..."129 echo "running BLAS_LAPACK tests with ATLAS..." 130 130 ${TEST_SRC_PATH}/mesure-BLAS_LAPACK.sh -
benchmark/src/BLAS_LAPACK/check-dgemm.C
r42 r43 4 4 5 5 #include "fflas-ffpack/fflas.h" 6 #include "fflas-ffpack/modular-centered.h" 6 #include "fflas-ffpack/modular-balanced.h" 7 #include "Matio.h" 7 8 #include "timer.h" 8 9 … … 14 15 15 16 int p = atoi(argv[1]); 16 size_t n = atoi(argv[2]);17 int n = atoi(argv[2]); 17 18 size_t iter = atoi(argv[3]); 18 19 … … 22 23 23 24 Field F(p); 24 Element one ;25 Element one, zero; 25 26 F.init(one, 1.0); 27 F.init(zero, 0.0); 26 28 27 Element * C = new Element[n*n];28 29 29 Timer chrono; 30 30 double time=0.0, time2=0.0; 31 31 int singular; 32 32 33 Element * A; 34 Element * B; 33 Element * A, * B, * C; 35 34 36 35 for (size_t i=0;i<iter;++i){ … … 56 55 } 57 56 58 57 C = new Element[n*n]; 58 59 59 chrono.clear(); 60 60 chrono.start(); 61 FFLAS::fgemm (F, FFLAS::FflasNoTrans, FFLAS::FflasNoTrans, n,n,n, one,62 A, n, B, n, zero, C);61 cblas_dgemm (CblasRowMajor, CblasNoTrans, CblasNoTrans, n,n,n, one, 62 A, n, B, n, zero, C,n); 63 63 chrono.stop(); 64 64 time+=chrono.usertime(); -
benchmark/src/BLAS_LAPACK/check-dgetrf.C
r42 r43 1 1 #include <iostream> 2 #include <vector> 2 3 3 4 4 #include "linbox-config.h"5 #undef __LINBOX_HAVE_NTL6 #undef __LINBOX_HAVE_GIVARO7 5 #ifndef __LINBOX_HAVE_DGETRF 8 6 #define __LINBOX_HAVE_DGETRF 1 9 7 #endif 10 #include " linbox/matrix/blas-matrix.h"11 #include " linbox/algorithms/blas-domain.h"12 #include " linbox/field/modular.h"13 #include " linbox/util/timer.h"8 #include "fflas-ffpack/fflas.h" 9 #include "fflas-ffpack/modular-balanced.h" 10 #include "timer.h" 11 #include "Matio.h" 14 12 15 16 using namespace LinBox;17 13 using namespace std; 18 14 … … 22 18 23 19 int p = atoi(argv[1]); 24 size_t n = atoi(argv[2]);20 int n = atoi(argv[2]); 25 21 size_t iter = atoi(argv[3]); 26 22 … … 30 26 31 27 Field F(p); 32 BlasMatrixDomain<Field> BMD(F); 33 BlasMatrix<Element> A (n,n); 28 Element * A; 34 29 35 LinBox::Timer chrono;30 Timer chrono; 36 31 double time=0.0; 37 32 int singular; … … 39 34 for (size_t i=0;i<iter;++i){ 40 35 if (argc > 4){ 41 fstream osA(argv[4]); 42 A.read(osA,F); 43 osA.close(); 36 A = read_field (F, argv[4], &n,&n); 44 37 } 45 38 else{ 39 A = new Element[n*n]; 46 40 Field::RandIter G(F); 47 BlasMatrix<Element>::RawIterator it = A.rawBegin(); 48 for (; it != A.rawEnd();++it) 49 G.random(*it); 41 for (size_t i=0; i<n*n; ++i) 42 G.random(*(A+i)); 50 43 } 51 44 52 45 chrono.clear(); 53 46 chrono.start(); 54 clapack_dgetrf(CblasRowMajor,n,n,A .getPointer(),n,&Piv[0]);47 clapack_dgetrf(CblasRowMajor,n,n,A,n,&Piv[0]); 55 48 chrono.stop(); 56 49 -
benchmark/src/BLAS_LAPACK/check-dgetri.C
r42 r43 1 1 #include <iostream> 2 #include <vector> 3 4 #ifndef __LINBOX_HAVE_DGETRF 5 #define __LINBOX_HAVE_DGETRF 1 6 #endif 7 8 #ifndef __LINBOX_HAVE_DGETRI 9 #define __LINBOX_HAVE_DGETRI 1 10 #endif 11 #ifndef __LINBOX_HAVE_DTRTRI 12 #define __LINBOX_HAVE_DTRTRI 1 13 #endif 14 #ifndef __LINBOX_AUTOIMPLEMENT_DGETRI 15 #define __LINBOX_AUTOIMPLEMENT_DGETRI 1 16 #endif 2 17 3 18 19 #include "fflas-ffpack/fflas.h" 20 #include "fflas-ffpack/modular-balanced.h" 21 #include "timer.h" 22 #include "Matio.h" 4 23 5 #include "linbox-config.h"6 #undef __LINBOX_HAVE_NTL7 #undef __LINBOX_HAVE_GIVARO8 #ifndef __LINBOX_HAVE_DGETRI9 #define __LINBOX_HAVE_DGETRI10 #endif11 #include "linbox/matrix/blas-matrix.h"12 #include "linbox/algorithms/blas-domain.h"13 #include "linbox/field/modular.h"14 #include "linbox/util/timer.h"15 16 using namespace LinBox;17 24 using namespace std; 18 25 19 26 int main(int argc, char** argv) { 20 27 21 28 // parameter: p, n, iteration, file 22 29 23 30 int p = atoi(argv[1]); 24 size_t n = atoi(argv[2]);31 int n = atoi(argv[2]); 25 32 size_t iter = atoi(argv[3]); 26 33 27 34 28 35 typedef Modular<double> Field; 29 36 typedef Field::Element Element; 30 37 vector<int> Piv(n,0); 38 31 39 Field F(p); 40 Field::Element * A; 32 41 33 LinBox::Timer chrono;42 Timer chrono; 34 43 double time=0.0; 35 44 int singular; 36 std::vector<int> Piv(n,0); 37 BlasMatrix<Element> A (n,n); 45 46 for (size_t i=0;i<iter;++i){ 47 if (argc > 4){ 48 A = read_field(F, argv[4], &n, &n); 49 } else { 50 A = new Element[n*n]; 51 Field::RandIter G(F); 52 for (size_t i=0; i<n*n; ++i) 53 G.random(*(A+i)); 38 54 39 for (size_t i=0;i<iter;++i){40 if (argc > 4){41 fstream osA(argv[4]);42 A.read(osA,F);43 osA.close();44 55 } 45 else{ 46 Field::RandIter G(F); 47 BlasMatrix<Element>::RawIterator it = A.rawBegin(); 48 for (; it != A.rawEnd();++it) 49 G.random(*it); 50 } 51 56 int nullity=0; 52 57 chrono.clear(); 53 58 chrono.start(); 54 clapack_dgetrf(CblasRowMajor,n,n,A.getPointer(),n,&Piv[0]); 55 clapack_dgetri(CblasRowMajor,n,A.getPointer(),n,&Piv[0]); 59 clapack_dgetrf(CblasRowMajor,n,n,A,n,&Piv[0]); 60 clapack_dgetri(CblasRowMajor,n,A,n,&Piv[0]); 61 56 62 chrono.stop(); 57 63 58 64 time+=chrono.usertime(); 59 65 delete[] A; 60 66 } 61 67 62 68 cerr<<"n: "<<n<<" p: "<<p<<" time: "<<time/iter<<endl; 63 69 64 70 65 71 return 0; 66 72 } 67 73 68 74 75 76 -
benchmark/src/BLAS_LAPACK/check-dtrsm.C
r42 r43 1 1 #include <iostream> 2 2 3 //#define __LINBOX_CONFIGURATION 4 //#include <linbox/config-blas.h> 3 #include "fflas-ffpack/fflas.h" 4 #include "fflas-ffpack/modular-balanced.h" 5 #include "timer.h" 6 #include "Matio.h" 5 7 6 #include "linbox-config.h"7 #undef __LINBOX_HAVE_NTL8 #undef __LINBOX_HAVE_GIVARO9 #include "linbox/matrix/blas-matrix.h"10 #include "linbox/algorithms/blas-domain.h"11 #include "linbox/field/modular.h"12 #include "linbox/util/timer.h"13 14 using namespace LinBox;15 8 using namespace std; 16 9 … … 19 12 // parameter: p, n, iteration, file1, file2 20 13 21 if (argc != 4)22 std::cout<<"usage: <p> <dim> <iter>\n";23 24 14 int p = atoi(argv[1]); 25 size_t n = atoi(argv[2]);15 int n = atoi(argv[2]); 26 16 size_t iter = atoi(argv[3]); 27 17 … … 31 21 32 22 Field F(p); 33 BlasMatrixDomain<Field> BMD(F); 34 BlasMatrix<Element> A(n,n), B(n,n); 35 36 LinBox::Timer chrono; 23 Element one; 24 F.init(one, 1.0); 25 Element * A; 26 Element * B; 27 28 Timer chrono; 37 29 double time=0.0; 38 30 int singular; 39 31 40 32 for (size_t i=0;i<iter;++i){ 33 Field::RandIter G(F); 41 34 if (argc > 4){ 42 fstream osA(argv[4]); 43 A.read(osA,F); 44 osA.close(); 35 A = read_field (F, argv[4], &n, &n); 45 36 } 46 37 else{ 47 Field::RandIter G(F); 48 BlasMatrix<Element>::RawIterator it = A.rawBegin(); 49 for (; it != A.rawEnd();++it) 50 G.random(*it); 38 A = new Element[n*n]; 39 for (size_t i = 0; i< n*n; ++i) 40 G.random(*(A+i)); 51 41 } 52 42 53 54 43 if (argc == 6){ 55 fstream osB(argv[5]); 56 B.read(osB,F); 57 osB.close(); 44 B = read_field (F, argv[5], &n, &n); 58 45 } 59 46 else{ 47 B = new Element[n*n]; 60 48 Field::RandIter G(F); 61 BlasMatrix<Element>::RawIterator it = B.rawBegin(); 62 for (; it != B.rawEnd();++it) 63 G.random(*it); 49 for (size_t i=0 ; i< n*n; ++i) 50 G.random(*(A+i)); 64 51 } 65 52 53 for (size_t k=0;k<n;++k) 54 while (F.isZero( G.random(*(A+k*(n+1))))); 55 66 56 chrono.clear(); 67 57 chrono.start(); 68 cblas_dtrsm(CblasRowMajor, CblasLeft, CblasLower, CblasNoTrans, 69 CblasUnit, n, n, 1.0, A.getPointer(), n, B.getPointer(), n); 58 cblas_dtrsm (CblasRowMajor, CblasLeft, CblasLower, CblasNoTrans, 59 CblasNonUnit, n,n, one, A, n, B, n); 60 70 61 chrono.stop(); 71 62 time+=chrono.usertime(); 63 delete[] A; 64 delete[] B; 72 65 73 66 } -
benchmark/src/BLAS_LAPACK/check-dtrtri.C
r42 r43 1 1 #include <iostream> 2 2 3 #include "linbox-config.h"4 #undef __LINBOX_HAVE_NTL5 #undef __LINBOX_HAVE_GIVARO6 3 #define __LINBOX_HAVE_DTRTRI 1 7 #include "linbox/matrix/blas-matrix.h"8 #include "linbox/algorithms/blas-domain.h"9 #include "linbox/field/modular.h"10 #include "linbox/util/timer.h"11 4 12 //extern "C" { 13 //#include "atlas_lapack.h" 14 //#include "atlas_enum.h" 15 //#include "clapack.h" 16 // int ATL_dtrtriRL(const enum ATLAS_DIAG Diag, const int N, double *A, const int lda); 17 //} 5 #include "fflas-ffpack/modular-balanced.h" 6 #include "fflas-ffpack/ffpack.h" 7 #include "timer.h" 8 #include "Matio.h" 18 9 19 using namespace LinBox;20 10 using namespace std; 21 11 22 12 int main(int argc, char** argv) { 23 13 24 14 // parameter: p, n, iteration, file 25 15 26 16 int p = atoi(argv[1]); 27 size_t n = atoi(argv[2]);17 int n = atoi(argv[2]); 28 18 size_t iter = atoi(argv[3]); 29 19 30 20 31 21 typedef Modular<double> Field; 32 22 typedef Field::Element Element; 33 23 34 24 Field F(p); 25 Element * A; 35 26 36 LinBox::Timer chrono;27 Timer chrono; 37 28 double time=0.0; 38 29 int singular; 39 BlasMatrix<Element> A (n,n); 30 31 Field::RandIter G(F); 40 32 for (size_t i=0;i<iter;++i){ 33 if (argc > 4){ 34 A = read_field (F, argv[4], &n, &n); 35 } else { 36 A = new Element[n*n]; 37 for (size_t i=0; i< n*n; ++i) 38 G.random(*(A+i)); 39 } 40 for (size_t k=0;k<n;++k) 41 while (F.isZero( G.random(*(A+k*(n+1))))); 41 42 42 if (argc > 4){43 fstream osA(argv[4]);44 A.read(osA,F);45 osA.close();46 }47 else{48 Field::RandIter G(F);49 BlasMatrix<Element>::RawIterator it = A.rawBegin();50 for (; it != A.rawEnd();++it)51 G.random(*it);52 }53 54 for (size_t k=0;k<n;++k)55 A.setEntry(k,k,1);56 57 43 chrono.clear(); 58 chrono.start(); 59 //ATL_dtrtriRL(CblasUnit,n,A.getWritePointer(),n); 60 clapack_dtrtri(CblasRowMajor,CblasLower, CblasUnit,n,A.getWritePointer(),n); 44 chrono.start(); 45 clapack_dtrtri(CblasRowMajor,CblasUpper, CblasNonUnit,n,A,n); 61 46 chrono.stop(); 62 47 63 48 time+=chrono.usertime(); 64 49 delete[] A; 50 65 51 } 66 52 -
benchmark/src/FFLAS_FFPACK/check-fgemm.C
r42 r43 26 26 F.init(one, 1.0); 27 27 F.init(zero,0.0); 28 Element * C = new Element[n*n];29 28 30 29 Timer chrono; … … 32 31 int singular; 33 32 34 Element * A; 35 Element * B; 33 Element * A, * B, * C; 36 34 37 35 for (size_t i=0;i<iter;++i){ -
benchmark/src/FFLAS_FFPACK/check-ftrsm.C
r42 r43 36 36 } 37 37 else{ 38 A = new Element[n*n]; 38 39 for (size_t i = 0; i< n*n; ++i) 39 40 G.random(*(A+i)); … … 44 45 } 45 46 else{ 47 B = new Element[n*n]; 46 48 Field::RandIter G(F); 47 49 for (size_t i=0 ; i< n*n; ++i) -
benchmark/src/FFLAS_FFPACK/check-lqup.C
r42 r43 34 34 } 35 35 else{ 36 A = new Element[n*n]; 36 37 Field::RandIter G(F); 37 38 for (size_t i=0; i< n*n; ++i) -
benchmark/test-src/mesure-FFLAS_FFPACK.sh
r42 r43 8 8 ${TEST_SRC_PATH}/mesure.sh check-inverse $p 9 9 ${TEST_SRC_PATH}/mesure.sh check-ftrsm $p 10 ${TEST_SRC_PATH}/mesure.sh check- trinverse$p10 ${TEST_SRC_PATH}/mesure.sh check-ftrtri $p 11 11 done -
benchmark/test-src/parameter.in
r42 r43 1 500 10 2 1000 5 3 2000 5 4 3000 3 1 300 5 2 500 2 3 1000 1 4 2000 1 5 5000 1 6 10000 1 7 15000 1 -
include/config-blas.h
r40 r43 66 66 extern "C" { 67 67 68 #if HAVE_DGETRF 69 void dgetrf_(const int *, const int *, double *, const int *, int *, int *); 70 #endif 71 #if HAVE_DGETRI
