[Discussion] Implement solvers for SymEngine

59 views
Skip to first unread message

Jogi Miglani

unread,
Sep 5, 2019, 2:25:46 PM9/5/19
to symengine
Hi everyone,

I want to discuss about status of the project as mentioned in title "Implement solvers for SymEngine".
The work on this topic has been stalled after GSoC 2017. I want to continue it and try to design the solvers
for SymEngine. I want to know what ideas Aaron, Ondřej and what other member have in mind.

-
Jogi Miglani

Ondřej Čertík

unread,
Sep 5, 2019, 4:33:49 PM9/5/19
to syme...@googlegroups.com
Hi Jogi,

On Thu, Sep 5, 2019, at 12:22 PM, Jogi Miglani wrote:
> Hi everyone,
>
> I want to discuss about status of the project as mentioned in title
> "Implement solvers for SymEngine".
> The work on this topic has been stalled after GSoC 2017
> <https://gist.github.com/ranjithkumar007/1511475bcc2079ef77844c693a179aca>. I want to continue it and try to design the solvers
> for SymEngine. I want to know what ideas Aaron, Ondřej and what other
> member have in mind.

Thanks for the interest. I would say the main areas where SymEngine could be improved are:

* solvers
* assumptions
* simplifications
* integration
* port more SymPy on top of SymEngine

For each item we can formulate a detailed plan (many times it's in our issues already). We would appreciate help with any of these.

If you are interested in solvers in particular, I think Isuru might know more about the current status and what the plan should be. I know more about the other areas. Do you have some plan in mind? Let's discuss it.

Ondrej

Jogi Miglani

unread,
Sep 5, 2019, 4:56:49 PM9/5/19
to syme...@googlegroups.com
Okay as I see the list, I think first we should work upon assumptions to make it as a strong base
for other topics as I think assumption will be helpful in solvers and simplification. Its not that I want to only 
work on solvers. I am thinking what is best right now. What do you think Ondřej? 

If assumptions is already as strong to sustain the development of design of solvers then I think solvers
I will try to implement then.

-
Jogi Miglani

--
You received this message because you are subscribed to the Google Groups "symengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/864b9b52-5df9-41ed-ac38-1a7ddc5d06b3%40www.fastmail.com.

Jogi Miglani

unread,
Sep 7, 2019, 6:03:08 AM9/7/19
to syme...@googlegroups.com
Hii
Before delving into this deeper I am trying to read and understand the code and also solve trying to solve some issues so it may take time. 
And I also found this struggling that we should have a wiki page defining the major tasks of symengine at now and some necessary information about it so that if someone comes up and wants to contribute(I already went through all the beginners guide) he should be able to do it as we require.

-
Jogi Miglani

Ondřej Čertík

unread,
Sep 7, 2019, 8:39:29 PM9/7/19
to syme...@googlegroups.com
Yes, that's a great idea. Do you want to start the wiki page? I'll help fill it in too.
>>  To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com>.

-- 
You received this message because you are subscribed to the Google Groups "symengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com.

Jogi Miglani

unread,
Sep 8, 2019, 7:11:12 AM9/8/19
to syme...@googlegroups.com
I will create a wiki page soon and will attach here in mail then we can together fill it in.
I went through the code and issues, i decided to first take up the issue of implementing apart in #1324.
I know the implementation in sympy. I will try to implement it in newfile named 'apart' under polys module of symengine.

I got a problem in setting up the development environment.
```
jmig5776@jmig5776-Vostro-15-3568:~/development/symengine$ cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_BFD=yes
-- Linker supports --exclude-libs
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find FLINT (missing: FLINT_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindFLINT.cmake:11 (find_package_handle_standard_args)
  CMakeLists.txt:293 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jmig5776/development/symengine/CMakeFiles/CMakeOutput.log".

```
I googled it to find FLINT. But didn't get anything. Can you tell me where I did it wrong?. I am using Ubuntu 18.04 bionic.

-
Jogi Miglani

Ondřej Čertík

unread,
Sep 8, 2019, 9:41:09 AM9/8/19
to syme...@googlegroups.com
Flint should be an optional dependency. Try to remove CMakeCache.txt and try again. It should work.

On Sun, Sep 8, 2019, at 5:11 AM, Jogi Miglani wrote:
I will create a wiki page soon and will attach here in mail then we can together fill it in.
I went through the code and issues, i decided to first take up the issue of implementing apart in #1324 <https://github.com/symengine/symengine/issues/1324>.
I know the implementation in sympy. I will try to implement it in newfile named 'apart' under polys module of symengine.

I got a problem in setting up the development environment.
```
*jmig5776@jmig5776-Vostro-15-3568:~/development/symengine$ cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_BFD=yes 
-- Linker supports --exclude-libs
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find FLINT (missing: FLINT_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindFLINT.cmake:11 (find_package_handle_standard_args)
CMakeLists.txt:293 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jmig5776/development/symengine/CMakeFiles/CMakeOutput.log".*
```
I googled it to find FLINT. But didn't get anything. Can you tell me where I did it wrong?. I am using Ubuntu 18.04 bionic.

-
Jogi Miglani

On Sun, Sep 8, 2019 at 6:09 AM Ondřej Čertík <ond...@certik.us> wrote:
> __
>> >> To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com> <mailto:symengine%2Bunsu...@googlegroups.com <mailto:symengine%252Buns...@googlegroups.com>>.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups "symengine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com>.

>  -- 
>  You received this message because you are subscribed to the Google Groups "symengine" group.
>  To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "symengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com.

Ondřej Čertík

unread,
Sep 8, 2019, 11:23:59 AM9/8/19
to syme...@googlegroups.com
In Ubuntu 18.04, here is how you configure SymEngine for development:

ondrej@pn1707483:~/.../symengine/symengine(master)$ cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_BFD=yes .
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test NO_WARN_IMPLICIT_FALL_THROUGH_FLAG
-- Performing Test NO_WARN_IMPLICIT_FALL_THROUGH_FLAG - Success
-- Linker supports --exclude-libs
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long double
-- Check size of long double - done
-- Found GMP: /usr/lib/x86_64-linux-gnu/libgmp.so
-- Found BFD: /usr/lib/x86_64-linux-gnu/libbfd.so;/usr/lib/x86_64-linux-gnu/libdl.so
-- Found LINKH: /usr/include
-- Found EXECINFO: /usr/include
-- cotire 1.7.8 loaded.
-- CXX target symengine cotired.
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
--------------------------------------------------------------------------------

+-------------------------------+
| Configuration results SUMMARY |
+-------------------------------+

CMAKE_C_COMPILER: /usr/bin/cc
CMAKE_CXX_COMPILER: /usr/bin/c++
CMAKE_BUILD_TYPE: Debug
CMAKE_CONFIGURATION_TYPES:
CMAKE_C_FLAGS:
CMAKE_CXX_FLAGS:
CMAKE_CXX_FLAGS_DEBUG: -Wall -Wextra -Wno-unused-parameter -fno-common -g -ggdb -std=c++11 -fPIC -Wno-unknown-pragmas
CMAKE_CXX_FLAGS_RELEASE: -Wall -Wextra -Wno-unused-parameter -fno-common -O3 -funroll-loops -std=c++11 -fPIC -Wno-unknown-pragmas
CMAKE_INSTALL_PREFIX: /usr/local
BUILD_SHARED_LIBS:
INTEGER_CLASS : GMP
HAVE_SYMENGINE_GMP: yes
WITH_SYMENGINE_ASSERT: yes
WITH_SYMENGINE_RCP: no
WITH_SYMENGINE_TEUCHOS: yes
HAVE_TEUCHOS_DEBUG: yes
HAVE_TEUCHOS_DEBUG_RCP_NODE_TRACING: yes
WITH_COTIRE: yes
WITH_GENERATE_PARSER: no
HAVE_GCC_ABI_DEMANGLE: yes
HAVE_C_FUNCTION_NOT_FUNC: no
HAVE_DEFAULT_CONSTRUCTORS: yes
HAVE_SYMENGINE_NOEXCEPT: yes
HAVE_SYMENGINE_IS_CONSTRUCTIBLE: yes
HAVE_SYMENGINE_RESERVE: yes
HAVE_SYMENGINE_STD_TO_STRING: TRUE
WITH_SYMENGINE_THREAD_SAFE: no
BUILD_TESTS: yes
BUILD_BENCHMARKS: yes
BUILD_BENCHMARKS_NONIUS: no
WITH_GMP: yes
GMP_INCLUDE_DIRS: /usr/include/x86_64-linux-gnu
GMP_LIBRARIES: /usr/lib/x86_64-linux-gnu/libgmp.so
WITH_BFD: yes
BFD_INCLUDE_DIRS: /usr/include
BFD_LIBRARIES: /usr/lib/x86_64-linux-gnu/libbfd.so;/usr/lib/x86_64-linux-gnu/libdl.so
LINKH_INCLUDE_DIRS: /usr/include
EXECINFO_INCLUDE_DIRS: /usr/include
WITH_ECM: no
WITH_PRIMESIEVE: no
WITH_FLINT: no
WITH_ARB: no
WITH_MPFR: no
WITH_PIRANHA: no
WITH_LLVM: no
WITH_BOOST: no
WITH_PTHREAD: no
WITH_MPC: no
WITH_TCMALLOC: no
WITH_OPENMP: no
WITH_VIRTUAL_TYPEID: no

--------------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /home/ondrej/repos/symengine/symengine


As you can see, it does not use Flint.

Ondrej
> https://groups.google.com/d/msgid/symengine/231445b5-3ceb-4c37-9393-73d455f0aa92%40www.fastmail.com <https://groups.google.com/d/msgid/symengine/231445b5-3ceb-4c37-9393-73d455f0aa92%40www.fastmail.com?utm_medium=email&utm_source=footer>.

Jogi Miglani

unread,
Sep 8, 2019, 3:39:01 PM9/8/19
to syme...@googlegroups.com
That worked out well, thanks a lot. I started writing the tests and algorithm for apart, will create a pull request soon.
Actually most of the things got cleared from this video of you guys at SciPy 2016. I might add some examples from it.

Just asking out of curiosity I feel that we need more documentation because while going through code I wasn't able to understand what the functions do.

-
Jogi Miglani


Ondřej Čertík

unread,
Sep 8, 2019, 4:06:05 PM9/8/19
to syme...@googlegroups.com
Perfect. Yes, we should add a lot more documentation in the C++ source code, and generate it using Doxygen.

Ondrej

On Sun, Sep 8, 2019, at 1:38 PM, Jogi Miglani wrote:
> That worked out well, thanks a lot. I started writing the tests and
> algorithm for apart, will create a pull request soon.
> Actually most of the things got cleared from this video
> <https://www.youtube.com/watch?v=03rBe2RdMt4> of you guys at SciPy
> > > > >> >> To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com> <mailto:symengine%2Bunsu...@googlegroups.com <mailto:symengine%252Buns...@googlegroups.com>> <mailto:symengine%2Bunsu...@googlegroups.com <mailto:symengine%252Buns...@googlegroups.com> <mailto:symengine%252Buns...@googlegroups.com <mailto:symengine%25252Bun...@googlegroups.com>>>.
> > > > >> >> To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/864b9b52-5df9-41ed-ac38-1a7ddc5d06b3%40www.fastmail.com.
> > > > >>
> > > > >> --
> > > > >> You received this message because you are subscribed to the Google Groups "symengine" group.
> > > > >> To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com> <mailto:symengine%2Bunsu...@googlegroups.com <mailto:symengine%252Buns...@googlegroups.com>>.
> > > > >> To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/CAGPLj20hJjGdWC%3DntH9hyHFNxV2tbg4_QmDfz75XEULiDwwj_A%40mail.gmail.com <https://groups.google.com/d/msgid/symengine/CAGPLj20hJjGdWC%3DntH9hyHFNxV2tbg4_QmDfz75XEULiDwwj_A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > > >
> > > > > --
> > > > > You received this message because you are subscribed to the Google Groups "symengine" group.
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com>.
> > > > > To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/be92403e-71a8-4ea5-b780-3ccebf4b1d26%40www.fastmail.com <https://groups.google.com/d/msgid/symengine/be92403e-71a8-4ea5-b780-3ccebf4b1d26%40www.fastmail.com?utm_medium=email&utm_source=footer>.
> > > >
> > > > --
> > > > You received this message because you are subscribed to the Google Groups "symengine" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com>.
> > > > To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/CAGPLj23tNO-%2BmRom66SCpZkf5DaFHzGty2NJQXfRmS3%2BttfqEA%40mail.gmail.com <https://groups.google.com/d/msgid/symengine/CAGPLj23tNO-%2BmRom66SCpZkf5DaFHzGty2NJQXfRmS3%2BttfqEA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "symengine" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > > an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com>.
> > > To view this discussion on the web visit
> > To unsubscribe from this group and stop receiving emails from it, send an email to symengine+...@googlegroups.com <mailto:symengine%2Bunsu...@googlegroups.com>.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/symengine/64af81aa-bec5-45a0-b031-8c3cf0bfc9c8%40www.fastmail.com.
>
> --
> You received this message because you are subscribed to the Google
> Groups "symengine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to symengine+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/symengine/CAGPLj22Jrt2Tk_aRcGFRHVbgyG0cxnLUVwuuGHcAKr3cjAaUxw%40mail.gmail.com <https://groups.google.com/d/msgid/symengine/CAGPLj22Jrt2Tk_aRcGFRHVbgyG0cxnLUVwuuGHcAKr3cjAaUxw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Jogi Miglani

unread,
Sep 11, 2019, 3:24:00 PM9/11/19
to syme...@googlegroups.com
Hi I just created an issue #1613 for discussing some points regarding implementing solvers. I read all the necessary things but had some questions mentioned in this issue. Please give your guidance on the issue.I am a beginner in development in c++, pardon if silly questions are asked.

I have my mid-semester examinations this week. I will not be able to give much time but i will try to do as much as possible.

-
Jogi Miglani

Ondřej Čertík

unread,
Sep 11, 2019, 5:03:04 PM9/11/19
to syme...@googlegroups.com


On Wed, Sep 11, 2019, at 1:23 PM, Jogi Miglani wrote:
> Hi I just created an issue #1613
> <https://github.com/symengine/symengine/issues/1613> for discussing
> some points regarding implementing solvers. I read all the necessary
> things but had some questions mentioned in this issue. Please give your
> guidance on the issue.I am a beginner in development in c++, pardon if
> silly questions are asked.

Perfect, I just answered there. Don't worry about C++, you will learn the subset of C++ that you need for this project quickly.

>
> I have my mid-semester examinations this week. I will not be able to
> give much time but i will try to do as much as possible.

No worries. Any work you do will be appreciated.

Ondrej
Reply all
Reply to author
Forward
0 new messages