public inbox for gentoo-science@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-science] [sage-on-gentoo] fortran scripts
@ 2010-08-12 15:37 Steven Trogdon
  2010-08-12 20:16 ` Christopher Schwan
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Trogdon @ 2010-08-12 15:37 UTC (permalink / raw
  To: gentoo-science@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

Hi:

I had apparently installed the Sage-provided scripts

sage-g77_shared
sage_fortran

when Sage was under /opt to get some fortran functionality from within the  
notebook. Of course that functionality is missing with Sage under /usr. Both  
scripts are needed. See, from the notebook,

	Help -> Fast Static Versions -> Numerical Sage -> f2py

for a cut-N-paste example. This example is included (command line version) in  
inline_fortran.py, the InlineFortran class under site-packages/sage/misc. The  
sage-g77_shared script calls sage_fortran and sage-g77_shared is hardcoded in  
the InlineFortran class. I suppose it is somewhat awkward to have these two  
scripts, but thought I would point out that some functionality is missing  
without them. Perhaps there is a better way, without messing around with the  
InlineFortran class, to achieve the same result.

Steve

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-science] [sage-on-gentoo] fortran scripts
  2010-08-12 15:37 [gentoo-science] [sage-on-gentoo] fortran scripts Steven Trogdon
@ 2010-08-12 20:16 ` Christopher Schwan
  2010-08-12 22:54   ` Steven Trogdon
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Schwan @ 2010-08-12 20:16 UTC (permalink / raw
  To: gentoo-science

Hi,

On Thursday 12 August 2010 17:37:34 Steven Trogdon wrote:
> Hi:
> 
> I had apparently installed the Sage-provided scripts
> 
> sage-g77_shared
> sage_fortran
> 
> when Sage was under /opt to get some fortran functionality from within the
> notebook. Of course that functionality is missing with Sage under /usr.
> Both scripts are needed. See, from the notebook,
> 
> 	Help -> Fast Static Versions -> Numerical Sage -> f2py
> 
> for a cut-N-paste example. This example is included (command line version)
> in inline_fortran.py, the InlineFortran class under
> site-packages/sage/misc. The sage-g77_shared script calls sage_fortran and
> sage-g77_shared is hardcoded in the InlineFortran class. I suppose it is
> somewhat awkward to have these two scripts, but thought I would point out
> that some functionality is missing without them. Perhaps there is a better
> way, without messing around with the InlineFortran class, to achieve the
> same result.

Thats absolutely right - thank you for pointing that out. I have added these 
files for now, but I think I will write a fix so we wont need these.

> 
> Steve

Christopher



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-science] [sage-on-gentoo] fortran scripts
  2010-08-12 20:16 ` Christopher Schwan
@ 2010-08-12 22:54   ` Steven Trogdon
  2010-08-13  8:34     ` Christopher Schwan
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Trogdon @ 2010-08-12 22:54 UTC (permalink / raw
  To: gentoo-science

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

Hi Christopher,

On 08/12/2010 03:16:44 PM, Christopher Schwan wrote:
> Hi,
> 
> On Thursday 12 August 2010 17:37:34 Steven Trogdon wrote:
>> Hi:
>> 
>> I had apparently installed the Sage-provided scripts
>> 
>> sage-g77_shared
>> sage_fortran
>> 
	<SNIP>
> 
> Thats absolutely right - thank you for pointing that out. I have added these
> files for now, but I think I will write a fix so we wont need these.
> 
>> 
>> Steve
> 
> Christopher
> 

Relative to the included files, it appears that with the Sage-provided  
sage-g77_shared script, sage_fortran can't just point to the fortran compiler  
since sage_fortran needs to have arguments, i.e. the "$@" is needed in using  
sage_fortran.

Steve

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-science] [sage-on-gentoo] fortran scripts
  2010-08-12 22:54   ` Steven Trogdon
@ 2010-08-13  8:34     ` Christopher Schwan
  2010-08-13 12:20       ` Steven Trogdon
  0 siblings, 1 reply; 6+ messages in thread
From: Christopher Schwan @ 2010-08-13  8:34 UTC (permalink / raw
  To: gentoo-science

Hi,

On Friday 13 August 2010 00:54:53 Steven Trogdon wrote:
> Hi Christopher,
> 
> On 08/12/2010 03:16:44 PM, Christopher Schwan wrote:
> > Hi,
> > 
> > On Thursday 12 August 2010 17:37:34 Steven Trogdon wrote:
> >> Hi:
> >> 
> >> I had apparently installed the Sage-provided scripts
> >> 
> >> sage-g77_shared
> >> sage_fortran
> 
> 	<SNIP>
> 
> > Thats absolutely right - thank you for pointing that out. I have added
> > these files for now, but I think I will write a fix so we wont need
> > these.
> > 
> >> Steve
> > 
> > Christopher
> 
> Relative to the included files, it appears that with the Sage-provided
> sage-g77_shared script, sage_fortran can't just point to the fortran
> compiler since sage_fortran needs to have arguments, i.e. the "$@" is
> needed in using sage_fortran.

"$@" just adds the command line arguments given to sage_fortran to fortran, 
which is what a symlink implicitly does.

> 
> Steve

Christopher



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-science] [sage-on-gentoo] fortran scripts
  2010-08-13  8:34     ` Christopher Schwan
@ 2010-08-13 12:20       ` Steven Trogdon
  2010-08-13 14:32         ` Christopher Schwan
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Trogdon @ 2010-08-13 12:20 UTC (permalink / raw
  To: gentoo-science

[-- Attachment #1: Type: text/plain, Size: 1420 bytes --]

On 08/13/2010 03:34:21 AM, Christopher Schwan wrote:
> Hi,
> 
> On Friday 13 August 2010 00:54:53 Steven Trogdon wrote:
>> Hi Christopher,
>> 
>> On 08/12/2010 03:16:44 PM, Christopher Schwan wrote:
>> > Hi,
>> >
>> > On Thursday 12 August 2010 17:37:34 Steven Trogdon wrote:
>> >> Hi:
>> >>
>> >> I had apparently installed the Sage-provided scripts
>> >>
>> >> sage-g77_shared
>> >> sage_fortran
>> 
>> 	<SNIP>
>> 
>> > Thats absolutely right - thank you for pointing that out. I have added
>> > these files for now, but I think I will write a fix so we wont need
>> > these.
>> >
>> >> Steve
>> >
>> > Christopher
>> 
>> Relative to the included files, it appears that with the Sage-provided
>> sage-g77_shared script, sage_fortran can't just point to the fortran
>> compiler since sage_fortran needs to have arguments, i.e. the "$@" is
>> needed in using sage_fortran.
> 
> "$@" just adds the command line arguments given to sage_fortran to fortran,
> which is what a symlink implicitly does.
> 

Perhaps so, but things don't work as they are presently. Maybe the python  
script messes up things. If I replace, in the sage-g77_shared script,  
sage_fortran with the path to the fortran compiler then things work. The  
symlink

	/usr/bin/sage_fortran -> x86_64-pc-linux-gnu-gfortran

on my machine will then not be used.
	
>> 
>> Steve
> 
> Christopher
> 

Steve

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-science] [sage-on-gentoo] fortran scripts
  2010-08-13 12:20       ` Steven Trogdon
@ 2010-08-13 14:32         ` Christopher Schwan
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Schwan @ 2010-08-13 14:32 UTC (permalink / raw
  To: gentoo-science

On Friday 13 August 2010 14:20:45 Steven Trogdon wrote:
> On 08/13/2010 03:34:21 AM, Christopher Schwan wrote:
> > Hi,
> > 
> > On Friday 13 August 2010 00:54:53 Steven Trogdon wrote:
> >> Hi Christopher,
> >> 
> >> On 08/12/2010 03:16:44 PM, Christopher Schwan wrote:
> >> > Hi,
> >> > 
> >> > On Thursday 12 August 2010 17:37:34 Steven Trogdon wrote:
> >> >> Hi:
> >> >> 
> >> >> I had apparently installed the Sage-provided scripts
> >> >> 
> >> >> sage-g77_shared
> >> >> sage_fortran
> >> 	
> >> 	<SNIP>
> >> 	
> >> > Thats absolutely right - thank you for pointing that out. I have added
> >> > these files for now, but I think I will write a fix so we wont need
> >> > these.
> >> > 
> >> >> Steve
> >> > 
> >> > Christopher
> >> 
> >> Relative to the included files, it appears that with the Sage-provided
> >> sage-g77_shared script, sage_fortran can't just point to the fortran
> >> compiler since sage_fortran needs to have arguments, i.e. the "$@" is
> >> needed in using sage_fortran.
> > 
> > "$@" just adds the command line arguments given to sage_fortran to
> > fortran, which is what a symlink implicitly does.
> 
> Perhaps so, but things don't work as they are presently. Maybe the python
> script messes up things. If I replace, in the sage-g77_shared script,
> sage_fortran with the path to the fortran compiler then things work. The
> symlink
> 
> 	/usr/bin/sage_fortran -> x86_64-pc-linux-gnu-gfortran
> 
> on my machine will then not be used.

Ok I did that replacement - (should be) fixed in latest commit!

> 
> >> Steve
> > 
> > Christopher
> 
> Steve

Christopher



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-13 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-12 15:37 [gentoo-science] [sage-on-gentoo] fortran scripts Steven Trogdon
2010-08-12 20:16 ` Christopher Schwan
2010-08-12 22:54   ` Steven Trogdon
2010-08-13  8:34     ` Christopher Schwan
2010-08-13 12:20       ` Steven Trogdon
2010-08-13 14:32         ` Christopher Schwan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox