kwmsmith / fwrap Goto Github PK
View Code? Open in Web Editor NEWWrap Fortran 90/95 in C, Cython and Python
Home Page: http://fwrap.sourceforge.net
License: Other
Wrap Fortran 90/95 in C, Cython and Python
Home Page: http://fwrap.sourceforge.net
License: Other
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__
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
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.