These are chat archives for bluescarni/piranha

22nd
Nov 2016
Isuru Fernando
@isuruf
Nov 22 2016 04:11
Yes, conda packages are now available for python 2.7,3.4 and 3.5
Isuru Fernando
@isuruf
Nov 22 2016 05:47
@bluescarni, I just realized for pyranha, scikit-build is a good build-system
Francesco Biscani
@bluescarni
Nov 22 2016 09:31
interesting, I did not know about it
I will try it out
Francesco Biscani
@bluescarni
Nov 22 2016 09:45
thanks for the pointer
to install do, python setup.py install --user
Francesco Biscani
@bluescarni
Nov 22 2016 14:23
@isuruf do you know what happens in conda if there's an upgrade of some dependency? do all dependent packages get recompiled?
Isuru Fernando
@isuruf
Nov 22 2016 14:24
do you mean conda-forge?
Francesco Biscani
@bluescarni
Nov 22 2016 14:25
yes... I mean, if there's a pyranha binary compiled against a specific boost version, do I have to trigger the rebuild manually?
when boost gets updated
Isuru Fernando
@isuruf
Nov 22 2016 14:26
yes
there is a bot that creates a PR when certain packages gets updated
Francesco Biscani
@bluescarni
Nov 22 2016 14:27
ah awesome, thanks for the link
I am discussing packaging matters with @darioizzo, it can get pretty hairy :)
Isuru Fernando
@isuruf
Nov 22 2016 14:28
such as?
Francesco Biscani
@bluescarni
Nov 22 2016 14:29
well we were considering pip packaging first
@darioizzo maintains some python packages which need to link (i.e., to share) the same boost python library instance
ensuring consistency of this through pip seems a major pain
Isuru Fernando
@isuruf
Nov 22 2016 14:30
that's true
Francesco Biscani
@bluescarni
Nov 22 2016 14:30
(in pyranha we don't need that, so we can just bundle everything and forget about it)
(speaking about windows)
so maybe it's time to fully switch to conda
the dll situation in windows is pretty complex, one needs to take into account the order of searching for DLLs, the fact that someone might load a dll with the same name before you do, etc.
lots of these problems go away if you just have a unified environment for your deps
in many case you can "solve" with static linking, but dario really needs to share a specific library between different projects
otherwise these projects cannot talk to each other
Isuru Fernando
@isuruf
Nov 22 2016 14:36
I guess that's one reason for conda's existence
Francesco Biscani
@bluescarni
Nov 22 2016 14:36
yeah
Isuru Fernando
@isuruf
Nov 22 2016 14:38
pynativelib proposal is a step forward
Francesco Biscani
@bluescarni
Nov 22 2016 14:39
yes, hopefully it catches on. do you have any news on its status? I had only read the initial email announcement
Isuru Fernando
@isuruf
Nov 22 2016 14:39
did you have a look at the skbuild branch?
Francesco Biscani
@bluescarni
Nov 22 2016 14:40
haven't looked into it yet in detail, just skimmed through the github repo
Isuru Fernando
@isuruf
Nov 22 2016 14:40
Nathaniel gave a speech on scipy about it. Let me find a link
Francesco Biscani
@bluescarni
Nov 22 2016 14:41
cheers!
I hadn't actually seen the link to the piranha branch, apologies
is it working?
Isuru Fernando
@isuruf
Nov 22 2016 14:42
yes, i didn't check windows though
Francesco Biscani
@bluescarni
Nov 22 2016 14:42
very interesting, I'll check it out
would be awesome to offload the python stuff to a well-maintained 3rd party module
Isuru Fernando
@isuruf
Nov 22 2016 14:44
skbuild will also be a provider for building packages in pynativelib
Francesco Biscani
@bluescarni
Nov 22 2016 14:44
oh nice!
Isuru Fernando
@isuruf
Nov 22 2016 14:45
symengine.py is not using it because skbuild came after we started using cmake in setup.py, but we totally would have used it if it was there.
Francesco Biscani
@bluescarni
Nov 22 2016 14:47
oh wow I think you just sold it to me then :)
I have a concern with the use of MODULE as library type for the python extension
because last time I tried this greatly increased the linking time on windows for some reason
I need to revisit it
Isuru Fernando
@isuruf
Nov 22 2016 14:48
ah, okay. i think there was some problem with using SHARED, but can't remember it.
Francesco Biscani
@bluescarni
Nov 22 2016 14:49
I believe MODULE is the "right thing", but my understanding it that SHARED is in practice a superset of MODULE so it should work as well
(the contrary is not true - a MODULE cannot be used as a SHARED library in general)
Isuru Fernando
@isuruf
Nov 22 2016 14:50
btw, I've been meaning to ask, how do you develop pyranha? It takes more than 40 minutes just to build it and playing with the build system means total recompilation
Francesco Biscani
@bluescarni
Nov 22 2016 14:51
it's not that bad on a real machine with a bit of ram, usually I can manage a -j4 or something like that. But yes, it's a pain to debug
I tried to separate thing in multiple file but because of the templated nature of piranha if you modify certain bits it will need to recompile a lot
when I need to develop, I usually disable the exposition of most series types
Isuru Fernando
@isuruf
Nov 22 2016 14:52
Yeah well, chrome is killing my ram and -j2 is the most I can do if I want to do other stuff
Francesco Biscani
@bluescarni
Nov 22 2016 14:52
yes I understand
there should probably be an option in cmake to have a really small exposition for devl purposes
the long compile times come from doing the same things over and over, so instead of doing X 50 times you do it once and you get the same result essentially
the only interesting bit is probably the type system, and that one is isolated so it does not trigger recompilation
the rest is rather pedestrian
Isuru Fernando
@isuruf
Nov 22 2016 14:55
ah. I removed some .cpp files to make it faster and made changes until I got link errors.
Francesco Biscani
@bluescarni
Nov 22 2016 14:56
essentially the compilation of pyranha spends a lot of time instantiating many templates with different types, in order to expose, e.g., polynomials defined over different rings
Isuru Fernando
@isuruf
Nov 22 2016 14:56
Right, for the python library you need to compile everything because you don't know what the user needs at build time
Francesco Biscani
@bluescarni
Nov 22 2016 14:57
right you also need to comment out bits in core.cpp, where the exposition functions are invoked
exactly yeah
https://github.com/bluescarni/piranha/blob/master/pyranha/polynomial_descriptor.hpp here you see all the different coefficient/monomial representation combinations that are exposed in a pyranha build
Isuru Fernando
@isuruf
Nov 22 2016 14:57
making the library SHARED works
Francesco Biscani
@bluescarni
Nov 22 2016 14:58
nice
really looking forward to using it
especially if it becomes a standard
Francesco Biscani
@bluescarni
Nov 22 2016 15:07
so there are no missing symbols? I thought without linking to the python dll there would be some
Isuru Fernando
@isuruf
Nov 22 2016 15:07
didn't check windows
Francesco Biscani
@bluescarni
Nov 22 2016 15:07
no missing symbols in linux either?
Isuru Fernando
@isuruf
Nov 22 2016 15:08
yes
Isuru Fernando
@isuruf
Nov 22 2016 17:52
@bluescarni, is there a way in CMake to detect if a library has been compiled with gcc 4 ABI or not?
Francesco Biscani
@bluescarni
Nov 22 2016 20:27
@isuruf I don't know of anything like that provided by cmake. To be honest I would not know how to do it from the command line either
if it's the "correct" way, it would not be too hard to do it from cmake