PPA support for more advanced Eigen (SparseQR)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: PPA support for more advanced Eigen (SparseQR)

Post by triplus »

OK Trusty and Vivid succeeded and Precise failed due to unmet dependency. Will investigate what would be the optimal solution for Precise.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: PPA support for more advanced Eigen (SparseQR)

Post by abdullah »

triplus wrote:
abdullah wrote:
I backported eigen, but at least for precise (Trusty and Vivid are still being built) it gives a build error because it can not satisfy some (weird) dependency. Attached is launchpad's build error log.
buildlog_ubuntu-precise-i386.eigen3_3.2.5-4~ubuntu12.04.1~ppa1_BUILDING.txt.gz
I see. For Precise we might need to investigate what would be the most elegant solution to meet ttf-freefont dependency. It's a bit strange as i tested back porting locally only for Precise Pangolin and it went fine. Just wondering what is the command you used? Anyway lets wait for other builds to finish first to see the summary of all builds.
Just the command you suggested in the other thread. In my computer everything success. When the packages get loaded to launchpad, a "build process starts" (not clear to me what is exactly being made). This fails...

Now it is compiling FC for vivid and trusty... let's see in a couple of minutes...
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: PPA support for more advanced Eigen (SparseQR)

Post by triplus »

abdullah wrote:
triplus wrote:
abdullah wrote:
I backported eigen, but at least for precise (Trusty and Vivid are still being built) it gives a build error because it can not satisfy some (weird) dependency. Attached is launchpad's build error log.
buildlog_ubuntu-precise-i386.eigen3_3.2.5-4~ubuntu12.04.1~ppa1_BUILDING.txt.gz
I see. For Precise we might need to investigate what would be the most elegant solution to meet ttf-freefont dependency. It's a bit strange as i tested back porting locally only for Precise Pangolin and it went fine. Just wondering what is the command you used? Anyway lets wait for other builds to finish first to see the summary of all builds.
Just the command you suggested in the other thread. In my computer everything success. When the packages get loaded to launchpad, a "build process starts" (not clear to me what is exactly being made). This fails...

Now it is compiling FC for vivid and trusty... let's see in a couple of minutes...
Yes the issue on Precise is one of the packages needed for building Eigen3 is named ttf-freefont but it was renamed to fonts-freefont-ttf in Ubuntu releases after Precise. Therefore it can't be found as backportpackage is using Build-Depends from newer Ubuntu version.

Anyway i wouldn't worry about Precise ATM too much. Trusty and Vivid would be a good start. As for Precise i will investigate tomorrow what would be the most elegant solution to overcome the issue.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: PPA support for more advanced Eigen (SparseQR)

Post by abdullah »

I just downloaded the deb package of Trusty (which is my current distribution) and installed via dpkg -i. SparseQR is enabled now.

Code: Select all

Sketcher::setUpSketch()-T:0
Sketcher::Solve()-LevenbergMarquardt-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 52, Constr: 23, Rank: 22
LM: eps: 1e-10, eps1: 1e-80, tau: 1e-80, convergence: 1e-10, xsize: 50, maxIter: 100
You can check this PPA by adding it:
sudo add-apt-repository ppa:abdullah-tahiri-yo/freecadtesting

remember to update and install afterwards...

Notes:
1. The code corresponds to one of my development branchs, so it is not master, it is a recent master with the array/symmetry support.
2. The version information shown in FC is wrong, because I just used the one of the FC PPA.

I only see advantages for including this libeigen. Let me know your impressions and give me a GO to make the corresponding changes in the real PPA for Trusty and Vivid (or tell me not to ;) ).
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: PPA support for more advanced Eigen (SparseQR)

Post by sgrogan »

abdullah wrote:I only see advantages for including this libeigen. Let me know your impressions and give me a GO to make the corresponding changes in the real PPA for Trusty and Vivid (or tell me not to ʱ?? ).
I vote for giving a go.
"fight the good fight"
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: PPA support for more advanced Eigen (SparseQR)

Post by triplus »

abdullah wrote:I just downloaded the deb package of Trusty (which is my current distribution) and installed via dpkg -i. SparseQR is enabled now.

Code: Select all

Sketcher::setUpSketch()-T:0
Sketcher::Solve()-LevenbergMarquardt-T:0
EigenSparseQR, Threads: 1, Vectorization: On, Pivot Threshold: 1e-13, Params: 52, Constr: 23, Rank: 22
LM: eps: 1e-10, eps1: 1e-80, tau: 1e-80, convergence: 1e-10, xsize: 50, maxIter: 100
You can check this PPA by adding it:
sudo add-apt-repository ppa:abdullah-tahiri-yo/freecadtesting

remember to update and install afterwards...

Notes:
1. The code corresponds to one of my development branchs, so it is not master, it is a recent master with the array/symmetry support.
2. The version information shown in FC is wrong, because I just used the one of the FC PPA.

I only see advantages for including this libeigen. Let me know your impressions and give me a GO to make the corresponding changes in the real PPA for Trusty and Vivid (or tell me not to ;) ).
Can confirm adding/removing PPA works as expected on Trusty. SparseQR is now supported.
sgrogan wrote:
abdullah wrote:I only see advantages for including this libeigen. Let me know your impressions and give me a GO to make the corresponding changes in the real PPA for Trusty and Vivid (or tell me not to ʱ?? ).
I vote for giving a go.
+1

As for Precise i evaluated the options and i do believe in this specific use case you should simply copy the binary package from Trusty to Precise. Alternative would be to make appropriate changes to satisfy renamed build dependency locally but i don't think it's worth fiddling with this. Therefore test this on your PPA first and if Precise FreeCAD build succeeds do the same on official PPA.

http://askubuntu.com/questions/30145/pp ... le-distros

Remember to select the option Copy existing binaries and after don't trigger re-build for Eigen. After daily PPA is up an running probably stable PPA could receive the same treatment to prepare it for hopefully by the end of the year new stable release. But that can always be done at that time.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: PPA support for more advanced Eigen (SparseQR)

Post by jmaustpc »

abdullah wrote:I only see advantages for including this libeigen. Let me know your impressions and give me a GO to make the corresponding changes in the real PPA for Trusty and Vivid (or tell me not to ʱ?? ).
What you said, Abdullah, sounds reasonable to me. Except I think want the newer libEigen_dev on 12.04 so that all my compiled FreeCADs get to use it as well.

I was wondering if there is already a PPA with a newer eigen and there are.... but I think they are still older than you want. I had a look here
https://launchpad.net/ubuntu/+source/eigen3
and clicked on the link at the bottom
"Other versions of 'eigen3' in untrusted archives."

The most advanced of the three for 12.04 is only 3.2.0_8.

So now I am wondering if perhaps we could be better off adding it to the PPA in full despite my earlier concerns? :)

This would allow for the scenario of those wanting to compile their own FreeCAD and not want the PPA version of FreeCAD. They could add the PPA then only install/update Eigen. What do you think?

Jim
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: PPA support for more advanced Eigen (SparseQR)

Post by abdullah »

There we go folks!...
jmaustpc wrote:What you said, Abdullah, sounds reasonable to me. Except I think want the newer libEigen_dev on 12.04 so that all my compiled FreeCADs get to use it as well.
I have just "copied" the "source packages" to Daily-builds for Trusty and Vivid and it is "building" the source packages (not building FC, that will happen according to its schedule). This should provide SparseQR for Trusty and Vivid tomorrow.

I am just making a test of Triplus' link to do a "copy binary only" to precise to check if it works. I will post in some minutes about this.
jmaustpc wrote:I was wondering if there is already a PPA with a newer eigen and there are.... but I think they are still older than you want. I had a look here
https://launchpad.net/ubuntu/+source/eigen3
I might sound a little bit weird, but I think that for the sake of testing and debugging it is best if all the three series (Precise, Trusty and Vivid) use the same library (funny enough, if we start giving FC PPA support for Willy, it will have also the same version. Why aren't we giving support for Willy?). Apart from that, there are a lot of SparseQR related small fixes prior to 3.2.5. Once we have to do the work it is best that we tailor it to our needs.
jmaustpc wrote:So now I am wondering if perhaps we could be better off adding it to the PPA in full despite my earlier concerns? :)

This would allow for the scenario of those wanting to compile their own FreeCAD and not want the PPA version of FreeCAD. They could add the PPA then only install/update Eigen. What do you think?
That is indeed another advantage of it. Although installing Eigen from source is easy, it is easier to get it from a trusted repo via PPA... and guess what?... those who compile against this PPA source will also have the same version of eigen as the PPA has... :D
triplus wrote:As for Precise i evaluated the options and i do believe in this specific use case you should simply copy the binary package from Trusty to Precise. Alternative would be to make appropriate changes to satisfy renamed build dependency locally but i don't think it's worth fiddling with this. Therefore test this on your PPA first and if Precise FreeCAD build succeeds do the same on official PPA.

http://askubuntu.com/questions/30145/pp ... le-distros

Remember to select the option Copy existing binaries and after don't trigger re-build for Eigen. After daily PPA is up an running probably stable PPA could receive the same treatment to prepare it for hopefully by the end of the year new stable release. But that can always be done at that time.
Thank you very much. I have used this option to just copy (source copy) the packages already in my sandbox to FC-maintainers. Additionally, I am using the "binary copy" in my sandbox. Currently it is compiling FC for Precise using this binary copy. Let's see. If it works then I will do the same for FC and ask a volunteer that has 12.04 LTS installed...
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: PPA support for more advanced Eigen (SparseQR)

Post by abdullah »

That was fast Launchpad!!!

I need a volunteer using 12.04 LTS to:
1. Add my personal PPA:
sudo add-apt-repository ppa:abdullah-tahiri-yo/freecadtesting

2. Update and install freecad

3. Enable the advanced solver dialog in preferences, enable debug to "iteration level", open the report window, solve the sketch and look for the "SparseQR line" as shown a couple of posts ago.

Let me know if it works. :D
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: PPA support for more advanced Eigen (SparseQR)

Post by jmaustpc »

abdullah wrote:That was fast Launchpad!!!

I need a volunteer using 12.04 LTS to:
1. Add my personal PPA:
sudo add-apt-repository ppa:abdullah-tahiri-yo/freecadtesting

2. Update and install freecad

3. Enable the advanced solver dialog in preferences, enable debug to "iteration level", open the report window, solve the sketch and look for the "SparseQR line" as shown a couple of posts ago.

Let me know if it works. :D
I am doing it now...but I assume I should first remove the official PPA... back in a bit

PS I hate these silly names for Ubuntu versions ... who can tell what is what but numbers are obvious 12.04...12, year ...04 month. And then you can tell what order they are in. I really wish Ubuntu would forget their distro names or at least always quote the numbers, I am forever having to look up wiki pedia when try to work with PPAs and the like to work out which silly name is which number.... Great I feel much better now I have said that. should have told Ubuntu though! :D
Post Reply