On Sat, Nov 28, 2009 at 3:19 PM, Dr. David Kirkby
<david.kir...@onetel.net> wrote:
> William Stein wrote:
>
>>> I also noticed that lapack ignores whatever the environment variable
>>> SAGE_FORTRAN is set to, and uses 'sage_fortran' as a Fortran compiler. That
>>> appears to be gfortran.
>>
>> No it doesn't.  sage_fortran is a script (or link?) created by the
>> spkg-install for the fortran spkg.  If you had set SAGE_FORTRAN during
>> the build, then it would be what you set SAGE_FORTRAN to.  If you
>> didn't, then it would be g95.
>>
>>> I've created a ticket which reports that lapack is using 'sage_fortran' and
>>> ignoring SAGE_FORTRAN
>>>
>>> http://trac.sagemath.org/sage_trac/ticket/7550
>>
>> I think you should close that.
>>
>> William
>
> William, I do not think you are correct here.

I know exactly what I'm talking about, but you don't understand what
I'm saying.

> The Sun Fortran compiler is installed as:
>
> drkir...@swan:[~/sage-4.3.alpha0-sun-compiler] $ 
> /opt/xxxsunstudio12.1/bin/f95 -V
> f95: Sun Fortran 95 8.4 SunOS_sparc 2009/06/03
> Usage: f95 [ options ] files.  Use 'f95 -flags' for details
>
>
> I've clearly set SAGE_FORTRAN to be the Sun Fortran compiler.
>
> drkir...@swan:[~/sage-4.3.alpha0-sun-compiler] $ export
> SAGE_FORTRAN=/opt/xxxsunstudio12.1/bin/f95
>
> running 'env' in the Sage shell shows
>
> MAKE=make
> SAGE_FORTRAN=/opt/xxxsunstudio12.1/bin/f95
> LOGNAME=drkirkby
>
> Typing make shows:
>
>
> lapack-20071123.p0/spkg-install
> Finished extraction
> ****************************************************
> Host system
> uname -a:
> SunOS swan 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Blade-1000
> ****************************************************
> ****************************************************
> CC Version
> /opt/xxxsunstudio12.1/bin/cc -v
> usage: cc [ options] files.  Use 'cc -flags' for details
> ****************************************************
> make[2]: Entering directory
> `/export/home/drkirkby/sage-4.3.alpha0-sun-compiler/spkg/build/lapack-20071123.p0/src'
> ( cd INSTALL; make; ./testlsame; ./testslamch; \
>   ./testdlamch; ./testsecond; ./testdsecnd; ./testversion )
> make[3]: Entering directory
> `/export/home/drkirkby/sage-4.3.alpha0-sun-compiler/spkg/build/lapack-20071123.p0/src/INSTALL'
> sage_fortran -fPIC  -c lsame.f -o lsame.o
> sage_fortran -fPIC  -c lsametst.f -o lsametst.o
> sage_fortran  -o testlsame lsame.o lsametst.o
> sage_fortran -fPIC  -c slamch.f -o slamch.o
>
> (note, -fPIC is not an option for the Sun Fortran compiler, so it should
> generate a warning, which it does not).
>
> When I run 'prstat' I can see gfortran is running. If I type
>
> $ pkill -9 gfortran
>
> so the build of lapack fails immediately at that point as the *GNU* Fortran
> compiler is killed. I've just repeated this, to convince myself, and I'm still
> of the belief that lapack is ignoring SAGE_FORTRAN - at least on Solaris.

SAGE_FORTRAN is an environment variable that is ***ONLY*** supposed to
impact one spkg, and one spkg only -- the fortran spkg.  It is not
supposed to do anything at all ever to the lapack or any other spkg.
If it does, that is a mistake.    So in one sense lapack is ignoring
SAGE_FORTRAN, as it should.  However, it is making indirect use of the
fact that SAGE_FORTRAN was set when the fortran spkg was installed.

The SAGE_FORTRAN environment variable does not mean "build any spkg
that uses fortran using this fortran".  It means "when installing the
fortran spkg, setup the the sage_fortran script run the fortran
specified by the SAGE_FORTRAN variable".

 -- William

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to