Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'void' when trying to build interface with f2py #130

Open
Zweigstelle opened this issue Oct 14, 2020 · 0 comments
Open

KeyError: 'void' when trying to build interface with f2py #130

Zweigstelle opened this issue Oct 14, 2020 · 0 comments

Comments

@Zweigstelle
Copy link

Hi again @jameskermode
I tried to use f90wrap with a very simple test implementation.

module simple_module 
  use, intrinsic :: iso_fortran_env, only: REAL64, INT32
  type, public :: simple_type
    integer(kind=INT32) :: a 
    real(kind=REAL64) :: b 
    contains 
      !Setter subroutines
      !Getter functions
      !Finalize routines
  end type simple_type
  contains
  ! Definitions of Routines and Functions
end module simple_module

I defined the kind_map file containing

{
  'integer' : {'INT32' : 'int', '4' : 'int'}, 
  'real' : {'REAL64': 'double', '8' : 'double'} 
}
f90wrap -k kind_map -m simple simple_module.f90

produces the file f90wrap_simple_module.f90 and simple.py.
If I then try to run

f2py -c -m _simple f90wrap_simple_module.f90 

I end up with

Building modules...
        Building module "_simple"...
                Constructing wrapper function "f90wrap_simple_type_initialise"...
                  this = f90wrap_simple_type_initialise()
                Constructing wrapper function "f90wrap_simple_type_finalise"...
                  f90wrap_simple_type_finalise(this)
                Constructing wrapper function "f90wrap_set_a"...
getctype: No C-type found in "{}", assuming void.
getctype: No C-type found in "{}", assuming void.
getctype: No C-type found in "{}", assuming void.
Traceback (most recent call last):
 #Lot of Traceback output
... line 416, in getpydocsign
    sig = '%s : %s %s%s' % (a, opt, c2py_map[ctype], init)

KeyError: 'void'

I'm probably missing something, but I could not find anything in the docs which resolved my issue.
Thanks in advance and best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant