← Back to team overview

yade-dev team mailing list archive

Re: High precision Real and minieigen

 

Hi,

Vaclav has accepted my pull request to minieigen. The macro name is
now `_HIGH_PRECISION_SUPPORT`, instead of `MINIEIGEN_OVERRIDE`.
I will update the code.

Anton, what are the perspectives of updating debian/ubuntu package?

Please remember about `python3-minieigen.install` file with content:

   src/*pp usr/include/minieigen/

it is not part of [2], but belongs to packaging process.

Vaclav suggests that we make minieigen a part of yade build.
Personally I like the fact that it is a separate pacakge. However
maybe we need to think about forking it into gitlab [3] as a fourth
repository (we have yadedaily, docker-yade, trunk). And change the
upstream for minieigen package.

I don't expect more changes in minieigen. It all works now. However
some code from py/wrapper/customConverters.cpp could be safely moved
there. So moving minieigen to yade-dev would allow some more cleanup.

best regards
Janek

[1] https://github.com/eudoxos/minieigen/pull/24
[2] https://github.com/eudoxos/minieigen
[3] https://gitlab.com/yade-dev

Janek Kozicki (yade) said:     (by the date of Mon, 3 Feb 2020 15:48:19 +0100)

> In the attachment are the minimal minieigen patches:
> 
> These are the super-minimal necessary patches:
> 
> 1. 50_fix_minieigen_agnostic_to_Real.patch
> 2. 52_fix_convertible_Scalar_types.patch
> 3. python3-minieigen.install
> 
> This one is not strictly necessary. It's just a bugfix. The Vector4r
> was broken, because 4th argument to the constructor was missing:
> 
> 4. 51_fix_Vector4r.patch
> 
> Sorry for the mixed numbering of patches, I preferred to keep the
> original (old) patch numbers.
> 
> 
> I am nicely surprised that these patches turned out to be so small.
> I just learned that when compiling with #included external library
> files the 'unused variable' warning is muted by g++. And so the
> largest patch is not necessary. Other patches which I had here
> initially were concerning the fixes of AlignedVector3. But for now we
> don't use it. We have make_SSE vectorization in [4] without it.
> 
> 
> I am really sorry for the delay. I wanted to be 100% sure that all
> pipelines pass. (there were some problems with the build servers).
> 
> Anton, can you apply these patches to the minieigen package?
> 
> 
> In a couple of days I should also submit a merge request to minieigen upstream.
> 
> The latest pipeline [1] passes with a super-minimal set of patches [2][3].
> 
> The MR 383 [1] can be merged after all the others are merged. It will
> then have only couple of commits. Also then I will rearrange the
> pipeline a bit, so that there are fewer asan tests, but they will be rotating.
> Currently they use [5] 'debian-bullseye-SMALLEST-PATCH-minieigen' build image.
> 
> best regards
> Janek
> 
> 
> [1] https://gitlab.com/yade-dev/trunk/-/merge_requests/383/pipelines
> [2] https://gitlab.com/yade-dev/docker-yade/commit/a3accab668a4896bff4e5ec1fdf0df6b741d638c
> [3] https://gitlab.com/yade-dev/trunk/-/merge_requests/383/diffs?commit_id=fff0dc8fda163d57f8816e61201660cd3b6a0a38
> [4] https://gitlab.com/yade-dev/trunk/-/merge_requests/362
> [5] https://gitlab.com/yade-dev/docker-yade/container_registry
> 
> Janek Kozicki (yade) said:     (by the date of Mon, 27 Jan 2020 21:38:09 +0100)
> 
> > Hi Anton,
> > 
> > > Can we avoid it somehow? minieigen sources were in Yade tree many years
> > > ago and we managed to drop them, introducing minieigen packages.
> > > It would not be the best variant to put them in the source again.
> > 
> > Another solution is that you will include these patches [1] in the debian
> > and ubuntu package until Vaclav accepts my merge request (which I
> > will prepare in two or three days).
> > 
> > I will review these patches again to see if they can be made smaller
> > than they currently are. And I will let you know by Wednesday evening.
> > (tomorrow I have lectures and a meeting).
> > 
> > Please note that file [2] installs the source files
> > in /usr/include/minieigen, they are needed. And also that's why [3]
> > is necessary. To partially avoid this we could work on preparing
> > `long double` and `float128` versions of minieigen package.
> > But for MPFR and boost::multiprecision::cpp_bin_float these sources are
> > still necessary because the precision is specified during compilation.
> > 
> > best regards
> > Janek
> > 
> > BTW: you have write access to [4]
> > 
> > [1] https://gitlab.com/cosurgi/minieigen-real/tree/master/patches
> > [2] https://gitlab.com/cosurgi/minieigen-real/blob/master/patches/python3-minieigen.install
> > [3] https://gitlab.com/cosurgi/minieigen-real/blob/master/patches/54_fix_compilation_warnings.patch
> > [4] https://gitlab.com/cosurgi/minieigen-real
> > 
> > 
> > 
> > 
> > Anton Gladky said:     (by the date of Mon, 27 Jan 2020 21:07:15 +0100)
> > 
> > > Hi Janek,
> > > 
> > > > BTW, Anton did you notice that building debian package fails on
> > > > master due to missing python-gts?
> > > > https://gitlab.com/yade-dev/trunk/issues/139
> > > 
> > > please review this MR [1]. It fixes build-dependency problem and also
> > > --help regression introduced with "--stdperformance" option.
> > > 
> > > > And in meantime I will include minieigen sources in yade tree, just
> > > > like we did with python-gts. By this way it will work for everyone
> > > > without dependency hell, until the changes are in official minieigen
> > > > repository.
> > > 
> > > Can we avoid it somehow? minieigen sources were in Yade tree many years
> > > ago and we managed to drop them, introducing minieigen packages.
> > > It would not be the best variant to put them in the source again.
> > > 
> > > [1] https://gitlab.com/yade-dev/trunk/-/merge_requests/396
> > > 
> > > Regards
> > > 
> > > Anton
> > > 
> > > Am Mo., 27. Jan. 2020 um 16:26 Uhr schrieb Janek Kozicki (yade)
> > > <jkozicki-yade@xxxxxxxxx>:
> > > >
> > > > Anton Gladky said:     (by the date of Thu, 23 Jan 2020 06:44:02)
> > > >
> > > > > I do really appreciate this kind of work!
> > > > > But how can we rely on custom builds of the third party software?
> > > > > Sorry, but this restriction will get Yade into the dependency hell.
> > > >
> > > > Yes, I completely agree with this premise. I will prepare merge
> > > > request for Vaclav in https://github.com/eudoxos/minieigen
> > > >
> > > > And in meantime I will include minieigen sources in yade tree, just
> > > > like we did with python-gts. By this way it will work for everyone
> > > > without dependency hell, until the changes are in official minieigen
> > > > repository.
> > > >
> > > > thanks a lot for your work.
> > > >
> > > > best regards
> > > > Janek
> > > >
> > > > BTW, Anton did you notice that building debian package fails on
> > > > master due to missing python-gts?
> > > > https://gitlab.com/yade-dev/trunk/issues/139
> > > >
> > > >
> > > > Janek Kozicki (yade) said:     (by the date of Mon, 13 Jan 2020 22:34:25 +0100)
> > > >
> > > > > Hi, the code for high precision is complete and passes all the tests.
> > > > >
> > > > > I am writing documentation for this now, I will mention there:
> > > > > - about VTK ↔ double compatibility
> > > > > - about GLViewer ↔ double compatibility
> > > > > - how to build and run high precision code
> > > > >
> > > > > I have separated most of this work in to several "topic" merge
> > > > > requests, so that you can check each of them separately. The general
> > > > > idea is that "if you don't use high-precision then the old behavior
> > > > > remains". Meaning that I avoid modifying existing code, only add some
> > > > > sort of redirection and conversion layer that vanishes (is optimized
> > > > > away) completely when HP is not used.
> > > > >
> > > > > There are some changes still not extracted into separate merge
> > > > > requests from !366. I will continue working on this and writing documentation.
> > > > >
> > > > > These are ready for you to review:
> > > > >
> > > > > * The last remaining double to Real changes.
> > > > >   https://gitlab.com/yade-dev/trunk/merge_requests/376
> > > > >
> > > > > * Print time spent on each of the --checks
> > > > >   https://gitlab.com/yade-dev/trunk/merge_requests/375
> > > > >   (a very short one, that's because I needed to make Lubrication tests faster in !366)
> > > > >
> > > > > * Ensure that VTK is compatibile with Real.
> > > > >   https://gitlab.com/yade-dev/trunk/merge_requests/377
> > > > >
> > > > > * OpenGL Real compatibility
> > > > >   https://gitlab.com/yade-dev/trunk/merge_requests/378
> > > > >
> > > > > * Another step towards enabling high precision Real
> > > > >   https://gitlab.com/yade-dev/trunk/merge_requests/362
> > > > >
> > > > > * Enable vectorization
> > > > >   https://gitlab.com/yade-dev/trunk/merge_requests/365
> > > > >
> > > > > They can be merged to master in any order. If any rebase conflicts
> > > > > arise I will solve them quickly. Maybe !362 and !365 should be merged last,
> > > > > because I tested rebasing it on each of the previous ones.
> > > > >
> > > > >
> > > > > please tell me what you think.
> > > > >
> > > > > best regards
> > > > > Janek
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> > > > > Gdańsk University of Technology
> > > > > Faculty of Applied Physics and Mathematics
> > > > > Department of Theoretical Physics and Quantum Information
> > > > > --
> > > > > http://yade-dem.org/
> > > > > http://pg.edu.pl/jkozicki (click English flag on top right)
> > > > >
> > > > > _______________________________________________
> > > > > Mailing list: https://launchpad.net/~yade-dev
> > > > > Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> > > > > Unsubscribe : https://launchpad.net/~yade-dev
> > > > > More help   : https://help.launchpad.net/ListHelp
> > > >
> > > >
> > > > --
> > > > --
> > > > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> > > > Gdańsk University of Technology
> > > > Faculty of Applied Physics and Mathematics
> > > > Department of Theoretical Physics and Quantum Information
> > > > --
> > > > http://yade-dem.org/
> > > > http://pg.edu.pl/jkozicki (click English flag on top right)
> > 
> > 
> > -- 
> > --
> > Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> > Gdańsk University of Technology
> > Faculty of Applied Physics and Mathematics
> > Department of Theoretical Physics and Quantum Information
> > --
> > http://yade-dem.org/
> > http://pg.edu.pl/jkozicki (click English flag on top right)
> > 
> > _______________________________________________
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help   : https://help.launchpad.net/ListHelp
> 
> 
> -- 
> --
> Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
> Gdańsk University of Technology
> Faculty of Applied Physics and Mathematics
> Department of Theoretical Physics and Quantum Information
> --
> http://yade-dem.org/
> http://pg.edu.pl/jkozicki (click English flag on top right)


-- 
--
Janek Kozicki, PhD. DSc. Arch. Assoc. Prof.
Gdańsk University of Technology
Faculty of Applied Physics and Mathematics
Department of Theoretical Physics and Quantum Information
--
http://yade-dem.org/
http://pg.edu.pl/jkozicki (click English flag on top right)


References