Re: using a lapack routine
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: using a lapack routine         

Group: comp.lang.fortran · Group Profile
Author: e p chandler
Date: Sep 19, 2008 06:16

On Sep 19, 3:09 am, Ron Ford wrote:
> On Thu, 18 Sep 2008 22:03:46 -0700 (PDT), e p chandler posted:
>
>> A second issue is do you want to compile individual files, adding more
>> files until you have exhausted dependencies, OR build the whole
>> library? I've had zero luck building large ANYTHING on Windows from
>> source, so I add pieces until it works.
>
> I've gone through the files and collected the ones I think I need.  It was
> nothing short of tedious:
>
> C:\Program Files\University Of Tennessee\LAPACK 3.1.1\src\depend>dir
>  Volume in drive C has no label.
>  Volume Serial Number is 486B-CFF3
>
>  Directory of C:\Program Files\University Of Tennessee\LAPACK
> 3.1.1\src\depend
>
> 09/19/2008  12:06 AM              .
> 09/19/2008  12:06 AM              ..
> 07/19/2007  11:02 AM             1,496 saxpy.f
> 07/19/2007  11:02 AM            18,082 slarfb.f
> 07/19/2007  11:02 AM             4,809 sgehd2.f
> 07/19/2007  11:02 AM             9,927 sgemm.f
> 07/19/2007  11:02 AM             7,937 slahr2.f
> 07/19/2007  11:02 AM            11,519 strmm.f
> 07/19/2007  11:02 AM             1,220 xerbla.f
> 07/19/2007  11:02 AM             1,453 scopy.f
> 07/19/2007  11:02 AM             3,647 slarfg.f
> 07/19/2007  11:02 AM             2,409 lsame.f
> 07/19/2007  11:02 AM             7,531 sgemv.f
> 07/19/2007  11:02 AM             2,449 slacpy.f
> 07/19/2007  11:02 AM             1,271 sscal.f
> 07/19/2007  11:02 AM             8,861 strmv.f
> 06/01/2007  02:49 PM            25,325 slamch.f
> 07/19/2007  11:02 AM             1,258 slapy2.f
> 07/19/2007  11:02 AM             1,606 snrm2.f
> 09/19/2008  12:56 AM             1,435 perl3.lnk
>               18 File(s)        112,235 bytes
>                2 Dir(s)   1,618,624,512 bytes free
>
> I took the opportunity to read some of these, and they affect the way you
> pronounce the file.  So, the slarfs no longer rhyme with barf but reflect
> what the letters stand for.
>
> I'm sure I left a couple out, which is something my compiler will not
> likely miss.  Given that I've herded the dependencies into this directory,
> how do I best build this module?

Sorry, I don't know how to create a module from source files like
this, BUT I now know how to combine object files and assemble them
into a library.

For example:

C:\Users\epc\temp>type main.f90
k = 1
print *, k
call sub1(k)
print *, k
end

C:\Users\epc\temp>type *.f

sub1.f

c234567
subroutine sub1(i)
call sub2(i)
return
end

sub2.f

c234567
subroutine sub2(i)
i = i + 1
return
end

C:\Users\epc\temp>g95 -c *.f [compile only, create .o = object
files]

C:\Users\epc\temp>ar rvs mylib.a *.o [create a library, r=replace
existing, v=verbose list, s=include symbols index]
ar: creating mylib.a
a - sub1.o
a - sub2.o

C:\Users\epc\temp>g95 main.f90 mylib.a -o myprog.exe [compile and
then link including the new library.]

C:\Users\epc\temp>myprog
1
2

see http://www.delorie.com/djgpp/v2faq/faq8_22.html

At least now I CAN build something larger than a breadbox!

- e
no comments
diggit! del.icio.us! reddit!