These are chat archives for bluescarni/pagmo_reborn

30th
May 2016
Dario Izzo
@darioizzo
May 30 2016 09:47
@bluescarni ping
Francesco Biscani
@bluescarni
May 30 2016 09:47
pong
Dario Izzo
@darioizzo
May 30 2016 09:47
:) I have finished with my de algos, but still have one warning to fix on breathe shit
I have the signature:
de1220(unsigned int gen = 1u, std::vector<unsigned int> allowed_variants = {2u, 3u, 7u, 10u, 13u, 14u, 15u, 16u}, unsigned int variant_adptv = 1u, double ftol = 1e-6, double xtol = 1e-6, bool memory = false, unsigned int seed = pagmo::random_device::next())
But when producing the docs he complains that:
/home/dario/Documents/PaGMOreborn/doc/sphinx/docs/algorithms/de1220.rst:6: WARNING: Error when parsing function declaration.
If the function has no return type:
  Error in declarator or parameters and qualifiers
  Invalid definition: Expected identifier in nested name. [error at 124]
    pagmo::de1220::de1220(unsigned int gen = 1u, std::vector< unsigned int > allowed_variants = std::vector< unsigned int >{2u, 3u, 7u, 10u, 13u, 14u, 15u, 16u}, unsigned int variant_adptv = 1u, double ftol = 1e-6, double xtol = 1e-6, bool memory = false, unsigned int seed = pagmo::random_device::next ())
I guess its breathe shit no able to understand the initializer list syntax .... If so what to do?
Francesco Biscani
@bluescarni
May 30 2016 09:49
well as a general comment you could start writing std::vector< unsigned int > allowed_variants = {2u, 3u, 7u, 10u, 13u, 14u, 15u, 16u} instead and see if this changes anything
Dario Izzo
@darioizzo
May 30 2016 09:50
you mean spaces?
Francesco Biscani
@bluescarni
May 30 2016 09:50
no you are repeating std::vector
probably it won't fix it, but it's better anyway
it should work
apart from that, you can try 2 things
Dario Izzo
@darioizzo
May 30 2016 09:51
ah now I get you ..., yes it was like that
I added it to try fix the problem, then removed it again
If you look to the original signature its not there
Francesco Biscani
@bluescarni
May 30 2016 09:52
you can put the allowed_variant as a static const member somewhere, like in detail, and then try to use that as default argument
allowed_variants = default_variants
something like that
Dario Izzo
@darioizzo
May 30 2016 09:52
I know, the point is that if I need to not use c++11 cool features because of fucking docs ...
So you propose a workaround?
Francesco Biscani
@bluescarni
May 30 2016 09:53
otherwise you can try to enable clang parsing in doxygen... there's a option in recent doxy versions for that
clang will definitely understand what that means
Dario Izzo
@darioizzo
May 30 2016 09:53
would that work on the CI too?
Francesco Biscani
@bluescarni
May 30 2016 09:53
this fixes it, if the problem is in doxygen
Dario Izzo
@darioizzo
May 30 2016 09:53
I fear its in breathe ...
Francesco Biscani
@bluescarni
May 30 2016 09:53
if the problem is in breathe then I don't know
Dario Izzo
@darioizzo
May 30 2016 09:53
but will try
Francesco Biscani
@bluescarni
May 30 2016 09:54
I think in breathe you can fix it only taking away the init list
Dario Izzo
@darioizzo
May 30 2016 09:54
We can also do the trick we use for using vs typedef
which one is better?
Francesco Biscani
@bluescarni
May 30 2016 09:55
sure... if you have the const static member you can document there what the values contained in it are, with the trick I imagine you just have a placeholder for the actual values
Dario Izzo
@darioizzo
May 30 2016 09:56
k
Francesco Biscani
@bluescarni
May 30 2016 09:56
but I don't know, to use the static member probably you need to go through a template of some kind to avoid having to init it in a .cpp
Dario Izzo
@darioizzo
May 30 2016 09:57
yes, I remember the trick used also in rng.hpp
I will try the static shit
Francesco Biscani
@bluescarni
May 30 2016 09:57
ok... I'll be away for a couple of hours at least
Dario Izzo
@darioizzo
May 30 2016 09:57
:) see ya
Francesco Biscani
@bluescarni
May 30 2016 09:57
stupid shit work
Dario Izzo
@darioizzo
May 30 2016 11:35
implementation of the differential evolution algorithms, I finalized it with the last commit and removed the WIP. Its up to you @bluescarni to merge it or review it or both, I guess right?
Francesco Biscani
@bluescarni
May 30 2016 13:30
I'll go through with the review tonigh
@darioizzo in general it's not a good idea to create a branch from an open PR
Dario Izzo
@darioizzo
May 30 2016 13:31
ok, you want me to start from master?
I will delete
Francesco Biscani
@bluescarni
May 30 2016 13:31
nah it's ok, I guess when we have merged the de branch then you can merge master into the new branch and git should understand it
Dario Izzo
@darioizzo
May 30 2016 13:32
ok for this time we try like this then.
The point is that I may need the de stuff for testing the problem stuff ...
Francesco Biscani
@bluescarni
May 30 2016 13:33
couldn't you write the initial testing using SEA?
Dario Izzo
@darioizzo
May 30 2016 13:33
yes, yes ... but I wanted to try a few things on de to check how close I am to old PaGMO
but its not necessary strictly speaking
Francesco Biscani
@bluescarni
May 30 2016 13:34
a good incentive to get the de branch merged soon :)
I will have comments only regarding style and bullshilt like that
Dario Izzo
@darioizzo
May 30 2016 13:35
yeah!! the algorithms are boring as hell you will see
I almost fall asleep while coding them
Francesco Biscani
@bluescarni
May 30 2016 13:35
lol
the people here do a lot of stuff with deep learning, I am wondering if the stuff with audi would be of any interest
Dario Izzo
@darioizzo
May 30 2016 13:36
I am trying also to understand its use for that "direction"
I went deeper into theano today. The parallelization there happens in two "ways".
1) they vectorize the functions so that f([x1, .., xn]) is computed in "parallel"
Francesco Biscani
@bluescarni
May 30 2016 13:38
for how many n?
Dario Izzo
@darioizzo
May 30 2016 13:38
~ 100000
a lot?
Francesco Biscani
@bluescarni
May 30 2016 13:38
as an order of magnitude
righ ok
so not billions
you mean evaluate an expression with multiple values for each symbolic variable right?
like if the expression is x2x^2 you evaluate in [1,2,3] -> [1,4,9]
Dario Izzo
@darioizzo
May 30 2016 13:40
yes
Francesco Biscani
@bluescarni
May 30 2016 13:40
ok
Dario Izzo
@darioizzo
May 30 2016 13:40
So in tbhis case they typically use 32, 256, 512, 1024 (not more)
then there is
2) Each f(x_i) is a theano function, defined as some sort of acyclic graph.
They parallelize this very efficiently if the function is a sum of stuff. (Like matrix multiplication or similar)
Francesco Biscani
@bluescarni
May 30 2016 13:42
you mean they split up the expression in bits and evaluate them in parallel and then gather at the end?
Dario Izzo
@darioizzo
May 30 2016 13:43
In this second use case the size of the matrix is max 10,000x10,000
usually less though
They use the GPU for this and they see a very good speedup already at dimension 100
Francesco Biscani
@bluescarni
May 30 2016 13:44
I don't understand.. they transform the expression in a matrix?
Dario Izzo
@darioizzo
May 30 2016 13:45
They have a library of functions in theano that the user may use
Like dot, sin, cos, convolution, matrix mult
These can be assembled in a user defined function. They have cuda code for all of those
Francesco Biscani
@bluescarni
May 30 2016 13:46
in any case real measure to understand if we can compete is whether or not they get close to the peak of flops a GPU can do
Dario Izzo
@darioizzo
May 30 2016 13:47
What do you mean?
Francesco Biscani
@bluescarni
May 30 2016 13:47
GPUs have peak theoretical performance greater than CPUs, but you need a problem that is amenable to the GPU architecture in order to get close to that maximum
Dario Izzo
@darioizzo
May 30 2016 13:48
ah right .... but matrix multiplication is
Francesco Biscani
@bluescarni
May 30 2016 13:48
but are those sparse or dense matrices?
Dario Izzo
@darioizzo
May 30 2016 13:48
dense
So, here is my thinking:
Francesco Biscani
@bluescarni
May 30 2016 13:49
you sure? it seems strange you can cast arbitrary mathematical expressions (especially if multivariate) into a dense structure
with polynomials for sure you don't do it
Dario Izzo
@darioizzo
May 30 2016 13:49
I never said arbitrary. They have a library of possible functions
matrix mult, dot, convolution etc.
Francesco Biscani
@bluescarni
May 30 2016 13:49
but you still need to compose them, even if you have the primitives
how big are these matrices?
10,000x10,000
Dario Izzo
@darioizzo
May 30 2016 13:50
even smaller, but yes
Francesco Biscani
@bluescarni
May 30 2016 13:50
I still don't understand what's going on really, but ok
Dario Izzo
@darioizzo
May 30 2016 13:53
  • theano is not generic. It operates on a subset of possible functions.
  • Its very efficient because for each of those functions (widely used in interesting applications such as deep learning) it has a specific ad hoc implementation that runs in parallel
Francesco Biscani
@bluescarni
May 30 2016 13:54
you can compose arbitrary expressions in theano or not?
http://arxiv.org/pdf/1211.5590v1.pdf this is a bit old maybe, but it talks a bit about sparse matrices and stuff
Dario Izzo
@darioizzo
May 30 2016 13:57
The question is not about the possibility of composing arbitray functions. Theano is in python so you can.
The question is about the possibility of doing so efficiently/
In theano you can compose arbitrary functions, yes.
But if you want to use the GPUs and be efficient you will not, for example use mul and add to implement a matrix multiplication, but you will use a function from theano library
called theano.dot
This will make use of the GPU and be efficient.
Francesco Biscani
@bluescarni
May 30 2016 14:00
sure, but then this suggests that the GPU can accelerate certain types of expressions involving certain constructs, and it's not a general strategy of making your expression always evaluate faster if you do it on the GPU
Dario Izzo
@darioizzo
May 30 2016 14:01
Indeed, as I said its not generic
Its tailored at linear algebra basically.
Francesco Biscani
@bluescarni
May 30 2016 14:01
like if you are using specific operators (e.g., convolution) and specific objects like matrices
in your expression
Dario Izzo
@darioizzo
May 30 2016 14:01
yes
Francesco Biscani
@bluescarni
May 30 2016 14:02
ok... I understood initially that the matrix thing is a general form into which an expression is brought before processing on the GPU, or something like that
I have seen a few perf graphs and it would seem (but I am not sure) that on average this workload is not the type that benefits from GPU in a multiple-orders-of-magnitude fashion
but meh whatever
I also see frequently references about the inability (or perf degradation) to run with double precision floats (float64)
Francesco Biscani
@bluescarni
May 30 2016 14:07
though that is probably something that has to do with GPU hardware limitations and probably will get better with time
Dario Izzo
@darioizzo
May 30 2016 14:07
thats classic GPU
new cards, apparently sold for scientific computing, are already alleviating the issue
Francesco Biscani
@bluescarni
May 30 2016 14:08
it would also be interesting to know how many of those comparisons with CPU are done with properly vectorized operations
you know this right?
Francesco Biscani
@bluescarni
May 30 2016 14:09
skimmed through it
Dario Izzo
@darioizzo
May 30 2016 14:09
Going back to gduals. If we implement gdual_v([x1,x2,..,xn], "w")
Francesco Biscani
@bluescarni
May 30 2016 14:10
with proper vectorization there's a theoretical 8x speedup on recent intel processors
for double precision
16x for single precision
Dario Izzo
@darioizzo
May 30 2016 14:11
Say we have a
def NN(x):
    blah blah
    return retval
Then we have a first parallelization in doing NN(A GDUAL_V EXPRESSION)
But ...
The NN is also defined internally as a series of multiplications. So for example each neuron's output is obtained by computing a dot product between weights and inputs. That also could be vectorized?
Francesco Biscani
@bluescarni
May 30 2016 14:14
you have to talk to me in terms of polynomials
what I had in mind was to define simply polynomials with coefficients over Rn\mathbb{R}^n rather than just R\mathbb{R}
and with operations defined element-wise
Dario Izzo
@darioizzo
May 30 2016 14:15
I understand that. I am trying to think if this could also be used for a finer parallelization.
Like, if I have v \cdot w
with v and w arrays of 10000 gduals_v
btw theano is now competing with Google's own product Tensor Flow, and apparently losing :) or winning according to others
Francesco Biscani
@bluescarni
May 30 2016 14:18
we could parallelise that yes, just by splitting up the dot product
Dario Izzo
@darioizzo
May 30 2016 14:19
inside the body of NN(x) right?
Francesco Biscani
@bluescarni
May 30 2016 14:19
v and w are just vectors of gduals with vector coefficients right?
Dario Izzo
@darioizzo
May 30 2016 14:19
but not in a transparent way, we whould have to write a parallel for kind of thing ...
Yes
Francesco Biscani
@bluescarni
May 30 2016 14:20
yeah sure... you can write a dot() function that does the parallelisation internally
Dario Izzo
@darioizzo
May 30 2016 14:20
And all would go on CPUs not GPUs correct? I mean we are out of the GPU world .. right?
Francesco Biscani
@bluescarni
May 30 2016 14:21
yes, you cannot represent anything besides vector on the GPU anyway
Dario Izzo
@darioizzo
May 30 2016 14:21
If you write this we can test perf on AI applications (deep learning included) as we have them already on AuDI ....
Francesco Biscani
@bluescarni
May 30 2016 14:21
we need the vectorization and the sparse monomial though, correct?
Dario Izzo
@darioizzo
May 30 2016 14:22
We could see what speedups one gets from the user point of view (i.e. not theoretical)
yes
the sparse monomial not necessarily ... we culd start withou
t
Francesco Biscani
@bluescarni
May 30 2016 14:22
the vector stuff is quicker to do yeah
Dario Izzo
@darioizzo
May 30 2016 14:27
then lets try
If we get a factor 40 (half the theoretical 80 = 16 * 5) its a huge step forward
16 from vectorization 5 form getting rid of the 80% overhead
Francesco Biscani
@bluescarni
May 30 2016 14:30
too much stuff
Dario Izzo
@darioizzo
May 30 2016 14:30
i know
but its all cool :) !
Francesco Biscani
@bluescarni
May 30 2016 14:30
I have a shitty day job as well you know :)
Dario Izzo
@darioizzo
May 30 2016 14:31
But sell this for deep learning
I thought thats the idea
deep learning without GPUs ... :)
Francesco Biscani
@bluescarni
May 30 2016 14:31
meh
fucking fashionable topics
Dario Izzo
@darioizzo
May 30 2016 14:32
this will stay believe me
may be rebranded, but it will stay
Francesco Biscani
@bluescarni
May 30 2016 14:33
:)
I like stuff like elliptic functions, I cannot get excited by a gradient
Dario Izzo
@darioizzo
May 30 2016 14:33
stochastic
Francesco Biscani
@bluescarni
May 30 2016 14:33
anti-mathematical stochasti programming :)
Dario Izzo
@darioizzo
May 30 2016 14:33
plus the world is linear dude
Funny fact: NN started with sigmoids (at least some non linearities there)
Deep Learning: one of the tricks that allowed networks to become more learnable is to get rid of the sigmoid in favour of RLu
What is a RLu?
Computer hates non linearities :)
Francesco Biscani
@bluescarni
May 30 2016 14:35
we should be thankful that at least some stuff was figured out before we had the shitty computers... I wonder if Kepler would be doing poincare' sections of 2-body problems had the timelines been different
Dario Izzo
@darioizzo
May 30 2016 14:35
lol
He would realize its just a point I guess ....
Or maybe not :)
Francesco Biscani
@bluescarni
May 30 2016 14:36
Newton would probably be in fast equity trading and making bank :)
anyway it looks like we need eigen 3.3 (unreleased) for AVX support
and the AVX 512 stuff is not clear in which processors is implemented
Dario Izzo
@darioizzo
May 30 2016 14:40
SO AVX is the possiblitity to use vectorization in intel processors right?
Francesco Biscani
@bluescarni
May 30 2016 14:40
so realistically right now it would be a 4x speedup for double precision, with more in the future
yes
Dario Izzo
@darioizzo
May 30 2016 14:40
plus the overhead thingy
Francesco Biscani
@bluescarni
May 30 2016 14:40
yes
Dario Izzo
@darioizzo
May 30 2016 14:41
would be great
Already fucking DACE and COSY would be a satisfaction ... :)
Francesco Biscani
@bluescarni
May 30 2016 14:42
we are already in the same order of magnitude... it could be more if we used 100x times the memory we use now, as they do
Dario Izzo
@darioizzo
May 30 2016 14:43
I know. So if we get > 10x we win
Francesco Biscani
@bluescarni
May 30 2016 14:43
but still for the typical use cases of DACE/COSY it does not matter, because they don't care about computing multiple values at once, or do they?
Dario Izzo
@darioizzo
May 30 2016 14:44
they do they do
As i said, their gduals are the initial conditions
then they build a map
We can now run in parallel several initial conditions
which means we can then obtain several maps to patch into one with with larger convergence radius
Francesco Biscani
@bluescarni
May 30 2016 14:45
well it's like being able to run different numerical integrations at once, but it's not like you always need to do that... maybe you just want to propagate 1 orbit?
or whatever I barely understand
:)
Dario Izzo
@darioizzo
May 30 2016 14:45
So what they do is to run only one numerical integration.
To obtain a polinomial representation of the final state (w.r.t. the initial conditions)
They use this map to avoid integrating again
We would do the same, except we get more initial conditions at a time, so several polinomials that desccribe the end state.
We can patch those polinomials to get a much better representation of the end state w.r.t. the initial conditions.
Do you follow me?
brb
Francesco Biscani
@bluescarni
May 30 2016 14:49
no but I trust you :)
Marcus Märtens
@CoolRunning
May 30 2016 17:27
I think, I get some numerics bullshit with the hypervolume...
Is there a recommended way of dealing with the issue that 12.00000000001 is not 12 when it comes to BOOST_CHECK?
I would define an epsilon error and check whether the difference is below...
This message was deleted
Dario Izzo
@darioizzo
May 30 2016 17:49
There is BOOST_CHECK_CLOSE(a,b, tol)
I use it quite a lot since floating point comparison otherwise always fail
Marcus Märtens
@CoolRunning
May 30 2016 17:49
Ohhh... that sounds useful?
I will try that
Dario Izzo
@darioizzo
May 30 2016 17:49
Only problem is that it works only for a and b fundamental types
so for vectors you need to put the test in a range based loop
Marcus Märtens
@CoolRunning
May 30 2016 17:50
Should be fine... I only want to test the hypervolumes
Dario Izzo
@darioizzo
May 30 2016 17:50
I currenyl set tol 1e-8 (lousy) but at the end its all random anyway !
Marcus Märtens
@CoolRunning
May 30 2016 17:50
Unfortunately
The error seems severe
Like, the hypervolume should be 373.21228
And I get stuff like 341.46
wtf?
Dario Izzo
@darioizzo
May 30 2016 17:52
set tol to 1000 then :) -> ticket closed :)
Marcus Märtens
@CoolRunning
May 30 2016 17:52
Another case is even more peculiar... hypervolume should be 16
and it gives sometimes 15, sometimes 16
Dario Izzo
@darioizzo
May 30 2016 17:52
holy fuck
Marcus Märtens
@CoolRunning
May 30 2016 17:52
There must be bullshit going on
Dario Izzo
@darioizzo
May 30 2016 17:52
how are you even going to debug this?
I do not envy you
Marcus Märtens
@CoolRunning
May 30 2016 17:53
...
I don't believe this was happening during GSoC
But what the hell is different now? The code is copy and slightly modified paste
Dario Izzo
@darioizzo
May 30 2016 17:54
conversions ... maybe an int that had to be int and is now unsigned? Try to isolate one simple case where this fails
something involving a few lines of code .. is it possible?
Marcus Märtens
@CoolRunning
May 30 2016 17:55
I have a hunch where it fails
Dario Izzo
@darioizzo
May 30 2016 17:55
Thats already something
Marcus Märtens
@CoolRunning
May 30 2016 17:55
As the hypervolumes are computed by different algorithm for different dimensions
I sort of can exclude the ones for 2d and 3d
This thing happens at higher dimensions
Which unfortunately does not make debugging it any easier
Dario Izzo
@darioizzo
May 30 2016 17:56
so the recursive shit?
Marcus Märtens
@CoolRunning
May 30 2016 17:56
indeed
The recursive shit
I wonder, whether I should scrap this
And do it from scratch
Dario Izzo
@darioizzo
May 30 2016 17:56
well you now know better
maybe scrap only the recursive algo>
?
Marcus Märtens
@CoolRunning
May 30 2016 17:57
Yes, the recursive one
The rest seems fine
but the recursive one is also the one that pointers around an awful lot.
Dario Izzo
@darioizzo
May 30 2016 17:57
then I would do it its only a few lines
ah ops
sometimes it does get 16 ...
its a start
At least you have test to check your shit .... with DE I blindly coded three algorithms and have no way of knowing if all is good except "it compiles"
Marcus Märtens
@CoolRunning
May 30 2016 17:59
DE is just untestable
But testing this is tricky business as well... I have to rely on some computations... shall I rely on the old PaGMO?
If not, I need some other hv-code... shall I trust them?
Dario Izzo
@darioizzo
May 30 2016 18:01
old PaGMO is reliable
users have used it and did not complain
Also, why not having a manually assembled test case where you know the answer
like [1,0,0,0][0,1,0,0][0,0,1,0][0,0,0,1] ref [1,1,1,1]
is this not known to be .... something easy?
Marcus Märtens
@CoolRunning
May 30 2016 18:03
Yes, they work... I mean, for the 16 case it is basically [2,2,2,2] and [0,0,0,0]
It is definitely not 15
Dario Izzo
@darioizzo
May 30 2016 18:03
then ....
there is your answer
Marcus Märtens
@CoolRunning
May 30 2016 18:04
Yeah - there must be some conversion going on to int
That is my guess
Dario Izzo
@darioizzo
May 30 2016 18:04
I did change a number of them "randomly" so it may also be that I inserted the bug
Marcus Märtens
@CoolRunning
May 30 2016 18:05
The error is also not reproducible with old PaGMO, which is good.
This circular dependence problem is still not solved "good" as well
Now the best_compute method is in hv3d
it should be in hypervolume_class
but it can't
Good thing my hairs are too short to pull them out.
Dario Izzo
@darioizzo
May 30 2016 18:07
can you do a commit?
so that I can see?
Marcus Märtens
@CoolRunning
May 30 2016 18:08
Yes, possible. Though hypervolume tests are obviously failing.
Dario Izzo
@darioizzo
May 30 2016 18:08
who cares its your WIP branch it is assumed to be failing
Marcus Märtens
@CoolRunning
May 30 2016 18:08
true - one second
btw: have you tried to put the presentation on the webserver?
pushed the hv-branch
There is some debug-printouts in the tests
Dario Izzo
@darioizzo
May 30 2016 18:10
I tried the pres yesterday using the git clone trick
Marcus Märtens
@CoolRunning
May 30 2016 18:11
I know... I just want it to be online available somewhere. Well, I guess I can also figure out how to put it on my mediocre website.
Dario Izzo
@darioizzo
May 30 2016 18:14
Ah you want me to put it on sophia .... ?
Lets try now
Marcus Märtens
@CoolRunning
May 30 2016 18:14
Yes, would be cool.
I need to update it at some point, but it is better than nothing for now.
And I want to show Kiryx
Probably need to git clone the revealJS library in the same folder as well.
Maybe something goes haywire because of the autos you introduced to hvwfg?
what was the clone address?
Dario Izzo
@darioizzo
May 30 2016 18:22
dpne
done
Marcus Märtens
@CoolRunning
May 30 2016 18:24
Beautiful! :star2: :star2: :star2:
Dario Izzo
@darioizzo
May 30 2016 18:24
Did you change the CMake?
Marcus Märtens
@CoolRunning
May 30 2016 18:25
Yes
Dario Izzo
@darioizzo
May 30 2016 18:25
Id does not compile here, I get a linker error undefined ref to main !!
what did you change?
Marcus Märtens
@CoolRunning
May 30 2016 18:25
yeah... there is this little thing with Boost I have to add
otherwise I get error

add_definitions(-DBOOST_TEST_DYN_LINK)

holy fuck
#add_definitions(-DBOOST_TEST_DYN_LINK)
uncomment that
in tests/CMakeLists.txt
I fixed the bug
Dario Izzo
@darioizzo
May 30 2016 18:28
really !! bravo :clap:
Marcus Märtens
@CoolRunning
May 30 2016 18:28
It seems so
Dario Izzo
@darioizzo
May 30 2016 18:28
the last one?
or there are more?
Marcus Märtens
@CoolRunning
May 30 2016 18:28
There are more
well
Dario Izzo
@darioizzo
May 30 2016 18:28
always!
Marcus Märtens
@CoolRunning
May 30 2016 18:28
I am not aware of more bugs
Lets put it like that
Dario Izzo
@darioizzo
May 30 2016 18:28
well here I cannot compile as there are too many warnings for signedness shit
but .. ok... if all tests pass it should be it right?
Marcus Märtens
@CoolRunning
May 30 2016 18:29
You (?) must have done something to this
bool wfg::cmp_points(double* a, double* b) const
{
    for(int i = m_current_slice - 1; i >= 0 ; --i){
        if (a[i] > b[i]) {
            return true;
        } else if(a[i] < b[i]) {
            return false;
        }
    }
    return false;
}
Dario Izzo
@darioizzo
May 30 2016 18:29
The tests were quite comprehenc=sive
Marcus Märtens
@CoolRunning
May 30 2016 18:30
line 266 in hvwfg
Dario Izzo
@darioizzo
May 30 2016 18:30
and?
Francesco Biscani
@bluescarni
May 30 2016 18:30
that reveal.js stuff, you do it with the online editor or just with a normal text editor?
Marcus Märtens
@CoolRunning
May 30 2016 18:30
I basically reverted it and changed a bit the types to avoid the warning-error
Dario Izzo
@darioizzo
May 30 2016 18:30
Thats the loop I asked you check remember?
Marcus Märtens
@CoolRunning
May 30 2016 18:30
Now inaccuracies are gone
No :D
Did you do such a thing?
But now I did, so I subconciously remembered
@bluescarni What do you mean?
Dario Izzo
@darioizzo
May 30 2016 18:31
:) btw its undefined behaviour like this right @bluescarni
Marcus Märtens
@CoolRunning
May 30 2016 18:31
This is just an IPython notebook converted to a presentation powered by RevealJS
Francesco Biscani
@bluescarni
May 30 2016 18:32
I wanted to know how one writes these revealjs presentations
Dario Izzo
@darioizzo
May 30 2016 18:32
We want to see the IPythin notebook ...
Marcus Märtens
@CoolRunning
May 30 2016 18:32
There is really not much about it
Francesco Biscani
@bluescarni
May 30 2016 18:32
no I'd like to know how one starts from scratcg
without going through a notebook
Dario Izzo
@darioizzo
May 30 2016 18:33
open ipython?
Francesco Biscani
@bluescarni
May 30 2016 18:33
just interested in the technology
Dario Izzo
@darioizzo
May 30 2016 18:33
write something?
convert?
Francesco Biscani
@bluescarni
May 30 2016 18:33
reveal js does not originale from notebook as far as I know
*originate
Marcus Märtens
@CoolRunning
May 30 2016 18:33
True, it does not
Francesco Biscani
@bluescarni
May 30 2016 18:33
it's just a tool to write presentations yo can display in the brwser
Marcus Märtens
@CoolRunning
May 30 2016 18:33
It is in general even more powerful
Francesco Biscani
@bluescarni
May 30 2016 18:33
and I wanted to know how one write these presentations in the general case
Marcus Märtens
@CoolRunning
May 30 2016 18:34
I don't know :D
Francesco Biscani
@bluescarni
May 30 2016 18:34
ok fair nuff :)
Marcus Märtens
@CoolRunning
May 30 2016 18:34
I guess, you would write them with an HTML-editor
there are like css-classes for slides etc.
I guess
Francesco Biscani
@bluescarni
May 30 2016 18:34
there's an online editor apparently, but I wanted to know how real men do it :)
Marcus Märtens
@CoolRunning
May 30 2016 18:34
But converting IPython notebooks is much cooler
And I love how these presentations feel
Francesco Biscani
@bluescarni
May 30 2016 18:35
how does it decide where to split the slides?
Dario Izzo
@darioizzo
May 30 2016 18:35
Real man code in Erlang
not like c++ pussies
Francesco Biscani
@bluescarni
May 30 2016 18:35
everything is in javascript these days
we should compile pagmo into js
Marcus Märtens
@CoolRunning
May 30 2016 18:35
When I was working on it, I frequently had the problem, that cells were too large for one slide
Dario Izzo
@darioizzo
May 30 2016 18:35
and back
a few times at least
Marcus Märtens
@CoolRunning
May 30 2016 18:35
So with IPython it is not so good
But if you keep yourself short, it is usually no problem
Francesco Biscani
@bluescarni
May 30 2016 18:36
@darioizzo how was that loop rewritten?
Marcus Märtens
@CoolRunning
May 30 2016 18:36
And yes, Javascript rules
Dario Izzo
@darioizzo
May 30 2016 18:36
    bool cmp_points(double* a, double* b) const
    {
        for (auto i = m_current_slice; i > 0u; --i) {
            if (a[i+1] > b[i+1]) {
                return true;
            }
            else if (a[i+1] < b[i+1]) {
                return false;
            }
        }
        return false;
    }
Francesco Biscani
@bluescarni
May 30 2016 18:37
compared to
bool wfg::cmp_points(double* a, double* b) const
{
    for(int i = m_current_slice - 1; i >= 0 ; --i){
        if (a[i] > b[i]) {
            return true;
        } else if(a[i] < b[i]) {
            return false;
        }
    }
    return false;
}
Dario Izzo
@darioizzo
May 30 2016 18:37
yes
Marcus Märtens
@CoolRunning
May 30 2016 18:37
The current version now (that seems to work) is this:
    bool cmp_points(double* a, double* b) const
    {
        for (size_t i = m_current_slice - 1; i >= 0; --i) {
            if (a[i] > b[i]) {
                return true;
            }
            else if (a[i] < b[i]) {
                return false;
            }
        }
        return false;
    }
Dario Izzo
@darioizzo
May 30 2016 18:38
but i is always >= 0
its a size_t how can this work?
thats why I changed it in the first place
Francesco Biscani
@bluescarni
May 30 2016 18:38
I'd check the code with valgrind or similar
let me do it
Dario Izzo
@darioizzo
May 30 2016 18:39
ok ... then I leave ... later ....
Marcus Märtens
@CoolRunning
May 30 2016 18:40
ciao
I think, the offset is messed
instead of a[i+1] it should be a[i-1] right?
Marcus Märtens
@CoolRunning
May 30 2016 18:45
If you are a CSS buff you can go overboard with RevealJS (http://slides.com/davidkhourshid/deck-17#/)
Francesco Biscani
@bluescarni
May 30 2016 18:47
I am confused, where is the stuff in detail/ included from?
Marcus Märtens
@CoolRunning
May 30 2016 18:48
the code is in hypervolume_hvwfg.hpp
266
Francesco Biscani
@bluescarni
May 30 2016 18:48
I thought I started adding these pragma thingies to disable warnings selectively but cannot find them any more
Marcus Märtens
@CoolRunning
May 30 2016 18:48
maybe because of hv-branch?
Francesco Biscani
@bluescarni
May 30 2016 18:48
I am in the hv branch
Marcus Märtens
@CoolRunning
May 30 2016 18:50
but you found it now, no?
Francesco Biscani
@bluescarni
May 30 2016 18:51
I am still trying to get the code compiled, it's failing because of all the warnings and I cannot understand what happened.. because I distinctly remember adding code to silence the warnings, but it's not there any more
I might be going crazy
Marcus Märtens
@CoolRunning
May 30 2016 18:51
apparently, Dario had also a lot of warnings
strange - for me it works
Francesco Biscani
@bluescarni
May 30 2016 18:52
we are using different compilers
Marcus Märtens
@CoolRunning
May 30 2016 18:52
because we want to be robust :+1:
sanity was never part of the deal, though
Francesco Biscani
@bluescarni
May 30 2016 18:55
who knows
it might be I never committed those
anyway we have out of bounds accesses
➜  build_clang git:(hypervolume) ✗ ./tests/hypervolume       
Running 1 test case...
=================================================================
==5873==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6030000022e8 at pc 0x000000594cd1 bp 0x7fff973a21f0 sp 0x7fff973a21e8
READ of size 8 at 0x6030000022e8 thread T0
    #0 0x594cd0 in pagmo::hvwfg::cmp_points(double*, double*) const /home/yardbird/repos/PaGMOreborn/tests/../include/detail/hypervolume_hvwfg.hpp:269:8
    #1 0x594c09 in _ZZNK5pagmo5hvwfg10compute_hvEjENKUlT_T0_E_clIPdS5_EEDaS1_S2_ /home/yardbird/repos/PaGMOreborn/tests/../include/detail/hypervolume_hvwfg.hpp:236:72
    #2 0x593b61 in _ZN9__gnu_cxx5__ops15_Iter_comp_iterIZNK5pagmo5hvwfg10compute_hvEjEUlT_T0_E_EclIPPdSA_EEbS4_S5_ /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/predefined_ops.h:121:23
    #3 0x59564d in _ZSt16__insertion_sortIPPdN9__gnu_cxx5__ops15_Iter_comp_iterIZNK5pagmo5hvwfg10compute_hvEjEUlT_T0_E_EEEvS7_S7_S8_ /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:1846:8
    #4 0x592b43 in _ZSt22__final_insertion_sortIPPdN9__gnu_cxx5__ops15_Iter_comp_iterIZNK5pagmo5hvwfg10compute_hvEjEUlT_T0_E_EEEvS7_S7_S8_ /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:1889:2
    #5 0x5921e1 in _ZSt6__sortIPPdN9__gnu_cxx5__ops15_Iter_comp_iterIZNK5pagmo5hvwfg10compute_hvEjEUlT_T0_E_EEEvS7_S7_S8_ /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:1970:4
    #6 0x58bc35 in _ZSt4sortIPPdZNK5pagmo5hvwfg10compute_hvEjEUlT_T0_E_EvS4_S4_S5_ /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:4717:7
    #7 0x58a421 in pagmo::hvwfg::compute_hv(unsigned int) const /home/yardbird/repos/PaGMOreborn/tests/../include/detail/hypervolume_hvwfg.hpp:236:4
    #8 0x588362 in pagmo::hvwfg::compute(std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<double, std::allocator<double> > const&) const /home/yardbird/repos/PaGMOreborn/tests/../include/detail/hypervolume_hvwfg.hpp:37:15
    #9 0x536ecc in pagmo::hypervolume::compute(std::vector<double, std::allocator<double> > const&, std::shared_ptr<pagmo::hv_algorithm>) const /home/yardbird/repos/PaGMOreborn/tests/../include/detail/hypervolume_class.hpp:226:14
    #10 0x5363e6 in pagmo::hypervolume::compute(std::vector<double, std::allocator<double> > const&) const /home/yardbird/repos/PaGMOreborn/tests/../include/detail/hypervolume_class.hpp:204:12
    #11 0x5154b6 in hypervolume_test::test_method() /home/yardbird/repos/PaGMOreborn/tests/hypervolume.cpp:88:16
    #12 0x50ae0a in hypervolume_test_invoker() /home/yardbird/repos/PaGMOreborn/tests/hypervolume.cpp:28:1
    #13 0x65842a in boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:118:11
    #14 0x7f6ba138904b in boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (/usr/lib64/libboost_unit_test_framework.so.1.61.0+0x4d04b)
    #15 0x7f6ba13885dc in boost::execution_monitor::catch_signals(boost::function<int ()> const&) (/usr/lib64/libboost_unit_test_framework.so.1.61.0+0x4c5dc)
    #16 0x7f6ba13886d7 in boost::execution_monitor::execute(boost::function<int ()> const&) (/usr/lib64/libboost_unit_test_framework.so.1.61.0+0x4c6d7)
    #17 0x7f6ba1388e39 in boost::execution_monitor::vexecute(boost::function<void ()> const&) (/usr/lib64/libboost_unit_test_framework.so.1.61.0+0x4ce39)
    #18 0x7f6ba13b0d39 in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (/usr/lib64/libboost_unit_test_framework.so.1.61.0+0x74d39)
    #19 0x7f6ba139173b in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) (/usr/lib64/libboost_unit_test_framework.so.1.61.0+0x5573b)
    #20 0x7f6ba13
right in cmp_points
if (a[i+1] > b[i+1]) {
this is the line where it happens
Marcus Märtens
@CoolRunning
May 30 2016 18:57
Jepp - told you, this is messy
should be a[i-1] and b[i-1]
Francesco Biscani
@bluescarni
May 30 2016 18:58
isn't this the same as the original code?
Marcus Märtens
@CoolRunning
May 30 2016 18:58
nope
Francesco Biscani
@bluescarni
May 30 2016 18:58
ah ok... you did not commit your latest version then?
Marcus Märtens
@CoolRunning
May 30 2016 18:59
No, but I will now, okay?
Francesco Biscani
@bluescarni
May 30 2016 18:59
size_t i = m_current_slice - 1; i >= 0; --i is it this one?
Marcus Märtens
@CoolRunning
May 30 2016 19:00
yes... see i start at m_current_slice - 1
In Dario's version, it starts at m_current_slice
so when it comes to a and b you have to substract 1
anyway, I restored the old code
There was not much wrong with it
Shall I commit?
Francesco Biscani
@bluescarni
May 30 2016 19:01
yeah commit it, even though that looks like an infinite loop
Marcus Märtens
@CoolRunning
May 30 2016 19:01
pushed
Try again with this version
Francesco Biscani
@bluescarni
May 30 2016 19:02
I also committed stuff to disable the warnings
/home/yardbird/repos/PaGMOreborn/tests/../include/detail/hypervolume_hvwfg.hpp:268:42: error: comparison of unsigned expression >= 0 is always true
      [-Werror,-Wtautological-compare]
                for (size_t i = m_current_slice - 1; i >= 0; --i) {
                                                     ~ ^  ~
1 error generated.
told you it's an infinite loop :)
Marcus Märtens
@CoolRunning
May 30 2016 19:04
lol
how come that this computes?
Francesco Biscani
@bluescarni
May 30 2016 19:05
it probably gets out of the loop because of the comparisons in it
god bless clang
if you replace it with a while (true) it will probably keep on working
Marcus Märtens
@CoolRunning
May 30 2016 19:06
:D
lets try for fun
ah - I can't
I need that index, you know?
Francesco Biscani
@bluescarni
May 30 2016 19:07
try to put i>=0 || true
:)
Marcus Märtens
@CoolRunning
May 30 2016 19:08
runs perfectly fine
So Clang solves the halting problem? ^^
Francesco Biscani
@bluescarni
May 30 2016 19:09
there has to be a sensible way of writing that loop
Marcus Märtens
@CoolRunning
May 30 2016 19:14
I pushed again
Infinity-loop now without infinity.
Francesco Biscani
@bluescarni
May 30 2016 19:18
This message was deleted
seems to work now
Marcus Märtens
@CoolRunning
May 30 2016 19:24
Excellent :+1:
I am afk, watching GoT... let's see who get's killed this time. :smile:
Dario Izzo
@darioizzo
May 30 2016 20:47
How could the loop end?
Did you grasp the reason? I am curious ....
Marcus Märtens
@CoolRunning
May 30 2016 20:48
what loop?
A - the infinity loop ^^
Dario Izzo
@darioizzo
May 30 2016 20:48
for (size_t i = m_current_slice - 1; i >= 0; --i) {
as I wrote, i is always >=0 since its a size_t
so this should never end.
liked the GoT?
Francesco Biscani
@bluescarni
May 30 2016 20:49
guys
still watcing
no spoil plz
Marcus Märtens
@CoolRunning
May 30 2016 20:49
Says the guy who spoilz all the time :P
Dario Izzo
@darioizzo
May 30 2016 20:49
:) john snows dies
you used to write it in Dota remember?
And it was true you ass !
Marcus Märtens
@CoolRunning
May 30 2016 20:51
The loop compares points
for domination - it has inside return statements that are quite broad
only if a and b are the same points it would run for infinity
But even then
I think what would happen is an overflow in the index
so you would get some garbage by comparing random places in memory to each other
Dario Izzo
@darioizzo
May 30 2016 20:53
ah ok, what a horrible horrible loop kill kiryx
did you use mine at the end? with i-1 ?
Marcus Märtens
@CoolRunning
May 30 2016 20:53
yes
and yes
:)
Now next are contributions of hypervolumes
But hypervolume indicator seems to be okay.
Dario Izzo
@darioizzo
May 30 2016 20:54
you mean the algos for single contributors
Marcus Märtens
@CoolRunning
May 30 2016 20:54
yes
Dario Izzo
@darioizzo
May 30 2016 20:54
should be easier now .... all is in place :)
Marcus Märtens
@CoolRunning
May 30 2016 20:55
It should be straightforward
Francesco Biscani
@bluescarni
May 30 2016 20:55
called it about benjen
Marcus Märtens
@CoolRunning
May 30 2016 20:55
That was an easy one
Dario Izzo
@darioizzo
May 30 2016 20:55
yep ... me too
Marcus Märtens
@CoolRunning
May 30 2016 20:55
A bit weak that they had to rely on this deus ex machina move
And the reasoning he is giving is also a bit far-fetched.
Dario Izzo
@darioizzo
May 30 2016 20:56
and whats that? half dead half alive like a whitewalker?
So now if you get dragon glass in the heart you either become a white stalker or a non dead?
Its confusing ... seems like the type of bullshit lost plot has
Marcus Märtens
@CoolRunning
May 30 2016 20:57
yes
It is a bit shitty
Because Magic is done by amateurs in this series
Francesco Biscani
@bluescarni
May 30 2016 20:57
maybe he's on his way to become a whitey
Marcus Märtens
@CoolRunning
May 30 2016 20:57
It should be a proper science
And not some mumbo-jumbo of wanna-be elves
Dario Izzo
@darioizzo
May 30 2016 20:58
so what? it depends on the size of the dragon glass in your hart? if small you get some months as a kind of trans?
half stalker half human?
Marcus Märtens
@CoolRunning
May 30 2016 20:58
I guess, you need that spiral pattern
If this is not at hand, you do not get the blue eye feature
Francesco Biscani
@bluescarni
May 30 2016 20:58
maybe turning you into a whitey does not make you bad automatically... maybe the night's king is angry for whatever
maybe domino's doesnt deliver past the wall
I'd be mad as hell as well
Dario Izzo
@darioizzo
May 30 2016 20:59
if getting a dragon glass in your heart does not get you angry what does?
lol
Marcus Märtens
@CoolRunning
May 30 2016 20:59
Well, he was getting pierced by some White Walker blade... probably the Dragonglass was the lesser evil.
Dario Izzo
@darioizzo
May 30 2016 21:00
domino delivers also on Mars
free delivery too!
Marcus Märtens
@CoolRunning
May 30 2016 21:00
Next time, we should order by Domino's again... though I will never forget that face of Luís :D
Dario Izzo
@darioizzo
May 30 2016 21:00
And what the fuck did he do all the time behind the wall?
And how did he came to be there at that moment?
Reminded me of Han Solo and the Falcon ....
Lost my ship in the galaxy ....
oh wait there it is !!
Marcus Märtens
@CoolRunning
May 30 2016 21:01
Maybe he was busy doing errands for the Bloodraven?
Feeding all the elves?
Dario Izzo
@darioizzo
May 30 2016 21:02
ah right and now that they are dead finally, he has got some free time
makes sense
Marcus Märtens
@CoolRunning
May 30 2016 21:02
seems legit?
Dario Izzo
@darioizzo
May 30 2016 21:03
btw who the fuck is the Frey prisoner?
Marcus Märtens
@CoolRunning
May 30 2016 21:03
He was saved by them and a Lannister always pays his debt.
Oh, wait... wrong familiy... :smile:
Francesco Biscani
@bluescarni
May 30 2016 21:03
he was the guy who was getting married
Dario Izzo
@darioizzo
May 30 2016 21:03
and why now everybody is going against the tully?
Marcus Märtens
@CoolRunning
May 30 2016 21:03
The groom
Francesco Biscani
@bluescarni
May 30 2016 21:03
I think caityln's brother?
Marcus Märtens
@CoolRunning
May 30 2016 21:03
Correct
Dario Izzo
@darioizzo
May 30 2016 21:03
I do not remember ... but ok I guess
Francesco Biscani
@bluescarni
May 30 2016 21:04
in the book they never took riverrun I think
Marcus Märtens
@CoolRunning
May 30 2016 21:04
Because the Blackfish is dicking around
Francesco Biscani
@bluescarni
May 30 2016 21:04
they were sieging it
Marcus Märtens
@CoolRunning
May 30 2016 21:07
A girl has a problem now.
Dario Izzo
@darioizzo
May 30 2016 21:11
but she got her sword back ....
Marcus Märtens
@CoolRunning
May 30 2016 21:11
That toothpicker ain't gonna make a difference if now literally anyone could murder her. Hope she remembered all those faces from the hall...
Francesco Biscani
@bluescarni
May 30 2016 21:13
Marcus Märtens
@CoolRunning
May 30 2016 21:14
How convenient - I hate clickbait.
Dario Izzo
@darioizzo
May 30 2016 21:15
whats that?
Marcus Märtens
@CoolRunning
May 30 2016 21:17
It is again - spoilers :D
But this time for clickbait
Dario Izzo
@darioizzo
May 30 2016 21:18
SO its a website that trys to make you click on stuff?
Marcus Märtens
@CoolRunning
May 30 2016 21:20
You have this on Facebook a lot
A post that tries to catch your attention, so you click it
"The leg of this man got caught in the mouth of an alligator. You would not believe what happened then?"
Then you click... and then you probably have to click a few times more and fight yourself to figure out what happened.
And it is usually something quite simple that could be explained in one sentence.
No need to pull an entire webpage
So that is clickbait... and this gallery shows post where the clickbait is "spoiled"
Hence, you get the information you seek.
If you cared for it the first place that is.
Dario Izzo
@darioizzo
May 30 2016 21:24
Thanks for the explanation ... :)