forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf2py.1
209 lines (192 loc) · 5.79 KB
/
f2py.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
.TH "F2PY" 1
.SH NAME
f2py \- Fortran to Python interface generator
.SH SYNOPSIS
(1) To construct extension module sources:
.B f2py
[<options>] <fortran files> [[[only:]||[skip:]] <fortran functions> ] [: <fortran files> ...]
(2) To compile fortran files and build extension modules:
.B f2py
\-c [<options>, <config_fc options>, <extra options>] <fortran files>
(3) To generate signature files:
.B f2py
\-h <filename.pyf> ...< same options as in (1) >
.SH DESCRIPTION
This program generates a Python C/API file (<modulename>module.c)
that contains wrappers for given Fortran or C functions so that they
can be called from Python.
With the \-c option the corresponding
extension modules are built.
.SH OPTIONS
.TP
.B \-h <filename>
Write signatures of the fortran routines to file <filename> and
exit. You can then edit <filename> and use it instead of <fortran
files>. If <filename>==stdout then the signatures are printed to
stdout.
.TP
.B <fortran functions>
Names of fortran routines for which Python C/API functions will be
generated. Default is all that are found in <fortran files>.
.TP
.B skip:
Ignore fortran functions that follow until `:'.
.TP
.B only:
Use only fortran functions that follow until `:'.
.TP
.B :
Get back to <fortran files> mode.
.TP
.B \-m <modulename>
Name of the module; f2py generates a Python/C API file
<modulename>module.c or extension module <modulename>. Default is
\'untitled\'.
.TP
.B \-\-[no\-]lower
Do [not] lower the cases in <fortran files>. By default, \-\-lower is
assumed with \-h key, and \-\-no\-lower without \-h key.
.TP
.B \-\-build\-dir <dirname>
All f2py generated files are created in <dirname>. Default is tempfile.mkdtemp().
.TP
.B \-\-overwrite\-signature
Overwrite existing signature file.
.TP
.B \-\-[no\-]latex\-doc
Create (or not) <modulename>module.tex. Default is \-\-no\-latex\-doc.
.TP
.B \-\-short\-latex
Create 'incomplete' LaTeX document (without commands \\documentclass,
\\tableofcontents, and \\begin{document}, \\end{document}).
.TP
.B \-\-[no\-]rest\-doc
Create (or not) <modulename>module.rst. Default is \-\-no\-rest\-doc.
.TP
.B \-\-debug\-capi
Create C/API code that reports the state of the wrappers during
runtime. Useful for debugging.
.TP
.B \-include\'<includefile>\'
Add CPP #include statement to the C/API code. <includefile> should be
in the format of either `"filename.ext"' or `<filename.ext>'. As a
result <includefile> will be included just before wrapper functions
part in the C/API code. The option is depreciated, use `usercode`
statement in signature files instead.
.TP
.B \-\-[no\-]wrap\-functions
Create Fortran subroutine wrappers to Fortran 77
functions. \-\-wrap\-functions is default because it ensures maximum
portability/compiler independence.
.TP
.B \-\-help\-link [..]
List system resources found by system_info.py. [..] may contain
a list of resources names. See also \-\-link\-<resource> switch below.
.TP
.B \-\-quiet
Run quietly.
.TP
.B \-\-verbose
Run with extra verbosity.
.TP
.B \-v
Print f2py version ID and exit.
.TP
.B \-\-include_paths path1:path2:...
Search include files (that f2py will scan) from the given directories.
.SH "CONFIG_FC OPTIONS"
The following options are effective only when \-c switch is used.
.TP
.B \-\-help-compiler
List available Fortran compilers [DEPRECIATED].
.TP
.B \-\-fcompiler=<name>
Specify Fortran compiler type by vendor.
.TP
.B \-\-compiler=<name>
Specify C compiler type (as defined by distutils)
.TP
.B \-\-fcompiler-exec=<path>
Specify the path to F77 compiler [DEPRECIATED].
.TP
.B \-\-f90compiler\-exec=<path>
Specify the path to F90 compiler [DEPRECIATED].
.TP
.B \-\-help\-fcompiler
List available Fortran compilers and exit.
.TP
.B \-\-f77exec=<path>
Specify the path to F77 compiler.
.TP
.B \-\-f90exec=<path>
Specify the path to F90 compiler.
.TP
.B \-\-f77flags="..."
Specify F77 compiler flags.
.TP
.B \-\-f90flags="..."
Specify F90 compiler flags.
.TP
.B \-\-opt="..."
Specify optimization flags.
.TP
.B \-\-arch="..."
Specify architecture specific optimization flags.
.TP
.B \-\-noopt
Compile without optimization.
.TP
.B \-\-noarch
Compile without arch-dependent optimization.
.TP
.B \-\-debug
Compile with debugging information.
.SH "EXTRA OPTIONS"
The following options are effective only when \-c switch is used.
.TP
.B \-\-link-<resource>
Link extension module with <resource> as defined by
numpy_distutils/system_info.py. E.g. to link with optimized LAPACK
libraries (vecLib on MacOSX, ATLAS elsewhere), use
\-\-link\-lapack_opt. See also \-\-help\-link switch.
.TP
.B -L/path/to/lib/ -l<libname>
.TP
.B -D<define> -U<name> -I/path/to/include/
.TP
.B <filename>.o <filename>.so <filename>.a
.TP
.B -DPREPEND_FORTRAN -DNO_APPEND_FORTRAN -DUPPERCASE_FORTRAN -DUNDERSCORE_G77
Macros that might be required with non-gcc Fortran compilers.
.TP
.B -DF2PY_REPORT_ATEXIT
To print out a performance report of F2PY interface when python
exits. Available for Linux.
.TP
.B -DF2PY_REPORT_ON_ARRAY_COPY=<int>
To send a message to stderr whenever F2PY interface makes a copy of an
array. Integer <int> sets the threshold for array sizes when a message
should be shown.
.SH REQUIREMENTS
Python 1.5.2 or higher (2.x is supported).
Numerical Python 13 or higher (20.x,21.x,22.x,23.x are supported).
Optional Numarray 0.9 or higher partially supported.
numpy_distutils from Scipy (can be downloaded from F2PY homepage)
.SH "SEE ALSO"
python(1)
.SH BUGS
For instructions on reporting bugs, see
http://cens.ioc.ee/projects/f2py2e/FAQ.html
.SH AUTHOR
Pearu Peterson <[email protected]>
.SH "INTERNET RESOURCES"
Main website: http://cens.ioc.ee/projects/f2py2e/
User's Guide: http://cens.ioc.ee/projects/f2py2e/usersguide/
Mailing list: http://cens.ioc.ee/mailman/listinfo/f2py-users/
Scipy website: http://www.numpy.org
.SH COPYRIGHT
Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Pearu Peterson
.SH LICENSE
NumPy License
.SH VERSION
2.45.241