Re: [f2py] FW: f90 types as modul variables

<[email protected]>
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
Hi,
Thank you for your answer. :)
But this is exactly the way i do NOT want to do it! ;-)
Since i have the problem with the derived types, i have several files that only should be compiled, but not wrapped.
I don't need acces on the derived types, i just wanna have acces on a subroutine or module that USES object files with derived types.
Is this possible?

Malte

-----------------------------------------------------------------------------
Deutsches Zentrum für Luft- und Raumfahrt e.V.
in der Helmholtz-Gemeinschaft
Ausbildung - Duale Hochschule Baden-Württemberg

Malte Mauelshagen

Lilienthalplatz 7
38108 Braunschweig
Tel.: 0531/295-2483



-----Original Message-----
From: f2py-users-bounces-Y4l6ocDipWCuvFJfX82//[email protected] on behalf of Pearu Peterson
Sent: Fri 29.01.2010 14:15
To: For users of the f2py program
Subject: Re: [f2py] FW: f90 types as modul variables
 
Hi,

[email protected] wrote:
> Hi,
> I have another problem with f2py, but i hope you can help me.
> There are two .f90 files:
> 
> ---------------------------------------
> !testfile1.f90
> module testmodule
> 	contains
> 	subroutine foo
> 		write(*,*) "yeahh!"
> 	end subroutine foo
> end module testmodule
> --------------------------------------
> !testfile2.f90
> subroutine testroutine
> 	use testmodule
> 	call foo()
> end subroutine testroutine
> ----------------------------------------
> 
> I would like to wrap the second one with f2py, so that i can call mynewodule.testroutine() from python.
> But: The first file should not be wrapped to f2py! I just wanna compile it with '-c' and than link the object file testfile1.o to my new module.
> I think that should be possible but i just cant get it.
> 
> gfortran -c testfile1.f90
> /usr/local/bin/python2.6 /usr/local/bin/f2py -m mynewmodul -h mynewmodul.pyf testfile2.f90
> /usr/local/bin/python2.6 /usr/local/bin/f2py -c --fcompiler=gfortran mynewmodul.pyf testfile2.f90 testfile1.o
> 
> These are the commands I tried...

Try this:

f2py -m mynewmodul -h mynewmodul.pyf testfile2.f90
f2py -c --fcompiler=gfortran mynewmodul.pyf testfile2.f90 testfile1.f90

HTH,
Pearu


_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users
winmail.dat (application/ms-tnef, 3.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.