Questions tagged [f2py]

F2PY is a tool that provides an interface between the Python and Fortran programming languages.

F2PY is a tool that provides an interface between the and programming languages. F2PY is part of .

491 questions
0
votes
0 answers

f2py not creating .py file

I have downloaded python-asurv which comes with asurv.py, setup.py, twokm.f and twokm.pyf. asurv has import twokm in it, but this gives the error no module named twokm. I have tried typing f2py2e.py -c --fcompiler=gnu95 twokm.pyf twokm.f** in the…
Matt Majic
  • 381
  • 9
  • 18
0
votes
0 answers

Cannot run f2py on Windows

I have Python 2.7, Numpy, and gfortran installed on my Windows 7 machine. Running python c:\Python27\Scripts\f2py.py -c --fcompiler=gnu95 --compiler=mingw32 -m hello hello.f gives an error objdump.exe: 'C:\WINDOWS\system32\python27.dll': No such…
Fortranner
  • 2,525
  • 2
  • 22
  • 25
0
votes
1 answer

Problems with running f2py from terminal (Mac OSX)

This may seem to be a rather odd issue, but I have a fully functional Python with Numpy on my Mac, and the Numpy has f2py included in it. I can even access f2py by importing it explicitly on my iPython window as from numpy import f2py But I cannot…
computanjohn
  • 133
  • 8
0
votes
0 answers

Permission Denied error on f2py

I am trying to learn how to use f2py (Fortran to Python), but I am getting a permission denied error when I use f2py and I am the admin user. !f2py -c -m hellofortran hellofortran.f then I get the error: /bin/sh:…
ROBOTPWNS
  • 4,299
  • 6
  • 23
  • 36
0
votes
1 answer

defining arrays in fortran after dynamic size declaration

I am new to Fortran and what I want is that my size of the matrix depends on if N is even or odd, Naively I would try something like below, but this doesnt compile, if I remove the if statement it works fine though, subroutine f(fMatrix,oMatrix,N) …
Ars3nous
  • 136
  • 1
  • 1
  • 8
0
votes
1 answer

Segmentation fault after removing debug printing

I have a (for me) very weird segmentation error. At first, I thought it was interference between my 4 cores due to openmp, but removing openmp from the equation is not what I want. It turns out that when I do, the segfault still occurs. What's weird…
Daimonie
  • 83
  • 11
0
votes
1 answer

Creating Python C module from Fortran sources on Ubuntu 10.04 LTS

In a project I work on we use a Python C module compiled from Fortran with f2py. I've had no issues building it on Windows 7 32bit (using mingw32) and on the servers it's built on 32bit Linux. But I've recently installed Ubuntu 10.04 LTS 64bit on my…
Botond Béres
  • 16,057
  • 2
  • 37
  • 50
0
votes
1 answer

Python import from subfolder -- Fortran .so inside .so from f2py -- ImportError (Image not found)

I am importing a Python library 'Interface' located in a subfolder 'Fortran_Interface' (wrapped with f2py): import Interface 'Interface.so' was compiled to link to the Fortran lib 'libsolver.so'. The compilation was done with the commands gfortran…
GPMueller
  • 2,881
  • 2
  • 27
  • 36
0
votes
1 answer

Anomalous speed up of F2py with muliprocessing

I have a python front end, and a fortran back end, using F2py to call a python wrapper function "gBulk_kZ" for a fortran function. I was comparing the time of two methods. The first with multiprocessing, the second just using the map function.…
0
votes
1 answer

f2py: how to pass 2 dimension list to fortran 77

I have trouble passing 2D arrays to fortran. I want to combine a bunch of not overlapping spectra. First I select the points on the x-axis, then I interpolate all data to this new, common grid. I store the spectra in a 2D list in python. This works…
0
votes
1 answer

How do I get information about compiler (version) that is used by Cython and f2py in IPython?

does anyone know if there is a way to print the compiler (and its version) that is used when I use the Fortran magic and Cython magic in IPython For example, like the compiler that was used to build Python: platform.python_compiler()
user2489252
0
votes
2 answers

Intermittent Memory Allocation Error for Fortran Matrix using F2Py

Background: I have a Python script that uses Fortran code for it's intensive calculations. I'm using F2Py to do this. One particular Fortran subroutine builds a matrix used in later calculations. This subroutine is iterated over in a loop, and…
MarkyD43
  • 457
  • 4
  • 20
0
votes
1 answer

f2py use module - signature file

i created my signature file which is using the module dimpar. When i try to compile using the signature file, f2py doesn't recognize the msects and maxpar and as a result i get: /tmp/tmpj4zcO9/src.linux-i686-2.6/AtlasGeneratormodule.c:360: error:…
user1964154
  • 416
  • 1
  • 4
  • 10
0
votes
1 answer

Does f2py perform differently with the different versions of Fortran and CPython

There are several version of Fortran (66, 77, 90, 95, 2003, 2008) and there are two versions of CPython (2.x and 3.x). From user experience I would like to know whether f2py is faster, more memory efficient or robust when writing the Fortran source…
Aeronaelius
  • 1,291
  • 3
  • 12
  • 31
0
votes
1 answer

f2py : comment line using .f90 file

When using f2py with a .f90 file, does one have to use the flag !f2py instead of Cf2py? I use the intel fortran compiler and it seems compile to a .pyd file if I use !f2py. If I use Cf2py, it fails. Thanks for your help.
1 2 3
32
33