These are chat archives for symengine/symengine

28th
Jun 2015
Sumith Kulal
@Sumith1896
Jun 28 2015 10:23
To build with clang, do I have to re-build gmp?
Francesco Biscani
@bluescarni
Jun 28 2015 13:26
@Sumith1896 normally not, clang should be compatible with libraries compiled by GCC
Sumith Kulal
@Sumith1896
Jun 28 2015 13:27
We have had issues before sympy/symengine#367
Francesco Biscani
@bluescarni
Jun 28 2015 13:29
that was probably because they were mixing standard libraries
if you compile with clang AND with GCC's std lib, you should not have problems
I do it all the time
with clang, you can control which standard library is used by using the -stdlib= switch
I am positive that on Linux the default is -stdlib=libstdc++ (i.e., it uses GCC's standard library)
Francesco Biscani
@bluescarni
Jun 28 2015 13:34
I can't remember if on OSX the default is -stdlib=libc++, or if it is still -stdlib=libstdc++
I get error messages similar to that bugreport if I mix standard libraries, especially when linking Boost
look at the first answer
something changed between OSX versions, they might be running into such problem
Sumith Kulal
@Sumith1896
Jun 28 2015 16:54
@shivamvats There?
Shivam Vats
@shivamvats
Jun 28 2015 16:54
yeah
Sumith Kulal
@Sumith1896
Jun 28 2015 16:54
Cool
So what do you have in mind?
Shivam Vats
@shivamvats
Jun 28 2015 16:55
Have you thought of the Polynomial class yet?
Sumith Kulal
@Sumith1896
Jun 28 2015 16:56
We were thinking to keep it same as UnivariatePolynomial, the API for choosing domains etc, have not been thought of
We were thinking of starting with ZZ and wrapping up.
Shivam Vats
@shivamvats
Jun 28 2015 16:57
what do you mean by wrapping up?
Sumith Kulal
@Sumith1896
Jun 28 2015 16:57
QQ and EX( @bluescarni has a patch) also needs to be done, but I was thinking of starting with just integer coefficients
Shivam Vats
@shivamvats
Jun 28 2015 16:58
oh cool
We are using piranha's int for coefficients, right?
Sumith Kulal
@Sumith1896
Jun 28 2015 16:59
Yeah
Shivam Vats
@shivamvats
Jun 28 2015 16:59
Do you have any plans to have rational coeffs
Sumith Kulal
@Sumith1896
Jun 28 2015 16:59
Yes
But is it needed now?
I don't know how Piranha handles this
Shivam Vats
@shivamvats
Jun 28 2015 17:01
Not really. We can modify it later
Getting the code up and running is more important
Sumith Kulal
@Sumith1896
Jun 28 2015 17:01
But using template structure seems like the way to go
Yes
Shivam Vats
@shivamvats
Jun 28 2015 17:02
Templates will come handy if we have many domains.
Are there other advantages?
Sumith Kulal
@Sumith1896
Jun 28 2015 17:02
What all does SymPy have?
Shivam Vats
@shivamvats
Jun 28 2015 17:03
Sympy is python
it doesn't need templates
Sumith Kulal
@Sumith1896
Jun 28 2015 17:03
No no not that
What domains?
quite a few
We dont need all of them
Sumith Kulal
@Sumith1896
Jun 28 2015 17:04
Yeah, ZZ , QQ and EX is fine
We'll expand later
Shivam Vats
@shivamvats
Jun 28 2015 17:04
QQ and EX are the ones important for series expansion
Sumith Kulal
@Sumith1896
Jun 28 2015 17:04
Yes, by when do you need them?
Shivam Vats
@shivamvats
Jun 28 2015 17:05
I hope to finish my work in Sympy by this week (worst case next week ).
by "this" I mean the coming week
Sumith Kulal
@Sumith1896
Jun 28 2015 17:06
I'll try to finish as much as possible this week.
You could help me out next week if something is remaining according to your needs
Shivam Vats
@shivamvats
Jun 28 2015 17:07
Yeah. You need not hurry. We will do it together.
Sumith Kulal
@Sumith1896
Jun 28 2015 17:08
Okay. Thanks
Will you need rational exponents?
Shivam Vats
@shivamvats
Jun 28 2015 17:08
I'll write a Series class for Sympy. That might help here
Eventually, yes.
Sumith Kulal
@Sumith1896
Jun 28 2015 17:08
Cool
Shivam Vats
@shivamvats
Jun 28 2015 17:09
But it is fine if we dont do it immediately
Sumith Kulal
@Sumith1896
Jun 28 2015 17:09
Okay, the switching between tuple and packed needs to be thought through
Rational is tuple
Packing doesn't make sense(afaik)
Shivam Vats
@shivamvats
Jun 28 2015 17:10
Yes
In some cases Kronecker is slower cos packing/unpacking takes too mych time
I haven't run your code, though
Sumith Kulal
@Sumith1896
Jun 28 2015 17:11
We use different packing
Not the power of 2 one
Shivam Vats
@shivamvats
Jun 28 2015 17:11
Then?
Sumith Kulal
@Sumith1896
Jun 28 2015 17:11
We currently use piranha::encode
Shivam Vats
@shivamvats
Jun 28 2015 17:11
what does it do?
Sumith Kulal
@Sumith1896
Jun 28 2015 17:12
I don't know the internals, it has something to do with primes
@bluescarni knows better
All I know is one to one packing and works for signed
Shivam Vats
@shivamvats
Jun 28 2015 17:13
Does it evaluate it at primes?
Sumith Kulal
@Sumith1896
Jun 28 2015 17:14
I don't know that currently, will look through it.
We had problems with hashing
Hence we switched to this
Shivam Vats
@shivamvats
Jun 28 2015 17:15
Oh, cool
The plan in brief
  • ZZ domain
  • UnivariatePolynomial class
Anything else
Sumith Kulal
@Sumith1896
Jun 28 2015 17:17
We are handling multivariate but the methods will be as much implemented in UnivariatePolynomial
Shivam Vats
@shivamvats
Jun 28 2015 17:18
Ok
Sumith Kulal
@Sumith1896
Jun 28 2015 17:18
Cool
I'll need to look into SymPy's API
Will do that
Shivam Vats
@shivamvats
Jun 28 2015 17:18
Yes. You can read Mattpap's thesis
polys is quite vast though
Sumith Kulal
@Sumith1896
Jun 28 2015 17:19
Yeah, I had read it long back. Not all of it made sense then.
I think I am in a better position now.
Will do that.
Shivam Vats
@shivamvats
Jun 28 2015 17:19
Deninitely
Btw, there are two implementations in sympy- dense and sparse
Sumith Kulal
@Sumith1896
Jun 28 2015 17:21
Yes
Shivam Vats
@shivamvats
Jun 28 2015 17:21
I don't think you need to worry much about the dense part
Sumith Kulal
@Sumith1896
Jun 28 2015 17:21
Okay
Shivam Vats
@shivamvats
Jun 28 2015 17:22
Have a look at polys/rings
Sumith Kulal
@Sumith1896
Jun 28 2015 17:24
Cool, should I go in lines of this in terms of class methods and functions?
Shivam Vats
@shivamvats
Jun 28 2015 17:25
That seems reasonable.
@certik might want to comment
Cool then!
Sumith Kulal
@Sumith1896
Jun 28 2015 17:26
Yeah, there are a lot of imports here
Shivam Vats
@shivamvats
Jun 28 2015 17:27
Yes, it uses a lot of functions from the rest of poly
Sumith Kulal
@Sumith1896
Jun 28 2015 17:27
I don't think we have any of these implemented.
Yes @certik will know, will ask him.
Shivam Vats
@shivamvats
Jun 28 2015 17:27
We don't
We dont' need to code something that complex immediately
Sumith Kulal
@Sumith1896
Jun 28 2015 17:28
Yes
Shivam Vats
@shivamvats
Jun 28 2015 17:28
Just the basic things
Sumith Kulal
@Sumith1896
Jun 28 2015 17:28
Cool
Shivam Vats
@shivamvats
Jun 28 2015 17:31
Great then.
Let me know when you send the first pr for it.
Sumith Kulal
@Sumith1896
Jun 28 2015 17:31
Will do
Thanks for the meeting
Shivam Vats
@shivamvats
Jun 28 2015 17:32
You too :)
Sumith Kulal
@Sumith1896
Jun 28 2015 17:34
any quick fixes for the clang issue?
Sumith Kulal
@Sumith1896
Jun 28 2015 17:48
I'm lost here :smile:
Sumith Kulal
@Sumith1896
Jun 28 2015 18:05
@bluescarni Are you suggesting that I don't need to recompile gmp?
I am getting the following CMake error
-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmpxx.so;/usr/local/lib/libgmp.so  
CMake Error at CMakeLists.txt:59 (message):
  GMP library being linked is not supported by CMAKE_CXX_COMPILER used.

  Recompile GMP with C++ support using /home/sumith/anaconda/bin/clang,
  remove CMakeCache.txt and try again.
When I do CXX=clang cmake ../ in the build directory
What am I doing wrong?
Francesco Biscani
@bluescarni
Jun 28 2015 18:25
is this your local clang or travis?
Sumith Kulal
@Sumith1896
Jun 28 2015 18:25
Local
Francesco Biscani
@bluescarni
Jun 28 2015 18:26
Does it say something about an error log?
(open the link, gitter rendering is poor)
Francesco Biscani
@bluescarni
Jun 28 2015 18:29
this is a clang installed via anaconda right?
Sumith Kulal
@Sumith1896
Jun 28 2015 18:29
Yes
Francesco Biscani
@bluescarni
Jun 28 2015 18:29
and what GCC version?
Sumith Kulal
@Sumith1896
Jun 28 2015 18:30
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is Clang 3.3.0
Francesco Biscani
@bluescarni
Jun 28 2015 18:31
you should be using clang++
the invocation here is using clang
which is the C compiler
Sumith Kulal
@Sumith1896
Jun 28 2015 18:34
Oh Thanks, compiles now
Should be corrected I think.
Sumith Kulal
@Sumith1896
Jun 28 2015 18:41
Locally everything is fine
Francesco Biscani
@bluescarni
Jun 28 2015 18:45
so the problem happens on the travis OSX instance? or is it a linux one?
Sumith Kulal
@Sumith1896
Jun 28 2015 18:47
Looks like linux
Francesco Biscani
@bluescarni
Jun 28 2015 19:47
Have you tried the suggestion from the bugreport linked above?
basically adding -stdlib=libc++ to the flags
Sumith Kulal
@Sumith1896
Jun 28 2015 19:58
There is something wrong then too
  Building CXX object
  CMakeFiles/cmTryCompileExec3836463528.dir/checkcxx11.cpp.o

  /home/sumith/anaconda/bin/clang++ -std=c++11 -Wall -Wextra -fPIC -O3
  -march=native -ffast-math -funroll-loops -Wno-unused-parameter
  -stdlib=libc++ -o
  CMakeFiles/cmTryCompileExec3836463528.dir/checkcxx11.cpp.o -c
  /home/sumith/github/csympy/cmake/checkcxx11.cpp

  /home/sumith/github/csympy/cmake/checkcxx11.cpp:1:10: fatal error:
  'unordered_map' file not found

  #include <unordered_map>
           ^
  1 error generated.