aserio changed the topic of #ste||ar to: STE||AR: Systems Technology, Emergent Parallelism, and Algorithm Research | stellar.cct.lsu.edu | HPX: A cure for performance impaired parallel applications | github.com/STEllAR-GROUP/hpx | Buildbot: http://rostam.cct.lsu.edu/ | Log: http://irclog.cct.lsu.edu/
bikineev has quit [Remote host closed the connection]
bikineev has joined #ste||ar
patg has joined #ste||ar
patg is now known as Guest89477
Guest89477 is now known as patg
<Smasher>
aw aw aw
<Smasher>
i just did a mortal sin
<Smasher>
i changed the signature of rpc-method and compiled it only on one node
<Smasher>
and then received some bullshit from the node with old code
bikineev has quit [Remote host closed the connection]
bikineev has joined #ste||ar
bikineev has quit [Read error: Connection reset by peer]
bikineev_ has joined #ste||ar
<github>
[hpx] Naios opened pull request #2645: Fix cmake soft errors due to failing creation of links on windows (master...symbolic_link_error_pr) https://git.io/vHUuD
denis_blank has quit [Quit: denis_blank]
bikineev_ has quit [Remote host closed the connection]
hkaiser has quit [Quit: bye]
patg_desktop has joined #ste||ar
patg_desktop has quit [Client Quit]
patg_desktop has joined #ste||ar
K-ballo has quit [Quit: K-ballo]
justwagle has joined #ste||ar
justwagle has quit [Client Quit]
diehlpk has joined #ste||ar
diehlpk has quit [Quit: Leaving]
denis_blank has joined #ste||ar
ajaivgeorge has joined #ste||ar
denis_blank has quit [Quit: denis_blank]
patg_desktop has quit [Quit: patg_desktop]
patg has quit [Quit: See you later]
<Smasher>
"archive data bstream is too short" rapes my mind atm
<zao>
pree: In order for names to be visible across module (DLL, .so) boundaries, you need to "export" and "import" them in a platform dependent manner.
<pree>
okay
<zao>
On Windows you use __declspec(dllexport) and __declspec(dllimport), which decorates the symbols in a special manner and for export, puts the symbol in the export table of the DLL.
<zao>
On Linux and other similar systems, we use hidden visibility, so we have to explicitly expose symbols in the symbol table of the shared objects.
<pree>
by using these the names will visible across the runtime of application
<pree>
It is more system side ?
<zao>
HPX_EXPORT is, as the header shows, a central place to hide those platform differences into a macro that essentially says "this symbol is supposed to be exposed" or "this symbol is supposed to not leak out".
<zao>
pree: It's used on anything in the HPX API that is supposed to be used from a client application.
<zao>
pree: In a Windows context, any function that you want to link in from a DLL must be exported, otherwise the linker won't find it. Similarly, it need to be explicitly imported from the using code in order for the linker to figure out that it should come from a DLL.
<zao>
There's also some ancillary purposes, to ensure that RTTI type information and exception handling stuff is properly exposed between modules.
<pree>
okay! thanks a lot @zao :)
hkaiser has joined #ste||ar
bikineev has quit [Remote host closed the connection]
bikineev has joined #ste||ar
bikineev has quit [Remote host closed the connection]
mcopik has joined #ste||ar
pree has quit [Ping timeout: 260 seconds]
shoshijak has joined #ste||ar
shoshijak has quit [Ping timeout: 246 seconds]
shoshijak has joined #ste||ar
<github>
[hpx] hkaiser force-pushed build_with_vcpkg from 9ec6dba to ec836d2: https://git.io/vHUdx
<github>
hpx/build_with_vcpkg ec836d2 Hartmut Kaiser: Build-system changes to make HPX compile when built using vcpkg (https://github.com/Microsoft/vcpkg)...
david_pf_ has quit [Remote host closed the connection]
<github>
[hpx] hkaiser closed pull request #2365: Making sure VERIFY_LOCKS stays disabled if not defined (master...config_fix) https://git.io/vPbYA
Matombo has quit [Remote host closed the connection]
bikineev_ has quit [Ping timeout: 246 seconds]
ajaivgeorge has quit [Quit: ajaivgeorge]
bikineev has joined #ste||ar
pree has quit [Ping timeout: 260 seconds]
patg has joined #ste||ar
jaafar has joined #ste||ar
<taeguk>
jbjnr: Excuse me, my mentor.
<taeguk>
jbjnr: Is a PR during community bonding period not admitted to first evaluation, right?
bikineev_ has joined #ste||ar
shoshijak has quit [Ping timeout: 246 seconds]
pree has joined #ste||ar
bikineev has quit [Ping timeout: 240 seconds]
<taeguk>
I have a question about code style of HPX.
<taeguk>
In the past, I read a book 'Effective Modern C++ by Scott Meyers'. In that book, he recommends using 'auto' instead of explicit type declaration.
<taeguk>
So, until now, I mainly use 'auto'. But, in HPX code bases, I can't found 'auto'. There are only explicit type declarations.
<taeguk>
Is there specific reasons for that? What code style I follow in HPX?
<K-ballo>
in general just follow the style of the code around yours
<K-ballo>
most of the codebase was written before auto was supported by all target platforms, but in newer code you should be able to find some
<K-ballo>
like, I'm thinking the parallel algorithms for example
<taeguk>
I am now looking parallel algorithms and writing heap_if and heap_if_until for PR.
<taeguk>
I can't find implementations of parallel algorithms with using 'auto' as an example for my PR.
jaafar has quit [Ping timeout: 240 seconds]
<K-ballo>
I see a whole bunch of `auto` in the parallel algorithms implementation
pree has quit [Ping timeout: 260 seconds]
<hkaiser>
taeguk: in general, using auto for variables is fine as long as it doesn't reduce code readability
<hkaiser>
if a reader scratches his head saying 'what the hell was this type again' then using auto is the wrong thing to do, but if the concrete type doesn't matter in a concrete context, go ahead, use auto
denis_blank has joined #ste||ar
<hkaiser>
so in the end it's a balance of taste, style, and good judgement
<taeguk>
hkaiser: Thank you :)
<K-ballo>
that got me thinking, taeguk: which of the many different uses of `auto` you had in mind?
<K-ballo>
I'm starting to suspect you were thinking of deduced return types, since you find no uses
<taeguk>
K-ballo: not deduced return types.
<K-ballo>
oh ok
<taeguk>
I mean just 'auto' for varialbe declaration.
<K-ballo>
I have no idea why you don't find them then
<taeguk>
There is omission in my words. I found some 'auto' keywords in implementations of parallel algorithms. But, there is only for lambda or tuples.
<taeguk>
I mean that I can't find 'auto' like "auto iter = std::advance(first, number);" or "auto left_child = node * 2 + 1;"
<taeguk>
I think the usage of 'auto' is conservative in HPX.
<K-ballo>
it's definitively not libertine :)
<taeguk>
I almost declare variables using 'auto' if possible.
<K-ballo>
as hkaiser explained above, `auto` either makes things better, or worse
<K-ballo>
if it's not helping then it's getting in the way
ajaivgeorge has joined #ste||ar
ajaivgeorge has quit [Client Quit]
<taeguk>
K-ballo: yes. you're right. But, I have a confusion about when I use 'auto'.
<taeguk>
int func(size_t a, size_t b) { auto res = a * b; return res; }
<taeguk>
For example, like in this case, do you use 'auto'?
<K-ballo>
I personally wouldn't
<K-ballo>
but take your previous examples, `auto iter = ...` helps
<K-ballo>
`auto c = node * 2 + 1;` doesn't... is that an integer? an arithmetic type? some custom type with overloaded operators?
<K-ballo>
those are better examples than the `func` one
<zao>
Bonus points if you've got ETs or something else for which auto is actually dangerous.
<K-ballo>
the advance example was feeling strange for some reason, turns out it returns void :)
<K-ballo>
but if it did returned something there would have been no doubt it would have been an iterator, one of the same type as the argument `first`
<zao>
std::next(I, 9) ?
<K-ballo>
sure, that one will do
<taeguk>
K-ballo: my mistake :)
<K-ballo>
no prob, I think it still shows how auto helps in that case
<K-ballo>
I don't even need to know what the return type of std::advance is, if I see `auto iter = std::advance` then I can just immediately assume it's an iterator
<taeguk>
And I think auto is good for preventing unnessary implicit type conversion
<K-ballo>
the whole thing would probably have been better off had it been declared as size_t size = ...
<K-ballo>
or even auto size = size_t(...); so that the necessary, potentially narrowing, implicit conversion becomes explicit
<taeguk>
I'd prefer using auto with static_cast<size_t> in that case.
<K-ballo>
slightly different semantics, also size_t{...} would have been a third option, it's a tradeof
<K-ballo>
in the end it's only peer-review that will catch your semantic bugs
<taeguk>
okay, thank you for your advices :)
pree has joined #ste||ar
ajaivgeorge has joined #ste||ar
mcopik has quit [Ping timeout: 255 seconds]
bikineev_ has quit [Ping timeout: 246 seconds]
ajaivgeorge has quit [Quit: ajaivgeorge]
pree_ has joined #ste||ar
pree has quit [Ping timeout: 260 seconds]
pree has joined #ste||ar
pree_ has quit [Ping timeout: 260 seconds]
pree_ has joined #ste||ar
pree has quit [Ping timeout: 260 seconds]
bikineev has joined #ste||ar
pree_ has quit [Ping timeout: 260 seconds]
pree has joined #ste||ar
<jbjnr>
taeguk - Regarding your question of a few days ago - and the new one earlier about a PR during bonding period - it's ok for you to work on the project before the coding period starts - we got some clarification emails for mentors etc and it says that if you have exams or vacation during the ummer and need to make up time beforehand, then it's ok. Regarding the PR's - I'd say it depends on...
<jbjnr>
...the quality - for sure, if you start work on big algorithms and do a PR, then all is fine, but if it's just a few typo fixes, then it won't obviously count as much.
<jbjnr>
Quality of work is the main thing to aim for
parsa has quit [Quit: Zzzzzzzzzzzz]
<pree>
Install configuration: "Release" CMake Error at cmake_install.cmake:48 (file): file cannot create directory: /usr/local/lib/hpx. Maybe need administrative privileges.
denis_blank has quit [Quit: denis_blank]
<pree>
while installing hpx in rostam
<pree>
what to do ?
mcopik has joined #ste||ar
parsa has joined #ste||ar
bikineev has quit [Ping timeout: 255 seconds]
<Smasher>
pree use -DCMAKE_INSTALL_PREFIX=~/mylocal
<pree>
But I'm installing tests now .Are you sure I can cancel it and reinstall it
<Smasher>
sure
<Smasher>
^C works always
<pree>
okay
<pree>
cancel
<pree>
done
jaafar has joined #ste||ar
<Smasher>
btw CMAKE_INSTALL_PREFIX is the same as prefix in autotools if you're familiar with it
<Smasher>
i.e. cmake -DCMAKE_INSTALL_PREFIX=~/mylocal . is equal to ./configure --prefix=~/mylocal
mcopik_ has joined #ste||ar
<heller_>
taeguk: regarding auto, I almost always find it more readable when having more or less concrete types to work with
<heller_>
And more understandable when revisiting code again after some time
pree has quit [Ping timeout: 260 seconds]
<heller_>
As hkaiser said, it should be a balance. Most of the time it depends on your own preference.
pree has joined #ste||ar
parsa has quit [Ping timeout: 272 seconds]
pree_ has joined #ste||ar
pree has quit [Ping timeout: 260 seconds]
denis_blank has joined #ste||ar
mcopik has quit [Ping timeout: 268 seconds]
mcopik_ has quit [Ping timeout: 260 seconds]
pree has joined #ste||ar
pree_ has quit [Ping timeout: 260 seconds]
bikineev has joined #ste||ar
<jbjnr>
hkaiser: websockets? do you seriously want to make progress on that?
<jbjnr>
I call the action, passing in my rma::vector, the serialization "does the right thing" and encodes an rma handle and pointers etc, all is fine
<jbjnr>
the data is transmitted across the network with no copy and fast rma cos the rma::vector already has the memory pinned
<jbjnr>
but the return value, is just the same data sent back - and it tries to invoke a copy constructor
<K-ballo>
what's ".shallow_copy"?
<jbjnr>
I would like to return the rma::vector - but using a "shallow copy" for example - I can'r use move, cos then I need to change the param to non const and then it won't compile due to something else in plain action.hpp
<jbjnr>
I just made up shallow copy
<K-ballo>
ok, I don't follow
<jbjnr>
when the result (a vector) is returned from the function - I do not want a copy made
<jbjnr>
I would like to just return a reference and have that serialized and send back the data
<jbjnr>
hold on. I didn't try returning a const ref
<K-ballo>
I don't know what it'd mean to return a const reference, a reference to the parameter? to the argument?
<K-ballo>
to something local? remote?
<jbjnr>
exactly. The rma vector has a special serialize operator - and it does an rdma copy of the pointer only
<jbjnr>
so when I return the rma::vector from the function - the compiler wants to invoke a full copy constructor
<jbjnr>
but I want only a "shallow copy" not a deep one
<K-ballo>
sure it does, that's what you've asked it to do
<jbjnr>
so - how can I not ask it to?
<jbjnr>
that's what I need help with
<jbjnr>
I need to return a reference only, the serialize will do the right thing
<K-ballo>
uh.. in general if you want to return by value like that you need a copy/move, two actually but one is always elided
<K-ballo>
sorry, all too vague for me, I give up
<jbjnr>
ok. thanks anyway
bikineev has quit [Ping timeout: 255 seconds]
<jbjnr>
I will go with my shallow copy implementation for now
pree has joined #ste||ar
<pree>
gmake -j5
<pree>
what we have to specify in place for 5 in rostam
<pree>
cores
<hkaiser>
jbjnr: add a move constructor/move assignment
<hkaiser>
also take the argument by value
<hkaiser>
hpx will move the args, if possible
bikineev has joined #ste||ar
<heller_>
pree: depends.
<pree>
I used gmake -j5
<heller_>
pree: the number tells make how many parallel invocations it can have. Use your best judgement.
<parsa>
just use make -j (no arguments) if you're the only user on the machine
patg_desktop has joined #ste||ar
<pree>
okay
<pree>
thank @heller & parsa
<jbjnr>
hkaiser: it's the return that is the problem
<hkaiser>
jbjnr: sure
<hkaiser>
just provide a move constructor
<jbjnr>
I already have one
<hkaiser>
so all is well
patg_desktop has quit [Client Quit]
<jbjnr>
no
<hkaiser>
why not?
<jbjnr>
the arg is const
<jbjnr>
the move constructor is ignore
<jbjnr>
d
<jbjnr>
if I make it non const, I can't pass by ref
<hkaiser>
pass by value
<jbjnr>
don't want copies made
<hkaiser>
you have a move constructor, right?
<hkaiser>
so no copy will be made
<jbjnr>
on the send side I want to pass a const ref
<hkaiser>
why?
<hkaiser>
make your action like: T foo(T val) {...}
<jbjnr>
the data must no be moved out of it's actual container as it will be a halo, or some other data that we want o ruse
<hkaiser>
then make it ref-counted
<jbjnr>
that's on possibility
<jbjnr>
^one
<hkaiser>
serialize_buffer does justthat
<jbjnr>
yes
<K-ballo>
oh, so... this is a remote action that receives an argument and returns is as is
<jbjnr>
I was hoping I could make the vector do it without wrapping it inside a serialize_buffer
<jbjnr>
K-ballo: yes
<K-ballo>
and does taking the argument by value result in the action on the callers side to do a copy? is that so?
<jbjnr>
yes essentialy
<K-ballo>
that seems odd
<K-ballo>
on the caller side the action should just bind a bunch of Param const&..., to trigger any needed implicit conversion, and serialize those
<jbjnr>
let me check again
<hkaiser>
jbjnr: you don't have to wrap it into serialize_buffer, just make your rma_object ref-counted
<K-ballo>
oh it's possible that it *does* introduces copies, since it does the tuple dance and all..
<K-ballo>
but it's odd, isn't it?
<hkaiser>
K-ballo: it will create one copy on the sender
<K-ballo>
unless it's not blocking
<hkaiser>
right
<K-ballo>
jbjnr: is this a remote async invocation?
<hkaiser>
it _may_ create one
<K-ballo>
but then it should do the opposite and decay, create the copy for either fun(T arg) and fun(T const& arg)
<K-ballo>
something doesn't quite fit, but I can't tell what
<jbjnr>
home/biddisco/src/hvtkm/hpx/hpx/runtime/actions/plain_action.hpp:79:21: error: use of deleted function ‘hpx::parcelset::rma::rmavector<char, hpx::parcelset::rma::allocator<char> >::rmavector(const hpx::parcelset::rma::rmavector<char, hpx::parcelset::rma::allocator<char> >&)’
<jbjnr>
return F(std::forward<Ts>(vs)...);
<hkaiser>
well, if you deleted the copy constructor it will not work
<jbjnr>
it wants to copy it if I pass by value (plain action)
<hkaiser>
make it ref-cnted
<hkaiser>
same a serialize_buffer
<hkaiser>
as*
<jbjnr>
I think that'll be the best solution.
<heller_>
hkaiser: websocket parcelport, I hate you. You don't want me to finish, do you?
<hkaiser>
use boost::shared_array with a custom deleter
<hkaiser>
heller_: lol
<hkaiser>
I provided you with a minion ;)
<heller_>
:p
<jbjnr>
hkaiser: no - the shared_array won't fly
<heller_>
It sounded like he thought I'd be willing to implement it ;)
<jbjnr>
I had performance issues using std::vector<T, rma::allocator<T>> so I need a custom vector that holds the region without having to look it up. a shared array will have the same trouble
<hkaiser>
heller_: I said you could tell him how to do it
<hkaiser>
jbjnr: why not?
<jbjnr>
unless I put the array inside the vector I guess
<hkaiser>
jbjnr: you lost me
<hkaiser>
jbjnr: a shared_array is just a pointer
<jbjnr>
ok, then that'll be ok
<hkaiser>
I have the impression that you over-complicate thigs
<jbjnr>
s long as it allows me to handle the create/destroy
<hkaiser>
sure it does
<jbjnr>
hkaiser: I ried the simple appoaches first but they give poor performance
<hkaiser>
you initialize it from a pointer and a custom deleter
<jbjnr>
great
<hkaiser>
see serialize_buffer
<heller_>
hkaiser: I see
<heller_>
hkaiser: I'll have a chat with him
mcopik has joined #ste||ar
parsa has quit [Read error: Connection reset by peer]
mcopik_ has quit [Ping timeout: 260 seconds]
pree has quit []
bikineev has quit [Remote host closed the connection]
patg has quit [Quit: See you later]
<zao>
Smasher: Note that many shells (pretty much all) don't expand ~ in the middle of arguments, prefer $HOME or an explicit absolute path.
<zao>
Unless you're trying to make a directory named ~ in your current directory, then it'll do wonder s:D
bikineev has joined #ste||ar
<github>
[hpx] hkaiser closed pull request #2645: Fix cmake soft errors due to failing creation of links on windows (master...symbolic_link_error_pr) https://git.io/vHUuD
<Smasher>
hmm there are many units which throw this warning
<hkaiser>
one would be sufficient
<zao>
hkaiser: Isn't this the thing I ranted about back when I tried using HPX in an existing application a few months ago?
<hkaiser>
Smasher: that's not a preprocessed file
<zao>
Where the defines in defines.hpp _really_ need to be guarded.
<hkaiser>
zao: all of them?
<Smasher>
hkaiser i just wanted to show that i include hpx first
<zao>
hkaiser: Most.
<Smasher>
the preprocessed file is uploading
<zao>
Anything you configure that _really_ is up to the end user/integrator to choose, you shouldn't override their desires.
<zao>
You could error out if they're insufficient, but don't change them.
<hkaiser>
zao: but not the HPX_HAVE_... ones
<zao>
No, of course not.
<zao>
But _WIN32_WINNT, any eventual WIN32_LEAN_AND_MEAN, NOMINMAX, etc.
<hkaiser>
nod
<hkaiser>
I'll ad that
<zao>
Well, NOMINMAX is something no-one ever should define.
parsa has joined #ste||ar
<zao>
As defining it breaks various external code that expects the macros to exist.
<zao>
I forget what macros you define in there.
<zao>
Depends of course (like then) on if you intend for HPX to ever be usable as a drop-in parllelism runtime, or something you build a project around explicitly.
<hkaiser>
we don't defin ethat
parsa has quit [Read error: Connection reset by peer]
<Smasher>
the first one is warning: "_WIN32_WINNT" redefined
<Smasher>
lemme create that .i file
david_pf_ has quit [Quit: david_pf_]
<hkaiser>
Smasher: sure, I'm working on the win32_winnt warning
<hkaiser>
K-ballo: do we still need BOOST_RESULT_OF_USE_DECLTYPE?
<K-ballo>
hkaiser: I don't know, maybe.. depends on which pieces or boost we are touching on
<K-ballo>
I only remember BOOST_FOREACH was one of the reasons why that was needed, and that's gone
<github>
[hpx] hkaiser created fixing_config_definitions (+1 new commit): https://git.io/vHTnx
<github>
hpx/fixing_config_definitions 684a0d9 Hartmut Kaiser: Allowing for certain configuration macros being defined conditionally
<hkaiser>
nod
<hkaiser>
well, I'll leave it for the time being
<hkaiser>
zao: that should solve the issues you mentioned
<hkaiser>
^^
<hkaiser>
(#2646)
<github>
[hpx] hkaiser opened pull request #2646: Allowing for certain configuration macros being defined conditionally (master...fixing_config_definitions) https://git.io/vHTnj
<github>
[hpx] hkaiser force-pushed fixing_config_definitions from 684a0d9 to 7a84d2b: https://git.io/vHTcT
<github>
hpx/fixing_config_definitions 7a84d2b Hartmut Kaiser: Allowing for certain configuration macros being defined conditionally