Giter VIP home page Giter VIP logo

fwrap's People

Contributors

certik avatar kwmsmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fwrap's Issues

gfortran character declaration bug

For this declaration:

character(len=1, kind=kind('a')), dimension(63) :: fw_errstr__

Gfortran 4.2.3 on Mac OS X gives an error like this:

test_char_kind.f:2.37:

    character(len=1, kind=kind('a')), dimension(63) :: fw_errstr__    
                                  1
Error: Kind 69068 is not a CHARACTER kind at (1)

Which seems to be this bug:

http://www.mail-archive.com/[email protected]/msg201855.html

The workaround is to emit this code for the character declaration:

character(1), dimension(63) :: fw_errstr__

Is this appropriate for projects with multiple modules which depend on each other?

Hi:

I would like to wrap some code that uses derived types into python and was wondering if fwrap works for modules with dependencies, the dependencies are included in the project? Like for example, I have a module A which depends on modules B and C and I would like to expose some functions from module A? I guess with ctypes everything will be in a single .so...

Thanks

AttributeError: 'Line' object has no attribute 'analyze'

Any Ideas on what I am doing wrong? This is my first time using frwap.

fwrapc src/loop.f95 --build --fcompiler=gfortran --name=loop_ext --out_dir=loop_ext --override



WARNING: While processing 'src/loop.f95' (mode='free')..
   28:  USE mod_turb
   29:  USE mod_coord
   30:#ifdef tracer <== no parse pattern found for "#ifdef tracer" in 'Subroutine' block.
WARNING: While processing 'src/loop.f95' (mode='free')..


...

    2:MODULE mod_param <== exception triggered here: <type 'exceptions.Exception'> 'Line' object has no attribute 'analyze'
    3:  INTEGER                                   :: IMT, JMT, KM
    4:  INTEGER                                   :: JMAX, LBT, NTRACMAX
    5:  INTEGER, PARAMETER                        :: MR=501 ! or 1001
Traceback (most recent call last):
  File "/usr/local/epd-64-722/bin/fwrapc", line 10, in <module>
    sys.exit(entry())
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/main.py", line 610, in entry
    return main(use_cmdline=True)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/main.py", line 600, in main
    wrap(source_files, **parsed_options.__dict__)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/main.py", line 207, in wrap
    f_ast = parse(source_files)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/main.py", line 267, in parse
    ast = fwrap_parse.generate_ast(source_files)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fwrap_parse.py", line 39, in generate_ast
    block = api.parse(src, analyze=True)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/api.py", line 157, in parse
    parser.analyze()
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/parsefortran.py", line 88, in analyze
    self.block.analyze()
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/utils.py", line 204, in new_func
    func(self)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/block_statements.py", line 225, in analyze
    stmt.analyze()
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/utils.py", line 204, in new_func
    func(self)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/block_statements.py", line 628, in analyze
    stmt.analyze()
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/utils.py", line 204, in new_func
    func(self)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/statements.py", line 919, in analyze
    parser.analyze()
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/parsefortran.py", line 88, in analyze
    self.block.analyze()
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/utils.py", line 204, in new_func
    func(self)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/block_statements.py", line 222, in analyze
    stmt.analyze()
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/utils.py", line 204, in new_func
    func(self)
  File "/usr/local/epd-64-722/lib/python2.7/site-packages/fwrap/fparser/block_statements.py", line 323, in analyze
    stmt.analyze()
AttributeError: 'Line' object has no attribute 'analyze'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.