Comments (12)
Hi. It would be best if you open a pull-request with a fix, so that we are compatible with both python2 and python3.
from adol-c.
Hi, is there any news on this topic? Is anybody planning to make it compatible with python3?
from adol-c.
As I wrote before, anyone who feels like it, please open a pull-request with the fix.
from adol-c.
cppad_py is an alternative that works with python3; see
https://cppad-py.readthedocs.io/
from adol-c.
Hi there,
as Python 2 did reach end of life quite some time ago, I think it would be a good Idea to support Python 3 from now on forward. (Just to be clear, the current swig wrapper works with 3.11, you just can't do any division.)
I went ahead and made the required changes, however due to #42 I had to make some more changes to the build system that are possibly a little hackish.
In my opinion, it would be best to resolve the problems with the buildsystem first. Afterwards I will gladly add a test case for the changes.
My changes can be found in 7b0078e .
Best,
Stefan
from adol-c.
Hi Stefan,
thanks a lot for your comment!!
We also found some issues with the build system. I will try to integrate them within the next two weeks. It would be great if you could provide a test case after that.
Best regards
Andrea
from adol-c.
No problem, if you post it here I'll be notified.
FYI: My changes to the build system can be found in https://github.com/cklb/ADOL-C/tree/makepkg
from adol-c.
Hi Stefan,
I just tried to adapt the build system correspondingly. However, I was not completely successful. Could we discuss these issue to fix it? That would be great.
Best regards
Andrea
from adol-c.
Hey,
a few weeks ago, a colleague of mine made some changes to get the build running again. I don't think that he is on Github by luckily he collected his changes (based on the 2.7.2 release) in form of a patch and provided a package for the archlinux user repository which you can find here: https://aur.archlinux.org/packages/python-adolc.
The patch itself can be found here: https://aur.archlinux.org/cgit/aur.git/tree/setup.patch?h=python-adolc.
Best,
Stefan
from adol-c.
Hey,
thanks a lot for the patch. It should be included now in the master branch. However, the installation does not work on my system. It would be great if you could give it a try to check whether it works on your system? That might help to identify the reason.
Thanks and best regards
Andrea
from adol-c.
Hey,
it seems like one line of the patch did not get included on the master branch, it is the line 217 in ADOL-C/swig/setup.py:
- version='2.7-trunk',
+ version='2.7.2',
without that change, the packaging module gives
packaging.version.InvalidVersion: Invalid version: '2.7-trunk'
.
However, after applying that line a myriad of similar compile errors arise from the wrapper class.
One example:
adolc-python_wrap.cpp: In Funktion »adub* badouble___pow____SWIG_1(badouble*, double)«:
adolc-python_wrap.cpp:5353:16: Fehler: ungültige Umwandlung von Typ »adub« in Typ »adub*«
5353 | return (adub*) pow((*(self)),c);
I think the problem here is that the patch is based on the last available tagged version of ADOL-C (https://github.com/coin-or/ADOL-C/releases/tag/releases%2F2.7.2) and in the meantime changes were made to the C++ code that did not get ported to the swig wrapper, possibly because no one was using the python extension.
However, as adolc-python_wrap.cpp
is generated by swig itself, the culprit is probably the interface definition in adolc-python.i
.
The build commands I used are
autoreconf -fi
./configure --enable-sparse --enable-python
make
make install
Best,
Stefan
from adol-c.
Hi,
oK, this is the same behaviour that I observe. I will try to trace down the reason for this and to fix the interface definition.
Best regards
Andrea
from adol-c.
Related Issues (20)
- Linker error using fixpoint iteration abilities HOT 2
- strncpy bound depends on the length of the source
- boost and mingw64 (msys) HOT 1
- Output tape to c or C++ file HOT 1
- ADOL-C thread safety HOT 2
- ColPack detection on MacOS / g++ 10.1 gets confused
- OPENMP for loop with reduction
- configure mistakenly adding "-link -dll" option on a linux system lead to errors
- Build fails with ColPack HOT 2
- configure prints: Build with python swig module: no ./configure: line 22356: xno: command not found HOT 1
- python build fails: error: command 'swig' failed with exit status 1 HOT 2
- Implementation in Matlab HOT 1
- How to cross-compile ADOL-C to arm linux HOT 2
- ADOL-C installation macbook HOT 1
- uni5_for.c:3298:28: error: 'j' undeclared HOT 1
- Warning in calling setNumDir HOT 2
- Data races in OpenMP thread-parallel implementation
- 安装,在make的时候出现如下错误 HOT 6
- boost-test-adolc Fails with absolute value exceeding tolerance HOT 1
- AMPI upstream repository is dead
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 adol-c.