<div>hi all.</div>
<div>I'm trying to compile an F90 source file with f2py, but it fails with the construct "type ... end type".</div>
<div>here is an example:</div>
<div> </div>
<div>--------------------</div>
<div>! file test19.f90</div>
<div>module basic                                                                                                                                                                                                                                                              
<br>  implicit none                                                                                                                                                                                                                                                           
<br>  save                                                                                                                                                                                                                                                                    
<br>  integer, parameter :: ciao = 17                                                                                                                                                                                                                                         
<br>end module basic                                                                                                                                                                                                                                                          
<br>                                                                                                                                                                                                                                                                          
<br>module basic2                                                                                                                                                                                                                                                             
<br>  implicit none                                                                                                                                                                                                                                                           
<br>  save                                                                                                                                                                                                                                                                    
<br>  type test_t                                                                                                                                                                                                                                                             
<br>     integer :: x                                                                                                                                                                                                                                                         
<br>  end type test_t                                                                                                                                                                                                                                                         
<br>  type(test_t) :: ciao                                                                                                                                                                                                                                                    
<br>end module basic2                                                                                                                                                                                                                                                          
<br>----------------------</div>
<div> </div>
<div>$>f2py -c test19.f90 -m test --fcompiler=intele --compiler=intel</div>
<div>(I'm compiling on an SGI Altix)</div>
<div> </div>
<div>and this is the error message:</div>
<div> </div>
<div>----------------------</div>
<div>running build<br>running config_fc<br>running build_src<br>building extension "test" sources<br>f2py options: []<br>f2py:> /tmp/tmprBrnf7/src.linux-ia64-2.5/testmodule.c<br>creating /tmp/tmprBrnf7<br>creating /tmp/tmprBrnf7/src.linux- 
ia64-2.5<br>Reading fortran codes...<br>        Reading file 'test19.f90' (format:free)<br>Post-processing...<br>        Block: test<br>                        Block: basic<br>                        Block: basic2 
<br>                                Block: test_t<br>Post-processing (stage 2)...<br>        Block: test<br>                Block: unknown_interface<br>                        Block: basic<br>                        Block: basic2 
<br>                                Block: test_t<br>Building modules...<br>        Building module "test"...<br>                Constructing F90 module support for "basic"...<br>                  Variables: ciao 
<br>                Constructing F90 module support for "basic2"...<br>                  Variables: ciao<br>getctype: No C-type found in "{'typespec': 'type', 'typename': 'test_t'}", assuming void. 
<br>Traceback (most recent call last):<br>  File "/xlv1/labsoi_devices/bollalo001/bin/f2py", line 26, in <module><br>    main()<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/<span class="st" id="st" name="st">
numpy</span>/f2py/f2py2e.py", line 552, in main <br>    run_compile()<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/<span class="st" id="st" name="st">numpy</span>/f2py/f2py2e.py", line 539, in run_compile
<br>    setup(ext_modules = [ext])<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/site-packages/<span class="st" id="st" name="st">numpy</span>/distutils/core.py", line 174, in setup <br>    return old_setup(**new_attr)
<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/distutils/core.py", line 151, in setup<br>    dist.run_commands()<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/distutils/dist.py", line 974, in run_commands 
<br>    self.run_command(cmd)<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/distutils/dist.py", line 994, in run_command<br>    cmd_obj.run()<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/distutils/command/build.py", line 112, in run 
<br>    self.run_command(cmd_name)<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/distutils/cmd.py", line 333, in run_command<br>    self.distribution.run_command(command)<br>  File "/xlv1/labsoi_devices/bollalo001/lib/python2.5/distutils/dist.py", line 994, in run_command 
<br>    cmd_obj.run()</div>
<div>[...]<br>KeyError: 'void'<br>Exit 1<br>------------------------------------</div>
<div> </div>
<div>module basic gives no problems, but module basic2 yes, because of the type construct.</div>
<div>it seems that f2py doesn't support "type" construct. am I right? is there a workaround?</div>
<div>thank you very much,</div><span class="sg">
<div>lorenzo.</div></span>