Changeset 1728 in Sophya


Ignore:
Timestamp:
Oct 31, 2001, 6:55:43 PM (24 years ago)
Author:
ansari
Message:

extension prog test perfo f90 - Reza - 31/10/01

Location:
trunk/Eval/Speed
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Eval/Speed/makefile

    r1094 r1728  
    1 FC = f90 -O
    2 CC = cc -O -fast -tune host
    3 CXX = cxx -O -fast -tune host
     1FC = f90 -O3
     2CC = cc -O3
     3CXX = cxx -O3
    44LIBBLAS = -ldxml
    55
  • trunk/Eval/Speed/matrixf.f90

    r1727 r1728  
    44! declaration d'interface de fonction
    55      interface
    6         subroutine check_table(k, a, b, c)
     6        subroutine check_table(k, a, b, c, ntot)
    77          integer, intent (in) :: k
     8          integer, intent (inout) :: ntot
    89          double precision, intent (in), dimension(:,:) :: a,b,c
    910        end subroutine check_table
    1011      end interface
    1112
    12       integer, parameter :: NL = 2, NC=2
     13      integer, parameter :: NL = 4, NC=5
    1314      double precision, dimension (NL, NC) :: m1,m2,m3,m4
    1415
    15       integer :: i,j,k
    16      
     16      integer :: i,j,k,kk
     17      integer :: ntot,nloop
     18
    1719      integer :: N = 5000000
    1820
    1921      print *, '--- timing test : N=', N, ' NL=', NL, ' NC=',NC
     22      ntot = 0
     23      nloop = 0
     24      do kk=1,1
    2025      do k=1,N
    2126        m1 = 0
     
    2934        m3 = m1+m2;
    3035        m4 = m1*m2;
    31         call check_table(k, m2, m3, m4)
     36        call check_table(k, m2, m3, m4, ntot)
    3237!        if (k .eq. 1) then
    3338!           print *, 'm1=', m1       
     
    3641!           print *, 'm4=', m4
    3742!        endif
     43        nloop = nloop+1
    3844      enddo
    39 
    40       print *, '------- end of matrixf.f90 ------------'
     45      enddo
     46     
     47      print *, ' nloop = ', nloop , ' ntot = ' , ntot
     48      print *, '------- end of matrixf.f90 -------- '
    4149      end
    4250
    4351
    44       subroutine check_table(k, a, b, c)
     52      subroutine check_table(k, a, b, c, ntot)
    4553        integer, intent (in) :: k
    4654        double precision, intent (in), dimension(:,:) :: a,b,c
     
    5058               ' size(a,2)= ', size(a,2)
    5159      endif
     60      ntot = ntot+1
    5261      end subroutine check_table
    5362     
Note: See TracChangeset for help on using the changeset viewer.