<commit_before>module explib
 contains 
   subroutine exp_mv(n,m,tau,v,w,tol,anorm,matvec)
     integer, intent(in) :: n,m
     double precision, intent(in) :: tau, tol, anorm
     double precision, intent(in) :: v(n)
     double precision, intent(out) :: w(n)
     integer :: m1
     integer :: ideg = 6
     integer :: lwsp 
     integer :: liwsp 
     double precision, allocatable :: wsp(:)
     !TMP SECTION
     double precision, allocatable :: tmp(:,:),vtmp(:)
     integer :: k
     integer, allocatable :: iwsp(:)
     integer :: itrace = 0
     integer iflag
     external matvec
     lwsp = (n*(m+1)+n+(m+2)**2+4*(m+2)**2+ideg+1)
     lwsp = max(lwsp,200)
     liwsp = max((m+2),200)
     allocate(wsp(lwsp))
     allocate(iwsp(liwsp))
     m1 = min(m,n) !Fix sizes
     if ( m1 .eq. 0 ) then !The matrix is 1 x 1 :)
        call matvec(1d0,w)
        w(1) = v(1) * exp(w(1) * tau)
     else
         call dgexpv(n,m1,tau,v,w,tol,anorm,wsp,lwsp,iwsp,liwsp,matvec,itrace,iflag)
        if ( iflag .ne. 0 ) then
           print *,'exp_mv failed with iflag=',iflag
        end if
     end if
     deallocate(wsp)
     deallocate(iwsp)
   end subroutine exp_mv
   

   subroutine zexp_mv(n,m,tau,v,w,tol,anorm,matvec)
     implicit none
     integer, intent(in) :: n,m
     double precision, intent(in) :: tau, tol, anorm
     complex(8), intent(in) :: v(n)
     complex(8), intent(out) :: w(n)
     integer :: m1
     integer :: ideg = 6
     integer :: lwsp 
     integer :: liwsp 
     complex(8), allocatable :: wsp(:)
     !TMP SECTION
     integer :: k
     integer, allocatable :: iwsp(:)
     integer :: itrace = 0
     integer iflag
     !Test area
     integer i,j, iv, j1v, mh, ih
     external matvec
     lwsp = (n*(m+1)+n+(m+2)**2+4*(m+2)**2+ideg+1)
     lwsp = max(lwsp,200)
     liwsp = max((m+2),200)
     allocate(wsp(lwsp))
     allocate(iwsp(liwsp))
     m1 = min(m,n) !Fix sizes
     if ( m1 .eq. 1 ) then !The matrix is 1 x 1 :)
        call matvec((1d0,0d0),w)
        w(1) = v(1) * exp(w(1) * tau)
     else
     !   call zcopy( n, v,1, w,1 )
     !   mh = m1 + 2
     !   iv = 1
     !   j1v = 5
     !   ih = iv + n*(m+1) + n
     !   do i = 1,n
     !      wsp(iv + i-1) = w(i)
     !   enddo
     !   do i = 1,mh*mh
     !      wsp(ih+i-1) = ZERO
     !   enddo
        !call matvec( wsp(j1v-n), wsp(j1v) )
        !call zcopy(n,v,1,w,1)
        !call matvec(v,w)
        !print *,'old core:', v(1:2)
        call zgexpv(n,m1,tau,v,w,tol,anorm,wsp,lwsp,iwsp,liwsp,matvec,itrace,iflag)
        !print *,'new core:', w(1:2)
        !print *,'true sol:', exp(tau)*v(1:2)
        !read(*,*)
        if ( iflag .ne. 0 ) then
           print *,'exp_mv failed with iflag=',iflag
        end if
     end if
     deallocate(wsp)
     deallocate(iwsp)
   end subroutine zexp_mv

end module explib<commit_msg>Cleaned F90 wrapper from junk code<commit_after>module explib
 contains 
   subroutine exp_mv(n,m,tau,v,w,tol,anorm,matvec)
     integer, intent(in) :: n,m
     double precision, intent(in) :: tau, tol, anorm
     double precision, intent(in) :: v(n)
     double precision, intent(out) :: w(n)
     integer :: m1
     integer :: ideg = 6
     integer :: lwsp 
     integer :: liwsp 
     double precision, allocatable :: wsp(:)
     integer, allocatable :: iwsp(:)
     integer :: itrace = 0
     integer iflag
     external matvec
     lwsp = (n*(m+1)+n+(m+2)**2+4*(m+2)**2+ideg+1)
     lwsp = max(lwsp,200)
     liwsp = max((m+2),200)
     allocate(wsp(lwsp))
     allocate(iwsp(liwsp))
     m1 = min(m,n) !Fix sizes
     if ( m1 .eq. 0 ) then !The matrix is 1 x 1 :)
        call matvec(1d0,w)
        w(1) = v(1) * exp(w(1) * tau)
     else
         call dgexpv(n,m1,tau,v,w,tol,anorm,wsp,lwsp,iwsp,liwsp,matvec,itrace,iflag)
        if ( iflag .ne. 0 ) then
           print *,'exp_mv failed with iflag=',iflag
        end if
     end if
     deallocate(wsp)
     deallocate(iwsp)
   end subroutine exp_mv
   

   subroutine zexp_mv(n,m,tau,v,w,tol,anorm,matvec)
     implicit none
     integer, intent(in) :: n,m
     double precision, intent(in) :: tau, tol, anorm
     complex(8), intent(in) :: v(n)
     complex(8), intent(out) :: w(n)
     integer :: m1
     integer :: ideg = 6
     integer :: lwsp 
     integer :: liwsp 
     integer, allocatable :: iwsp(:)
     integer :: itrace = 0
     integer iflag
     complex(8), allocatable :: wsp(:)
     external matvec
     lwsp = (n*(m+1)+n+(m+2)**2+4*(m+2)**2+ideg+1)
     lwsp = max(lwsp,200)
     liwsp = max((m+2),200)
     allocate(wsp(lwsp))
     allocate(iwsp(liwsp))
     m1 = min(m,n) !Fix sizes
     if ( m1 .eq. 1 ) then !The matrix is 1 x 1 :)
        call matvec((1d0,0d0),w)
        w(1) = v(1) * exp(w(1) * tau)
     else
        call zgexpv(n,m1,tau,v,w,tol,anorm,wsp,lwsp,iwsp,liwsp,matvec,itrace,iflag)
        if ( iflag .ne. 0 ) then
           print *,'exp_mv failed with iflag=',iflag
        end if
     end if
     deallocate(wsp)
     deallocate(iwsp)
   end subroutine zexp_mv

end module explib
{'fraction_non_alphanumeric': 0.15553339980059822, 'fraction_numerical': 0.030109670987038883, 'mean_word_length': 2.2978303747534516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1251409', 'n_tokens_mistral': 2109, 'n_tokens_neox': 2033, 'n_words': 456}