|
|
Up |
|
|
  |
| Re: using a lapack routine |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.fortran · Group Profile
Author: e p chandlere 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
|
|
|
|
  |
|
|
|