Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: Can someone...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 22 of 24 Topic 8143 of 8775
Post > Topic >>

Re: Can someone know the time for a oo implemented F2003 complier

by angelv <txibilis@[EMAIL PROTECTED] > Apr 30, 2008 at 03:57 PM

Hi,

On Apr 18, 8:48 am, "James Van Buskirk" <not_va...@[EMAIL PROTECTED]
> wrote:
> Spoken like a true C programmer.  Why write a C wrapper to invoke a
> Fortran procedure when Fortran can do so all by itself?  Here is an
> example with cray pointers, could be updated to use procedure
> pointers if they ever come true:

[Code skipped]

Thanks for the replies. I decided to give a try to Cray pointers as a
tem****ary replacement for pointers to procedures, and I was about to
try out the code you provided, but given that apparently it gave a
segmentation fault when trying to compile it, I decided to go for
something simpler :-)

I read this about Cray pointers and gfortran
http://gcc.gnu.org/onlinedocs/gfortran/Cray-pointers.html#Cray-pointers

but I've never used this feature, neither external procedures, so be
gentle :-)

I got a minimal code to try the Cray pointers, as per the
do***entation above:

[angelv@[EMAIL PROTECTED]
 temp]$ cat temp.f90
PROGRAM test
  IMPLICIT NONE

  EXTERNAL sp
  POINTER (subptr,subpte)
  EXTERNAL subpte

  subptr =3D LOC(sp)

  CALL subpte
END PROGRAM test

SUBROUTINE sp
  PRINT*, "HI"
END SUBROUTINE sp



But compilation is unsuccessfull:

[angelv@[EMAIL PROTECTED]
 temp]$ gfortran -fcray-pointer -o temp temp.f90
 In file temp.f90:6

  EXTERNAL subpte
                1
Error: CRAY POINTEE attribute conflicts with EXTERNAL attribute at (1)
 In file temp.f90:10

  CALL subpte
            1
Error: CRAY POINTEE attribute conflicts with SUBROUTINE attribute in
'subpte' at (1)
 In file temp.f90:5

  POINTER (subptr,subpte)
                       1
Error: Symbol 'subpte' at (1) has no IMPLICIT type


[angelv@[EMAIL PROTECTED]
 temp]$ gfortran --version
GNU Fortran (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)


Any help appreciated. Thanks,
=C1ngel de Vicente
 




 24 Posts in Topic:
Can someone know the time for a oo implemented F2003 complier re
lleshuang@[EMAIL PROTECTE  2008-04-16 08:21:34 
Re: Can someone know the time for a oo implemented F2003 complie
GaryScott <garylscott@  2008-04-16 13:47:00 
Re: Can someone know the time for a oo implemented F2003 complie
nospam@[EMAIL PROTECTED]   2008-04-16 14:04:05 
Re: Can someone know the time for a oo implemented F2003 complie
"Gerry Ford" &l  2008-04-16 17:02:55 
Re: Can someone know the time for a oo implemented F2003 complie
"FX" <couder  2008-04-16 22:14:47 
Re: Can someone know the time for a oo implemented F2003 complie
nospam@[EMAIL PROTECTED]   2008-04-16 15:52:57 
Re: Can someone know the time for a oo implemented F2003 complie
"Black Barry" &  2008-06-03 21:00:50 
Re: Can someone know the time for a oo implemented F2003 complie
"Ron Ford" <  2008-06-19 20:13:20 
Re: Compiler writer questions
"Ron Ford" <  2008-05-06 18:47:03 
Re: Can someone know the time for a oo implemented F2003 complie
Damian <damian@[EMAIL   2008-04-16 17:57:57 
Re: Can someone know the time for a oo implemented F2003 complie
angelv <txibilis@[EMAI  2008-04-17 06:24:11 
Re: Can someone know the time for a oo implemented F2003 complie
Damian <damian@[EMAIL   2008-04-17 06:44:28 
Re: Can someone know the time for a oo implemented F2003 complie
"James Van Buskirk&q  2008-04-17 08:32:51 
Re: Can someone know the time for a oo implemented F2003 complie
Damian <damian@[EMAIL   2008-04-17 17:32:36 
Re: Can someone know the time for a oo implemented F2003 complie
"James Van Buskirk&q  2008-04-18 01:48:32 
Re: Can someone know the time for a oo implemented F2003 complie
nospam@[EMAIL PROTECTED]   2008-04-18 01:15:35 
Re: Can someone know the time for a oo implemented F2003 complie
"James Van Buskirk&q  2008-04-18 03:09:00 
Re: Can someone know the time for a oo implemented F2003 complie
Damian <damian@[EMAIL   2008-04-18 06:02:02 
Re: Can someone know the time for a oo implemented F2003 complie
"James Van Buskirk&q  2008-04-19 03:02:56 
Re: Can someone know the time for a oo implemented F2003 complie
Simulate <li.simula@[E  2008-04-20 00:00:20 
Re: Can someone know the time for a oo implemented F2003 complie
Simulate <li.simula@[E  2008-04-26 06:59:02 
Re: Can someone know the time for a oo implemented F2003 complie
angelv <txibilis@[EMAI  2008-04-30 15:57:33 
Re: Can someone know the time for a oo implemented F2003 complie
"James Van Buskirk&q  2008-04-30 17:29:04 
Re: Can someone know the time for a oo implemented F2003 complie
angelv <txibilis@[EMAI  2008-05-02 02:43:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 3:09:12 CDT 2008.