[f2py] Intel Fortran 9.0, .NET 2003, Win XP Problems

Mike Mueller m.mueller at ibgw-leipzig.de
Tue Jan 24 16:38:37 EET 2006


While setting up f2py on my new machine I encountered some problems:

1.) Checking for the Intel compiler does not work:

c:\Python24\Lib\site-packages\scipy_distutils>intelfcompiler.py
0
1
Could not locate executable ifc
Could not locate executable efort
Could not locate executable efc
Traceback (most recent call last):
  File
"c:\Python24\Lib\site-packages\scipy_distutils\intelfcompiler.py", line
9
1, in ?
    class IntelVisualFCompiler(FCompiler):
  File
"c:\Python24\Lib\site-packages\scipy_distutils\intelfcompiler.py", line
1
01, in IntelVisualFCompiler
    ar_exe = MSVCCompiler().lib
AttributeError: MSVCCompiler instance has no attribute 'lib'

Seems like initialize() needs to be called on an instance of
MSVCCompiler:


msvcc = MSVCCompiler()
msvcc.initialize()
ar_exe = msvcc.lib

After replacing ar_exe = MSVCCompiler().lib in intelfcompiler.py with
these 3 lines it works.

2.) Compiling the hello.f from the f2py Website works only with --noopt
otherwise linking fails because it does not recognize the compiled
object file as such.  See messages below.

3.) There seem to be several compiler options generated by f2py that are
not in the list of options ifort 9.0 offers. Enclosed a list of "ifort
-h" which shows all the options. Maybe the problem is related to this,
because unknown options will be ignored by the compiler.

Mike


f2py version:

c:\Daten\temp>f2py.py -v
2.45.241_1926

--noopt and it works:

c:\Daten\temp>f2py.py --fcompiler=intelv -c hello.f -m hello --noopt
numpy_info:
  FOUND:
    define_macros = [('NUMERIC_VERSION', '"\\"24.2\\""')]
    include_dirs = ['C:\\Python24\\include']

running build
running config_fc
running build_src
building extension "hello" sources
f2py:> c:\temp\tmp9lntxy\src\hellomodule.c
creating c:\temp\tmp9lntxy
creating c:\temp\tmp9lntxy\src
Reading fortran codes...
        Reading file 'hello.f'
Post-processing...
        Block: hello
                        Block: foo
Post-processing (stage 2)...
Building modules...
        Building module "hello"...
                Constructing wrapper function "foo"...
                  foo(a)
        Wrote C/API module "hello" to file
"c:\temp\tmp9lntxy\src/hellomodule.c"

  adding 'c:\temp\tmp9lntxy\src\fortranobject.c' to sources.
  adding 'c:\temp\tmp9lntxy\src' to include_dirs.
copying C:\Python24\lib\site-packages\f2py2e\src\fortranobject.c ->
c:\temp\tmp9
lntxy\src
copying C:\Python24\lib\site-packages\f2py2e\src\fortranobject.h ->
c:\temp\tmp9
lntxy\src
running build_ext
No module named msvccompiler in scipy_distutils, trying from distutils..
customize MSVCCompiler
customize MSVCCompiler using build_ext
0
1
Could not locate executable ifc
Could not locate executable efort
Could not locate executable efc
customize IntelVisualFCompiler
customize IntelVisualFCompiler using build_ext
building 'hello' extension
compiling C sources
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo
/Ox /MD
 /W3 /GX /DNDEBUG -IC:\Python24\include -Ic:\temp\tmp9lntxy\src
-IC:\Python24\in
clude -IC:\Python24\PC /Tcc:\temp\tmp9lntxy\src\hellomodule.c
/Foc:\temp\tmp9lnt
xy\src\hellomodule.obj
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo
/Ox /MD
 /W3 /GX /DNDEBUG -IC:\Python24\include -Ic:\temp\tmp9lntxy\src
-IC:\Python24\in
clude -IC:\Python24\PC /Tcc:\temp\tmp9lntxy\src\fortranobject.c
/Foc:\temp\tmp9l
ntxy\src\fortranobject.obj
compiling Fortran sources
ifl(f77) options: '-FI -w90 -w95 /nologo /MD /nbs /Qlowercase /us'
ifl(f90) options: '-FR /nologo /MD /nbs /Qlowercase /us'
ifl(fix) options: '-FI -4L72 -w /nologo /MD /nbs /Qlowercase /us'
creating c:\temp\tmp9lntxy\Release
compile options: '-IC:\Python24\include -Ic:\temp\tmp9lntxy\src
-IC:\Python24\in
clude -IC:\Python24\PC -c'
ifl:f77: hello.f
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL
/nologo /IN
CREMENTAL:NO /LIBPATH:C:\Python24\libs /LIBPATH:C:\Python24\PCBuild
/LIBPATH:C:\
Python24\libs /LIBPATH:C:\Python24\PCBuild /EXPORT:inithello
c:\temp\tmp9lntxy\s
rc\hellomodule.obj c:\temp\tmp9lntxy\src\fortranobject.obj
c:\temp\tmp9lntxy\Rel
ease\hello.o /OUT:.\hello.pyd /IMPLIB:c:\temp\tmp9lntxy\src\hello.lib
Removing build directory c:\temp\tmp9lntxy



With optimization it fails:

c:\Daten\temp>f2py.py --fcompiler=intelv -c hello.f -m hello
numpy_info:
  FOUND:
    define_macros = [('NUMERIC_VERSION', '"\\"24.2\\""')]
    include_dirs = ['C:\\Python24\\include']

running build
running config_fc
running build_src
building extension "hello" sources
f2py:> c:\temp\tmpyxdno6\src\hellomodule.c
creating c:\temp\tmpyxdno6
creating c:\temp\tmpyxdno6\src
Reading fortran codes...
        Reading file 'hello.f'
Post-processing...
        Block: hello
                        Block: foo
Post-processing (stage 2)...
Building modules...
        Building module "hello"...
                Constructing wrapper function "foo"...
                  foo(a)
        Wrote C/API module "hello" to file
"c:\temp\tmpyxdno6\src/hellomodule.c"

  adding 'c:\temp\tmpyxdno6\src\fortranobject.c' to sources.
  adding 'c:\temp\tmpyxdno6\src' to include_dirs.
copying C:\Python24\lib\site-packages\f2py2e\src\fortranobject.c ->
c:\temp\tmpy
xdno6\src
copying C:\Python24\lib\site-packages\f2py2e\src\fortranobject.h ->
c:\temp\tmpy
xdno6\src
running build_ext
No module named msvccompiler in scipy_distutils, trying from distutils..
customize MSVCCompiler
customize MSVCCompiler using build_ext
0
1
Could not locate executable ifc
Could not locate executable efort
Could not locate executable efc
customize IntelVisualFCompiler
customize IntelVisualFCompiler using build_ext
building 'hello' extension
compiling C sources
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo
/Ox /MD
 /W3 /GX /DNDEBUG -IC:\Python24\include -Ic:\temp\tmpyxdno6\src
-IC:\Python24\in
clude -IC:\Python24\PC /Tcc:\temp\tmpyxdno6\src\hellomodule.c
/Foc:\temp\tmpyxdn
o6\src\hellomodule.obj
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo
/Ox /MD
 /W3 /GX /DNDEBUG -IC:\Python24\include -Ic:\temp\tmpyxdno6\src
-IC:\Python24\in
clude -IC:\Python24\PC /Tcc:\temp\tmpyxdno6\src\fortranobject.c
/Foc:\temp\tmpyx
dno6\src\fortranobject.obj
compiling Fortran sources
ifl(f77) options: '-FI -w90 -w95 /nologo /MD /nbs /Qlowercase /us /O3
/Qip /Qipo
 /Qipo_obj /G7 /QaxW /QaxM'
ifl(f90) options: '-FR /nologo /MD /nbs /Qlowercase /us /O3 /Qip /Qipo
/Qipo_obj
 /G7 /QaxW /QaxM'
ifl(fix) options: '-FI -4L72 -w /nologo /MD /nbs /Qlowercase /us /O3
/Qip /Qipo
/Qipo_obj /G7 /QaxW /QaxM'
creating c:\temp\tmpyxdno6\Release
compile options: '-IC:\Python24\include -Ic:\temp\tmpyxdno6\src
-IC:\Python24\in
clude -IC:\Python24\PC -c'
ifl:f77: hello.f
C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\bin\link.exe /DLL
/nologo /IN
CREMENTAL:NO /LIBPATH:C:\Python24\libs /LIBPATH:C:\Python24\PCBuild
/LIBPATH:C:\
Python24\libs /LIBPATH:C:\Python24\PCBuild /EXPORT:inithello
c:\temp\tmpyxdno6\s
rc\hellomodule.obj c:\temp\tmpyxdno6\src\fortranobject.obj
c:\temp\tmpyxdno6\Rel
ease\hello.o /OUT:.\hello.pyd /IMPLIB:c:\temp\tmpyxdno6\src\hello.lib
hello.o : warning LNK4229: invalid directive '/Intel(R) compiler
non-linkable IL
 object file' encountered; ignored
hello.o : warning LNK4229: invalid directive '/Intel(R) compiler
non-linkable IL
 object file' encountered; ignored
   Creating library c:\temp\tmpyxdno6\src\hello.lib and object
c:\temp\tmpyxdno6
\src\hello.exp
hellomodule.obj : error LNK2001: unresolved external symbol _foo_
.\hello.pyd : fatal error LNK1120: 1 unresolved externals
error: Command ""C:\Programme\Microsoft Visual Studio .NET
2003\Vc7\bin\link.exe
" /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python24\libs
/LIBPATH:C:\Python24\PC
Build /LIBPATH:C:\Python24\libs /LIBPATH:C:\Python24\PCBuild
/EXPORT:inithello c
:\temp\tmpyxdno6\src\hellomodule.obj
c:\temp\tmpyxdno6\src\fortranobject.obj c:\
temp\tmpyxdno6\Release\hello.o /OUT:.\hello.pyd
/IMPLIB:c:\temp\tmpyxdno6\src\he
llo.lib" failed with exit status 1120


ifort 9.0 options

Intel(R) Fortran Compiler for 32-bit applications, Version 9.0    Build
20050430
Z Package ID: W_FC_P_9.0.018
Copyright (C) 1985-2005 Intel Corporation.  All rights reserved.

                     Intel(R) Fortran Compiler Help
                     ==============================

usage: ifort [options] file1 [file2 ...] [/link linker_options]

  where options represents zero or more compiler options

        fileN is a Fortran source (.f .for .ftn .f90 .fpp .i .i90),
            assembly (.asm), object (.obj), static library (.lib), or
            other linkable file

        linker_options represents zero or more linker options

Notes
-----
1. Many FL32 options are supported; a warning is printed for unsupported
   options.

2. Intel Fortran compiler options may be placed in your ifort.cfg file.

                       Compiler Option List
                       --------------------
Performance
-----------
[press RETURN to continue]
/O1    optimize for maximum speed, but disable some optimizations which
       increase code size for a small speed benefit: /Ob1gysi-
/O2    optimize for maximum speed (same as /Ox)
/O3    enable /O2 plus more aggressive optimizations that may not
improve
       performance for all programs
/Ox    enable maximum optimizations (DEFAULT):       /Ob1gyti
/Od    disable optimizations; useful for selective optimizations (i.e.
/Od /Og)
/optimize:<val>
       0 - disable optimization (same as /Od)
       1 - optimize for maximum speed, but disable some optimizations
           which increase code size for a small speed benefit (same as
/O1)
       2 - same as 1, or /O1
       3 - optimize for maximum speed (default) (same as /O2)
       4 - same as 3, or /O2
       5 - enable /optimize:3 plus more aggressive optimizations that
           may not improve performance for all programs (same as /O3)

/fast  enable /QxP /O3 /Qipo /Qprec-div-
/Ob<n> control inline expansion:
       n=0  disable inlining (same as /inline:none)
       n=1  no inlining (unless /Qip specified)
       n=2  inline any function, at the compiler's discretion
            (same as /Qip or /inline:all)
/Og    enable global optimizations
[press RETURN to continue]
/Op[-] enable/disable better floating-point precision
/[no]fltconsistency
       specify that improved floating-point consistency should be used
/Os    enable speed optimizations, but disable some optimizations which
       increase code size for small speed benefit (overrides /Ot)
/Ot    enable speed optimizations (overrides /Os)
/Oy[-] enable/disable using EBP as general purpose register (no frame
pointer)

/Qax<codes> generate code specialized for processors specified by
<codes>
            while also generating generic IA-32 code.  <codes> includes
            one or more of the following characters:
    K  Intel Pentium III and compatible Intel processors
    W  Intel Pentium 4 and compatible Intel processors
    N  Intel Pentium 4 and compatible Intel processors.  Enables new
       optimizations in addition to Intel processor-specific
optimizations
    P  Intel Pentium 4 processors with SSE3 extensions
    B  Intel Pentium M and compatible Intel processors
/Qx<codes>  generate specialized code to run exclusively on processors
            indicated by <codes> as described above.
/tune:<keyword>
     pn1 - optimize for Pentium(R) processor
     pn2 - optimize for Pentium(R) Pro, Pentium(R) II, and
           Pentium(R) III processors
     pn3 - same as pn2
[press RETURN to continue]
     pn4 - optimize for Pentium(R) 4 processor (DEFAULT)
/architecture:<keyword>
     pn1 - optimize for Pentium(R) processor
     pn2 - optimize for Pentium(R) Pro, Pentium(R) II, and
           Pentium(R) III processors
     pn3 - same as pn2
     pn4 - optimize for Pentium(R) 4 processor (DEFAULT)
     SSE - same as QxK
     SSE2  same as QxW

Advanced Performance
--------------------
Enable and specify the scope of Interprocedural (IP) Optimizations:
/Qip     enable single-file IP optimizations (within files, same as
/Ob2)
/Qipo[n] enable multi-file IP optimizations (between files)
/Qipo-c  generate a multi-file object file (ipo_out.obj)
/Qipo-S  generate a multi-file assembly file (ipo_out.asm)

Modify the behavior of IP:
/Qip-no-inlining    disable full and partial inlining (requires /Qip or
/Qipo)
/Qip-no-pinlining   disable partial inlining (requires /Qip or /Qipo)
/Qipo-separate      create one object file for every source file
                    (overrides /Qipo[n])

[press RETURN to continue]
Other Advanced Performance Options:
/reentrancy:<keyword>
                 specify whether the threaded, reentrant run-time
support
                 should be used
                 Keywords:  none (same as /noreentrancy), threaded
/noreentrancy    don't use reentrant run-time support
/Qpad[-]         enable/disable(DEFAULT) changing variable and array
memory
                 layout
/Qunroll[n]      set maximum number of times to unroll loops.  Omit n to
use
                 default heuristics.  Use n=0 to disable loop unroller.
/unroll[:n]      set maximum number of times to unroll loops.  Omit n to
use
                 default heuristics.  Use n=0 to disable loop unroller.

/Qprof-dir <d>   specify directory for profiling output files (*.dyn and
*.dpi)
/Qprof-file <f>  specify file name for profiling summary file
/Qprof-gen       instrument program for profiling
/Qprof-use       enable use of profiling information during optimization
/Qprof-gen-sampling
                 prepare code for use with profrun sample gathering tool
/Qfnsplit[-]     enable/disable function splitting (enabled with
/Qprof-use)

/Qpc32           set internal FPU precision to 24 bit significand
/Qpc64           set internal FPU precision to 53 bit significand
(DEFAULT)
/Qpc80           set internal FPU precision to 64 bit significand
[press RETURN to continue]
/QIfist[-]       enable/disable(DEFAULT) fast float-to-int conversions
/Qrcd            same as /QIfist
/Qrct            set internal FPU rounding control to truncate
/rounding-mode:chopped
                 set internal FPU rounding control to truncate
/Qprec           improve floating-point precision (speed impact less
than /Op)
/Qfp-port        round fp results at assignments & casts (some speed
impact)
/Qfpstkchk       enable fp stack checking after every function/procedure
call
/Qprec-div[-]    improve precision of FP divides (some speed impact)
/Qprec-sqrt[-]
                 determine if certain square root optimizations are
enabled

/Qscalar-rep[-]  enable(DEFAULT)/disable scalar replacement (requires
/O3)
/Qvec-report[n]  control amount of vectorizer diagnostic information:
            n=0    no diagnostic information
            n=1    indicate vectorized loops (DEFAULT)
            n=2    indicate vectorized/non-vectorized loops
            n=3    indicate vectorized/non-vectorized loops and
prohibiting
                   data dependence information
            n=4    indicate non-vectorized loops
            n=5    indicate non-vectorized loops and prohibiting data
                   dependence information

/Qprefetch[-]              enable(DEFAULT)/disable prefetch insertion
[press RETURN to continue]
/Qsafe-cray-ptr            Cray pointers do not alias with other
variables
/Qopt-report               generate an optimization report to stderr
/Qopt-report-file<file>    specify the filename for the generated report
/Qopt-report-level[level]  specify the level of report verbosity
(min|med|max)
/Qopt-report-phase<name>   specify the phase that reports are generated
against
/Qopt-report-routine<name> reports on routines containing the given name
/Qopt-report-help          display the optimization phases available for
                           reporting

/Qtcheck               generate instrumentation to detect
multi-threading bugs
                       (requires Intel(R) Threading Tools; cannot be
used with
                       compiler alone)
/Qopenmp               enable the compiler to generate multi-threaded
code
                       based on the OpenMP directives
/Qopenmp-profile       link with instrumented OpenMP runtime library to
                       generate OpenMP profiling information for use
with the
                       OpenMP component of the VTune(TM) Performance
Analyzer
/Qopenmp-stubs         enables the user to compile OpenMP programs in
                       sequential mode.  The openmp directives are
ignored and
                       a stub OpenMP library is linked (sequential)
/Qopenmp-report{0|1|2} control the OpenMP parallelizer diagnostic level
/fpe:{0|1|3}           specifies behavior on floating point exceptions

/Qparallel             enable the auto-parallelizer to generate
multi-threaded
[press RETURN to continue]
                       code for loops that can be safely executed in
parallel
/Qpar-report{0|1|2|3}  control the auto-parallelizer diagnostic level
/Qpar-threshold[n]     set threshold for the auto-parallelization of
loops
                       where n is an integer from 0 to 100
/Qansi-alias[-]        enable(DEFAULT)/disable use of ANSI aliasing
rules in
                       optimizations; user asserts that the program
adheres to
                       these rules
/Qcomplex-limited-range[-]
                       enable/disable(DEFAULT) the use of the basic
                       algebraic expansions of some complex arithmetic
                       operations.  This can allow for some performance
                       improvement in programs which use a lot of
complex
                       arithmetic at the loss of some exponent range.
/Qftz[-]               enable/disable flush denormal results to zero
/[no]recursive         compile all procedures for possible recursive
execution
/Qssp                  enable software-based speculative pre-computation

Output, Debug
-------------
/c, /nolink, /compile-only
                  compile to object (.obj) only, do not link
/S                compile to assembly (.asm) only, do not link
/FA[cs]           produce assembly file with optional code or source
                  annotations
[press RETURN to continue]
/asmattr:<keyword>
                  specify the information to generate in the
assembleable
                  listing file
                  keywords:  [no]source, [no]machine
/noasmattr        generate default information in the assembleable
listing
/Fa[file]         name assembly file (or directory for multiple files;
i.e.
                  /FaMYDIR\)
/asmfile[:filename]
                  specifies that an assembleable listing file should be
                  generated
/Fo[file]         name object file (or directory for multiple files;
i.e.
                  /FoMYDIR2\)
/object:<filename>
                  specify the name of the object file
/Fe<file>         name executable file or directory
/exe:<filename>   specifies the name to be used for the built program
(.EXE)
                  or dynamic-link (.DLL) library
/map:<filename>   specify that a link map file should be generated
/pdbfile[:filename]
                  specify that debug related information should be
generated
                  to a program database file
/nopdbfile        do not generate debug related information to a program
                  database file
/RTCu             report use of variable that was not initialized
[press RETURN to continue]
/Zi, /Z7          produce symbolic debug information in object file
/debug[:keyword]
                  enable debug information and control output of
enhanced
                  debug information.
                  keywords:  all, full, minimal, none (same as /nodebug)
                             inline-debug-info, variable-locations,
                             semantic-stepping, extended
/nodebug          do not enable debug information
/debug-parameters[:keyword]
                  control output of debug information for PARAMETERS
                  keywords: all, used, none (same as
/nodebug-parameters)
/nodebug-parameters
                  do not output debug information for PARAMETERS
/Quse-vcdebug     emit debug information compatible with Visual C++
debugger;
                  this disables emission of extended information used by
                  Fortran debuggers
/Qinline-debug-info
                  preserve the source position of inlined code instead
of
                  assigning the call-site source position to inlined
code
/Qtrapuv          trap uninitialized variables
/Qmap-opts        enable option mapping tool

Fortran Preprocessor
--------------------
[press RETURN to continue]
/D<name>[{=|#}<text>], /define:symbol[=value]
           Defines the symbol specified for use with conditional
           compilation metacommands.  Optionally, the symbol can
           be defined to be an integer or string value
/nodefines specifies that any /D macros go to the preprocessor only, and
not
           to the compiler too
/allow:[no]fpp-comments
           If a Fortran end-of-line comment is seen within a #define,
           treat it as part of the definition.  Default is
nofpp-comments
/E         preprocess to stdout
/EP        preprocess to stdout, omitting #line directives
/EP /P     preprocess to file, omitting #line directives
/P, /preprocess-only
           preprocess to file
/Qfpp[n], /[no]fpp
           run Fortran preprocessor on source files prior to compilation
     n=0   disable running the preprocessor, equivalent to nofpp
     n=1,2,3 run preprocessor
/Qcpp[n]   same as /Qfpp[n]
/I<dir>, /[no]include:<dir>
           define the directories in which the compiler searches for
INCLUDE
           and mod files
/module[:path]
           specify path where mod files should be placed and
[press RETURN to continue]
           first location to look for mod files
/U<name>, /undefine:<name>
           remove predefined macro
/u         remove all predefined macros
/X         remove standard directories from include file search path

Language
--------
/4I{2|4|8}       set default KIND of integer and logical variables to 2,
4,
                 or 8
/integer-size:<size>
                 specifies the default size of integer and logical
variables
                 size:  16, 32, 64
/4R{8|16}        set default size of REAL to 8 or 16 bytes
/real-size:<size>
                 specify the size of REAL and COMPLEX declarations,
constants,
                 functions, and intrinsics
                 size: 32, 64, 128
/Qautodouble     same as /4R8
/double-size:<size>
                 defines the size of DOUBLE PRECISION and DOUBLE COMPLEX
                 declarations, constants, functions, and intrinsics
                 size:  64, 128
/[no]fpconstant  extends the precision of single precision constants
assigned
[press RETURN to continue]
                 to double precision variables to double precision
/[no]intconstant use Compaq Fortran 77 semantics, rather than Compaq
Fortran
                 90, to determine kind of integer constants

/Qd-lines, /[no]d-lines
                 compile debug statements (indicated by D in column 1)

/4{Y|N}f         enable/disable free format source
/[no]fixed, /FI  specifies source files are in fixed format
/[no]free , /FR  specifies source files are in free format
/4L{72|80|132}   specify 72, 80, or 132 column lines for fixed form
sources
/Qextend-source  same as /4L132
/extend-source[:size]
                 determines the column that ends the statement field of
each
                 source line in a fixed-format file.  /extend-source
default
                 size is 132
                 size:  72 (same as /noextend-source), 80, 132
/noextend-source source lines are expected to be 72 characters
/ccdefault:<keyword>
                 specify default carriage control for units 6 and *
                 keywords:  default, fortran, list, or none
/stand:<keyword> specifies level of conformance with ANSI standard to
check
                 for
                 keywords:  f90, f95, none
[press RETURN to continue]
/Qpad-source, /[no]pad-source
                 make compiler acknowledge blanks at the end of a line
/Qdps[-], /[no]altparam
                 specify if alternate form of parameter constant
declarations
                 (without parenthesis) is recognized

/1, /Qonetrip execute any DO loop at least once
/f66          allow extensions that enhance FORTRAN-66 compatibility
/[no]f77rtl   specify that the Fortran 77 specific run-time support
should
              be used
/4{Y|N}a      enable/disable putting local variables on the run-time
stack
/Qauto        same as /4Ya or /automatic
/Qauto-scalar make scalar local variables AUTOMATIC
/Qsave        save all variables (static allocation)
              (same as /noautomatic or /4Na, opposite of /Qauto)
/4{Y|N}d      enable/disable default IMPLICIT NONE
/Qcommon-args assume "by reference" subprogram arguments may alias one
another
              (same as /assume:dummy_aliases)
/[Q]vms       enable VMS I/O statement extensions
/assume:<keyword>
              specify assumptions made by the optimizer and code
generator
              keywords: none, [no]accuracy_sensitive, [no]byterecl,
                        [no]buffered_io, [no]dummy_aliases, [no]minus0,
                        [no]protect_constants, [no]source_include,
[press RETURN to continue]
                        [no]underscore
/Qzero[-]     enable/disable(DEFAULT) implicitly initialize all data to
zero

/Qdyncom"blk1,blk2,..."  make given common blocks dynamically-allocated

/4{Y|N}b enable/disable extensive runtime error checking
/CB      runtime checks for out-of-bounds array subscript/substring refs
         Same as /check:bounds
/CU      runtime check for uninitialized variables
         same as /check:uninit
/check:<keyword>
         check run-time conditions
         keywords: all (same as /4Yb), none (same as /nocheck, /4Nb),
                   [no]arg_temp_created, [no]bounds,[no]format,
[no]overflow,
                   [no]output_conversion, [no]power, [no]uninit,
[no]args
/nocheck perform no extra run-time checks

/nbs          treat backslash as a normal character, not an escape
character
/us           append an underscore to external subroutine names
/Qlowercase   change routine names to all lowercase (same as
/names:lowercase)
/Quppercase   change routine names to all uppercase (DEFAULT)
              (same as /names:uppercase)
/names:<keyword>
              specify how source code identifiers and external names are
[press RETURN to continue]
              interpreted
              keywords:  as_is, lowercase, uppercase
/Gm           enable CVF and Powerstation calling convention
compatibility
              (same as /iface:cvf)
/Gz           make STDCALL the default calling convention
              (same as /iface:stdcall)
/iface:<keyword>
              specify the calling conventions to be used
              keywords: [no]mixed_str_len_arg, cref, cvf,
                        default, stdcall, stdref
/align[-]     analyze and reorder memory layout for variables and arrays
/Zp[n]        specify alignment constraint for structures (n=1,2,4,8,16)
/align:<keyword>
              specify how data items are aligned
              keywords: [no]commons, dcommons, [no]records, rec1byte,
                        rec2byte, rec4byte, rec8byte, rec16byte,
sequence
/Zs, /syntax-only
              perform syntax check only

Compiler Diagnostics
--------------------
/cm        same as /warn:nousage
/w         disable all warnings
/Wn        disable warnings (n=0) or show warnings
[press RETURN to continue]
           (n=1, DEFAULT, same as /warn:general)
/w90, /w95 suppress messages about use of non-standard Fortran-90/95
/4{Y|N}s   enable/disable issuing of errors for non-standard Fortran-90
/warn:<keyword>
           specifies the level of warning messages issued.
           keywords: all, none (same as /nowarn),
                     [no]alignments, [no]argument_checking,
[no]declarations,
                     [no]errors, [no]general, [no]ignore_loc,
                     [no]interfaces, [no]stderrors,
[no]truncated_source,
                     [no]uncalled, [no]uninitialized, [no]unused,
[no]usage
/nowarn    suppress all warning messages
/WB        turn a compile-time bounds check into a warning
/[no]gen-interfaces
           create interface blocks for all routines in the file.  Can
then be
           checked with warn:interfaces
/[no]traceback
           specify whether the compiler generates PC correlation data
used
           to display a symbolic traceback rather than a hexidecimal
traceback
           at runtime failure
/error-limit:<size>
           specify the maximum number of error-level or fatal-level
compiler
           errors allowed
/noerror-limit
           set no maximum number on error-level or fatal-level error
messages
[press RETURN to continue]

Miscellaneous
-------------
/?, /help     print this help message
/[no]logo     [do not] display compiler version information
/watch:<keyword>
              show driver tool commands but do not execute tools
/Tf<file>     compile file as Fortran source
/source:<filename>
              specify that the file indicated should be processed as a
Fortran
              source file
/extfor:<ext> specify extension of file to be recognized as a Fortran
file
/extfpp:<ext> specify extension of file to be recognized as a
preprocessor
              file
/convert:<keyword>
              specify the format of unformatted files containing numeric
data
              keywords: big_endian, cray, ibm, little_endian, native,
vaxd,
                        vaxg
/fpscomp[:keyword]
              specify the level of compatibility to adhere to with
Fortran
              PowerStation
              keywords: all, none (same as /nofpscomp),
                        [no]filesfromcmd, [no]general, [no]ioformat,
                        [no]ldio_spacing, [no]libs, [no]logicals
[press RETURN to continue]
/nofpscomp    no specific level of compatibility with Fortran
Powerstation
/libdir[:keyword]
              control the library names that should be emitted into the
object
              file
              Keywords:  all, none (same as /nolibdir), [no]automatic,
[no]user
/nolibdir     no library names should be emitted into the object file
/inline[:keyword]
              Specifies the level of inline function expansion.
              keywords: all (same as /Ob2 /Ot), size (same as /Ob2 /Os)
                        speed (same as /Ob2 /Ot), none or manual (same
as /Ob0)
/Qoption,<str>,<opts>
              pass options <opts> to tool specified by <str>
/Qlocation,<str>,<dir>
              set <dir> as the location of tool specified by <str>
/bintext:<string>
              place the string specified into the object file and
executable
/Qsox[-]      enable/disable(DEFAULT) saving of compiler options and
version
              in the executable
/Qnobss-init  disable placement of zero-initialized vars in BSS (use
DATA)

Linking/Linker
--------------
/link           specify that all following options are for the linker
/extlnk:<ext>   specify extension of file to be passed directly to
linker
[press RETURN to continue]
/F<n>           set the stack reserve amount specified to the linker
/Qvc6           use Visual C++ 6.0 linker and debug format (DEFAULT)
/Qvc7           enable Visual Studio .NET 2002 linker and debug format
/Qvc7.1         enable Visual Studio .NET 2003 linker and debug format
/LD[d], /dll    produce a DLL instead of an EXE ('LDd' = debug version)
/dbglibs        use the debug version of runtime libraries, when
appropriate
/MD             use dynamically-loaded, multithread runtime
/MDs            use dynamically-loaded, single thread runtime
/MG, /winapp    use Windows API runtime libraries
/ML             use statically-loaded, single thread runtime (/ML is
DEFAULT)
/MT             use statically-loaded, multithread runtime
/MW             use statically-loaded, multidocument QuickWin runtime
/MWs            use statically-loaded, single document QuickWin runtime
/libs:<keyword> determine the default libraries to be linked against
                dll    - use dynamically-loaded, multithread runtime
                qwin   - use statically-loaded, multidocument QuickWin
runtime
                qwins  - use statically-loaded, single document QuickWin
runtime

                static - use statically-loaded, single thread runtime
(DEFAULT)
/static         synonym to /libs:static
/4{Y|N}portlib  enable/disable linking with portability library
/Zl             omit library names from object file (same as /nolibdir)
/[no]threads    specify whether or not multi-threaded libraries should
be
                linked against

[press RETURN to continue]

Copyright (C) 1985-2005, Intel Corporation.  All rights reserved.

* Other brands and names are the property of their respective owners.



More information about the f2py-users mailing list