Comments (2)
Instead, stop caching the shared library DLL instances created by python in static_symbol
. If we get a new library instance each time, it should have its own memory and then the current paradigm would work correctly. In that case, the overhead would move to the shared library loading. I don't see another way around this that doesn't involve double allocation of arrays in memory and copying values over.
from fortpy.
For now, I decided to implement a full array copy to bypass this problem. It turns out that the ctypes
library loading returns the same handle to each subroutine; loading the library again does not allow a separate block of memory to be allocated for the subroutines. This seems to be an inherent problem with the ctypes
implementation and the fundamental differences between C and Fortran.
Andrew will look into creating a C++ wrapper to act as intermediary between F and C via ctypes. For now, revision 1.5.1 has the updates for safe memory access and deallocation by copying arrays lazily when a subroutine is requested an additional time. I will update this once he has looked into that.
from fortpy.
Related Issues (20)
- Camel Case in module name
- Extra space between xml documentation and subroutine declaration
- Modifiers in assignment block inside of test block in the xml don't get recognized.
- Type declaration failure.
- Precompiler Parsing Issue HOT 1
- Case sensitive file names
- Module import error
- Error thrown by unit test isn't string HOT 1
- Allow user to define tests that should fail or throw errors
- If fortpy was compiled with a different version of gfortran we should catch it and recompile rather than failing.
- autovar failure HOT 1
- Blank lines in summary tags break parser.
- Create staging directory automatically if it doesn't exist HOT 1
- Possibility to opt out of autoconversion of derived-type . (dot) to % (percent) HOT 1
- Add a "return" to the single line in the SUCCESS file HOT 1
- Warn when `FORTPY_CONFIG` is not set or when fortpy.config.xml is present (whenever `runtest.py` is called) HOT 1
- Makefile doesn't work on mac OSX when the compilation fails, probably regex's aren't consistent HOT 1
- Better output when compiling fortpy-created programs HOT 1
- Failure to allocate `perm` in routine `find_permutation_of_group` before calling HOT 4
- Error in symlib unittests. Fortpy declare pointer, but the variable should be an "allocatable" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fortpy.