These are chat archives for bluescarni/pagmo_reborn

4th
May 2016
Dario Izzo
@darioizzo
May 04 2016 08:39

Remind me what is the reason to write:

for (decltype(x.size()) i = 0u; i < x.size(); ++i)

instead of:

for (auto i = 0u; i< x.size; ++i)
Francesco Biscani
@bluescarni
May 04 2016 08:41
because unsigned might not be the type of x.size()
Dario Izzo
@darioizzo
May 04 2016 08:41
but it will anyway always by an unsigned type right?
maybe long long maybe short short
but it will be unsigned
Francesco Biscani
@bluescarni
May 04 2016 08:42
yes, the problem is the range not the signedness
Dario Izzo
@darioizzo
May 04 2016 08:42
k
Dario Izzo
@darioizzo
May 04 2016 09:59
Is the construction of a detail::random_engine_type a performance concern?
Francesco Biscani
@bluescarni
May 04 2016 10:01
it does have some internal state, I am not sure about performance
Dario Izzo
@darioizzo
May 04 2016 10:01
I am asking as I can move the creation of a random decision vector outside of the population at the cost of not using the random engine member of pop but constructing a random engine inside the moved function
Francesco Biscani
@bluescarni
May 04 2016 10:05
can't you pass in the RNG as a function argument?
Dario Izzo
@darioizzo
May 04 2016 10:06
yes but it beats the purpose of having it as a separate functionality right? you want to call pagmo::decision_vector(bounds, seed)
Francesco Biscani
@bluescarni
May 04 2016 10:07
if you are already passing in the seed...
Dario Izzo
@darioizzo
May 04 2016 10:07
in python decision_vector([[0,0],[2,5]], 34)
the seed is an integer, the user likes it
what would you pass in python?
The API would be:
  • decision_vector([[0,0],[2,5]]) -> random seed
  • decision_vector([[0,0],[2,5]], 35) -> seed is fixed
Francesco Biscani
@bluescarni
May 04 2016 10:09
well in principle you could pass a python RNG, but then it complicates things... I have the feeling that the cost of constructing the RNG is rather larger than building a decision vector, at least if its size is not very big
the only way would be to measure it
a good solution would be a thread_local global rng to use for this purpose
but stupid OSX does not support thread_local
Dario Izzo
@darioizzo
May 04 2016 10:13
What if i leave it user friendly an possibly inefficient for now (my guess is that the creation of a random decision vector will not be done a lot of times) and if we becomes a problem we study the possibility of having a global rng?
Francesco Biscani
@bluescarni
May 04 2016 10:13
it's fine for me
but as long as OSX does not support the C++11 standard it's going to be a problem to fix it performance wise
Dario Izzo
@darioizzo
May 04 2016 10:14
i though osx had clang
is that not c++11 compliant?
ah, but this is the library right?
no it's a language keyword
disabled by apple engineers
normal clang has it, apple clang does not
Dario Izzo
@darioizzo
May 04 2016 10:15
lol
starting to think osx is worst than windows for c++ development
Francesco Biscani
@bluescarni
May 04 2016 10:15
They don’t want to break ABI compatibility for a specific feature so they don’t offer the feature at all? That’s mental.
yep
Dario Izzo
@darioizzo
May 04 2016 10:16
Its incerdible that C++ survived with both microsoft and apple rowing against
Francesco Biscani
@bluescarni
May 04 2016 10:16
actually microsoft in the last 2 years has pumped a lot of resources into C++, and they have a lot of people on the standard committee
basically since steve ballmer left
Dario Izzo
@darioizzo
May 04 2016 10:17
yes, you told me .... future looks bright :)
and PaGMO compiled on MSCV
Francesco Biscani
@bluescarni
May 04 2016 10:17
apple does not give a shit about any open committee :) they are out of the vulkan thing as well
I think they really don't care about desktop computing any more
Dario Izzo
@darioizzo
May 04 2016 10:19
wow pretty straight forward :) !
Francesco Biscani
@bluescarni
May 04 2016 10:19
yeah :)
Marcus Märtens
@CoolRunning
May 04 2016 10:21
Dunno about what you think, but recently Microsoft is doing some cool stuff. I am curious how the whole bash under Windows 10 thing will work out.
Dario Izzo
@darioizzo
May 04 2016 10:21
I love windows 10 .... I actually have it at home in 2 / 3 of my computers
Francesco Biscani
@bluescarni
May 04 2016 10:22
I don't care too much, I am happy if they work more on open source stuff, open committees, etc. But I never trust a corporation (maybe redhat would be the only exception :)
Dario Izzo
@darioizzo
May 04 2016 10:22
I think its a solid OS too. My only complaint to microsoft OS is that they do not make it easy to develop there.....
Marcus Märtens
@CoolRunning
May 04 2016 10:22
I agree, Win 10 is good. I used it on my work PC first but after a while I put it on my private one as well. Also, it came as a free upgrade - a bit forced though for some people :smile:
I hope the development aspect will change if they manage to include a somewhat healthy bash
Francesco Biscani
@bluescarni
May 04 2016 10:23
I don't know about the "easy" part, but to me it looks much more straightforward than developing on OSX (once you get past the fact that Windows is not a Unix)
Dario Izzo
@darioizzo
May 04 2016 10:23
And of course I do not trust them .... they still owe me big time for windows ME and the scars it left on my brain
Marcus Märtens
@CoolRunning
May 04 2016 10:24
But yeah - trust is a completely different matter
Francesco Biscani
@bluescarni
May 04 2016 10:24
dario btw
I think I have everything installed on emma for trying the gitlab CI runner, but I cannot run docker and I think it might need a reboot
any chance of getting one sometimes?
Dario Izzo
@darioizzo
May 04 2016 10:25
one what?
Francesco Biscani
@bluescarni
May 04 2016 10:25
a reboot... the problem is that the running kernel is different from the installed kernel (which was probably updated at some point)
so it cannot load some modules that are needed by docker
because they don't exist any more on disk
Dario Izzo
@darioizzo
May 04 2016 10:26
rebooting is always a risk ... but ok let me reboot
worst case you have to come here and fix it :)
Francesco Biscani
@bluescarni
May 04 2016 10:26
my hourly rates are very reasonable :)
the gitlab runner thing is actually in the arch packages
Dario Izzo
@darioizzo
May 04 2016 10:27
going down in 5 minutes
Francesco Biscani
@bluescarni
May 04 2016 10:27
ok cheers
btw it looks like there's lot of out-of-memory events in the log
as usual :)
Dario Izzo
@darioizzo
May 04 2016 10:28
AI
Francesco Biscani
@bluescarni
May 04 2016 10:28
bad programming you mean :)
Dario Izzo
@darioizzo
May 04 2016 10:28
No, in this case I think it was necessary
I can explain if you care ...
Francesco Biscani
@bluescarni
May 04 2016 10:29
the executive summary about the 64GB of memory needed
it's a bit shitty though that pacman removes the existing modules when it upgrades the kernel
Francesco Biscani
@bluescarni
May 04 2016 10:45
https://gitlab.com/EuropeanSpaceAgency/PaGMOreborn/runners so it looks like the runner on emma is registered now
it's still failing due to the boost problem but the runner stuff actually works
Francesco Biscani
@bluescarni
May 04 2016 10:54
actually I am impressed about how it worked out of the box
Dario Izzo
@darioizzo
May 04 2016 11:41
Cool! do I need to know anything?
Francesco Biscani
@bluescarni
May 04 2016 11:41
so to make it work after a reboot you need:
systemctl start docker to start docker
gitlab-ci-multi-runner start to start the gitlab thingie
both from root
I don't think we will need to add stuff if this works as it seems, but just for history:
gitlab-ci-multi-runner register this is what I had to do to register the runner with pagmo
it asks you a few questions, and an authentication token - that you can get from the gitlab page
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md this where this is explained, but it's a rather straightforward process
Dario Izzo
@darioizzo
May 04 2016 11:52
So everytime emma starts the two commands have to be issued? Can you not have this utomated?
Francesco Biscani
@bluescarni
May 04 2016 11:53
I don't know the init system of arch... I think docker starts with systemd so that can proabably ba automated
Francesco Biscani
@bluescarni
May 04 2016 12:05
I disabled the shared runners for now
Dario Izzo
@darioizzo
May 04 2016 12:05
Yep, I saw they were pointless anyway in the last days (40 min wait)
Dario Izzo
@darioizzo
May 04 2016 13:08
I restored my original gitlab-ci.yml when we have the docker file it will just be a matter of changing python:3.4alpine with pagmo:3.4alpine
Francesco Biscani
@bluescarni
May 04 2016 13:38
we can also just install python in alpine no?
Dario Izzo
@darioizzo
May 04 2016 14:05
What do you mean?
Francesco Biscani
@bluescarni
May 04 2016 14:05
apk install python?
Dario Izzo
@darioizzo
May 04 2016 14:05
I thought the idea was to create a docker image from an alpine distribution containing all needed packages right?
Francesco Biscani
@bluescarni
May 04 2016 14:07
ah right ok I misread... I think we just need to take care of installing the boost shit, the rest we can do it with apk packages no?
what I want to avoid is the runtime of compiling boost each time, I am not so worried about the performance of the package manager
Dario Izzo
@darioizzo
May 04 2016 14:08
yes, on some local image of a alpine. Then we create a pagmo docker file and then we just run make on the gitlub-ci.yml ... right?
Francesco Biscani
@bluescarni
May 04 2016 14:09
we can do that as well
Dario Izzo
@darioizzo
May 04 2016 14:09
I mean, once we do this why not installing also doxygen, sphinx clang and stuff .... ? it would be strange not to ....
Francesco Biscani
@bluescarni
May 04 2016 14:09
yeah I suppose
Dario Izzo
@darioizzo
May 04 2016 14:10
The only problem is that we need to maintain the docker file as in update the program versions now and then ... :(
Francesco Biscani
@bluescarni
May 04 2016 14:10
I would not worry about that, I mean, travis is still using ubuntu from 2012
we don't need the latest and greatest
it would be better to have a set of targets like the most common distributions rather
Dario Izzo
@darioizzo
May 04 2016 14:11
right ... tonight I will install docker on the win machine and see if I can start
Francesco Biscani
@bluescarni
May 04 2016 14:11
so we can make sure that pagmo, e.g., compiles cleanly on latest ubuntu/fedora/etc.
Dario Izzo
@darioizzo
May 04 2016 14:12
that should come easy if we understand the process
Francesco Biscani
@bluescarni
May 04 2016 14:33
I was thinking that we can keep a custom alpine image for the purpose of testing pagmo itself against clang, GCC, etc., then we can use the stock distro images to test it compiles cleanly in common environments
Dario Izzo
@darioizzo
May 04 2016 14:33
in gcc only
yep
Francesco Biscani
@bluescarni
May 04 2016 14:34
yeah
Dario Izzo
@darioizzo
May 04 2016 18:54
sto impazzendo dietro a docker ...
Dario Izzo
@darioizzo
May 04 2016 19:05
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM python:3.4-alpine
3.4-alpine: Pulling from library/python
420890c9e918: Already exists
a3ed95caeb02: Download complete
75e331090a0c: Downloading [=============>                                     ]  5.31 MB/20.01 MB
7230ea4708c8: Download complete
Si blocca cosi' ......
Se invece cambio la prima riga del file a FROM alpine:3.1 ... succede questo:
Francesco Biscani
@bluescarni
May 04 2016 19:06
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM python:3.4-alpine
3.4-alpine: Pulling from library/python
420890c9e918: Pull complete 
a3ed95caeb02: Pull complete 
75e331090a0c: Pull complete 
7230ea4708c8: Pull complete 
Digest: sha256:c3caced4581ee411438d87e1501601583057a528c24096ae86a97663c29c46b7
Status: Downloaded newer image for python:3.4-alpine
 ---> e0d701250b4b
Step 2 : RUN apk update && apk add build-base gcc clang
 ---> Running in 0e87be80e8ac
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
v3.3.3-36-gd56992f [http://dl-cdn.alpinelinux.org/alpine/v3.3/main]
v3.3.3-33-gd4025e6 [http://dl-cdn.alpinelinux.org/alpine/v3.3/community]
OK: 5859 distinct packages available
(1/22) Installing binutils-libs (2.25.1-r0)
(2/22) Installing binutils (2.25.1-r0)
(3/22) Installing gmp (6.1.0-r0)
qua va mi pare
Dario Izzo
@darioizzo
May 04 2016 19:07
e xhe palle
A me funziona per ubuntu ed altre immagini, ma su questa si blocca il download
Francesco Biscani
@bluescarni
May 04 2016 19:07
puo' darsi sia un problema del mirror che usi da li'
una cosa temporanea
Dario Izzo
@darioizzo
May 04 2016 19:08
Mi dice anche:
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
Ma credo che non ci interessi
Francesco Biscani
@bluescarni
May 04 2016 19:09
forse ti converrebbe fare dalla virtual machine arch direttamente se funzia
quale e' il motive di avere i comandi formattati in maniera differente per pip e apk?
Dario Izzo
@darioizzo
May 04 2016 19:10
CMD e RUN sono comandi diversi credo
Il primo installa nell immagine
il secondo parte se fai il RUN
sto sperimentando
per imparare
Francesco Biscani
@bluescarni
May 04 2016 19:11
da come la avevo capita io uno puo' anche entrare interattivamente nel containers, fare quel che devi fare e poi creare una immagine da snapshot del container
cmq qua ha finito
Dario Izzo
@darioizzo
May 04 2016 19:11
Si, ma non ho trovato la riga di comando ..... quindi mi sono fatto il tutorial ed ho imparato questa procedura
Tu la conosci?
Dico la riga di comando per entrare in una image?
Senza fare il run?
Francesco Biscani
@bluescarni
May 04 2016 19:12
non ho mai usato i dockerfile, ma so come entrare
Dario Izzo
@darioizzo
May 04 2016 19:12
come fai?
Francesco Biscani
@bluescarni
May 04 2016 19:12
docker run -t -i ubuntu:16.04 /bin/bash
Dario Izzo
@darioizzo
May 04 2016 19:12
ah gia' ma questa non va bene
prova con la image di python che ti sei appena scaricato
da errore
Francesco Biscani
@bluescarni
May 04 2016 19:13
prova a cambiare bash
alpine probabilmente non ha bash installato
Dario Izzo
@darioizzo
May 04 2016 19:13
se togli /bin/bash entri in python
Francesco Biscani
@bluescarni
May 04 2016 19:13
prova /bin/sh
docker run -t -i python:3.4-alpine /bin/sh questa ieri mi funzionava
Dario Izzo
@darioizzo
May 04 2016 19:14
si quello va'
ad ogni modo devo risolvere sto problema coi mirror o aspetto
Francesco Biscani
@bluescarni
May 04 2016 19:14
l'immagine pagmo:basic cmq sono gia' 600 MB
Dario Izzo
@darioizzo
May 04 2016 19:14
che si risolva da solo
Si visto, a questo punto forse ubuntiamo
Francesco Biscani
@bluescarni
May 04 2016 19:15
puoi anche provare a farlo da emma se vuoi
dovrebbe funzionare tutto
Dario Izzo
@darioizzo
May 04 2016 19:15
Mi piace la shell in windows
non vorrei concludere prematuramente che e un problema related to Windows
ma ok grazie ... sbatto ancora un po
Francesco Biscani
@bluescarni
May 04 2016 19:16
np
Dario Izzo
@darioizzo
May 04 2016 19:16
mi hai dato conferme :)