K-ballo 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/
<gnikunj[m]> hkaiser: yt?
<hkaiser> here
<gnikunj[m]> Hey! Could you help me with where to get the branch of kokkos that compiles for kokkos-resiliency?
<gnikunj[m]> They say altdev here: https://github.com/kokkos/kokkos-resilience
<hkaiser> yah
<hkaiser> that's the one
<gnikunj[m]> but there is none on https://github.com/kokkos/kokkos
<hkaiser> yah, there isn't
<gnikunj[m]> also, the link they provide to the gitlab one does not open either :/
<gnikunj[m]> how do I access the branch?
<hkaiser> might have been merged
<gnikunj[m]> does this link open for you: https://gitlab-ex.sandia.gov/kokkos-resilience/kokkos?
<hkaiser> yes, that's behind the firewall
<gnikunj[m]> ok. How do I access it?
<hkaiser> sec
<gnikunj[m]> alright. Thanks!
<gnikunj[m]> wait, it doesn't have altdev either :/
<gnikunj[m]> should I use master instead?
<hkaiser> nod, I think so
<hkaiser> if this doesn't work, let's ask Nick for instructions
<gnikunj[m]> ok. Thanks!
<gnikunj[m]> I was going through the execution model of kokkos. From what I understand, we need to add something like HPXResiliency execution space, right?
<hkaiser> do we?
<gnikunj[m]> and the HPXResiliency execution space can then simply invoke HPX functionalities to get resilience
<hkaiser> the hpx-kokkos repository has executors that map onto kokkos
<gnikunj[m]> I should look into one of the examples there then.
<gnikunj[m]> hkaiser: hpx-kokkos looks as if we're using HPX and Kokkos together (instead of backend-frontend)
<hkaiser> gnikunj[m]: sure, it's an HPX executor on top of kokkos
<gnikunj[m]> so you're suggesting to use the async resilience executor on top of kokkos?
<hkaiser> the resilience executor wraps any other executor to do the actual work
<hkaiser> so yes, I'd start with using the resilience executor wrapped around the kokkos one
<hkaiser> hpx::kokkos::kok is the execution policy
<hkaiser> hpx::kokkos::default_executor is a simple executor
<hkaiser> so use hpx::kokkos::kok.on(hpx::resiliency::experimental::replay_executor{hpx::kokkos::default_executor{}})
<gnikunj[m]> aah, so that's what you meant
<hkaiser> or rather make_replay_executor(exec, N)
<hkaiser> I hope that works, not sure ;-)
<gnikunj[m]> but do we not have to integrate it within kokkos-resilience itself?
<hkaiser> not yet
<gnikunj[m]> aaah, now its starting to make sense!
<hkaiser> kokkos-resilience does checkpointing, i.e. data resilience
<gnikunj[m]> right. I was wondering how our resilience would be any useful against actual memory/persistent checkpointing
<hkaiser> we might not need the kokkos execution policy, a simple async(make_replay_executor(...), ...) would be a good starting point
<gnikunj[m]> and if we had to integrate it within kokkos-resilience, we should be required to build another execution space. Within the execution space, we can use HPX's execution space functionalities to build the resilient variant.
<hkaiser> gnikunj[m]: last phone call we agreed to first look into execution resiliency
<gnikunj[m]> yes, I remember. But you asked me to get a prototype ready :P
<gnikunj[m]> so I was wondering this whole time that I need to integrate it within kokkos-resilience
<hkaiser> yah, for the execution resiliency on gpus using kokkos
<gnikunj[m]> right.
<gnikunj[m]> wait. If that's all I need to do, we don't need to create a library or anything.
<gnikunj[m]> Everything is within HPX and kokkos already. A simple cpp file that integrates the two and shows it working would do.
<gnikunj[m]> is that the idea of prototype you mentioned?
<hkaiser> yes, exactly - let's do the minimally necessary work here
<gnikunj[m]> got it ;)
<hkaiser> it demonstrates the power of composable components
<gnikunj[m]> you were right. This isn't full time work lol
<hkaiser> don't tell them ;-)
<gnikunj[m]> It's early morning here. But I should have a prototype working by the end of tomorrow.
<hkaiser> sure, no rush
<gnikunj[m]> (this is the first time I'm writing CUDA code. So expect doubts there)
<gnikunj[m]> more like writing codes for the GPU
<hkaiser> sure
<gnikunj[m]> thanks :D
<hkaiser> we might run into related issues, so let's see
<gnikunj[m]> yah. I'm expecting some. Also, it has been some time since I last looked into HPX custom executor implementations.
<gnikunj[m]> Do you have example code I can look into?
<gnikunj[m]> just to debug resilience executors in cases of errors
<hkaiser> we should have at least a test
<gnikunj[m]> ok. I'll look for it there.
<gnikunj[m]> right. Thanks!
<gnikunj[m]> hkaiser: one more thing. To use hpx-kokkos, do I need to first compile kokkos with standard HPX and then compile hpx-kokkos and give it a path to kokkos?
<gnikunj[m]> to rephrase, to use hpx-kokkos functionalities, I need kokkos preinstalled, right?
<gnikunj[m]> wait nvm. I should read build instruction more carefully :/
<hkaiser> gnikunj[m]: compiling kokkos with hpx just enables the hpx backend for it
<hkaiser> and yes to your second question
<gnikunj[m]> ok. Thanks!
hkaiser has quit [Quit: bye]
Vir has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
Vir has joined #ste||ar
hkaiser has joined #ste||ar
Yorlik has joined #ste||ar
<gonidelis[m]> K-ballo: yt?
<gonidelis[m]> hkaiser: how does struct Iterator know what `Sentinel` means here?
<gonidelis[m]> yeah. But does this mean that they are in the same namespace?
<hkaiser> in this case, yes
<gonidelis[m]> hm... that's not quite explicit
<hkaiser> what's your issue?
<gonidelis[m]> I am tryin to implement Augistin's advice on the custom sentinel
<hkaiser> generally, every iterator type has a certain sentinel type it 'knows' about
<gonidelis[m]> even the standard ones?
<hkaiser> that relationship is established by defining the comparison operators for the iterator
Badhabits287 has joined #ste||ar
<gonidelis[m]> messing with the standard iterator does not sound good to me though
<gonidelis[m]> standard iterator types ^^
<hkaiser> gonidelis[m]: why do you have to do that?
<gonidelis[m]> hkaiser: i am trying to implement a custom sentinel type for the standard fwditer type
<gonidelis[m]> in order to provide the iter-sent test on the `adapt remove` pr
<hkaiser> does this sentinel represent a value? an end of range? a sequence length?
<gonidelis[m]> good question
<gonidelis[m]> hkaiser: i am working on the sentinel value case
<hkaiser> a sentinel type can act as a sentinel for a particular iterator if there are the correct comparison operations defined and accessible
<gonidelis[m]> exactly
<hkaiser> so what's the problem?
<gonidelis[m]> but how does my_Sentinel type know about the iterator tha addresses to
<gonidelis[m]> ?
<gonidelis[m]> that ^^
<hkaiser> it doesn't
<gonidelis[m]> since i am overloading `==`
<hkaiser> the operator<=>(iterator_type, sentinel_type) does it
<gonidelis[m]> i need sth like ` friend bool operator==(Sentinel<ValueType> s, SomeIterType i)`
<hkaiser> yes
<gonidelis[m]> ok but SomeIterType is uknown
<hkaiser> doesn't need to be 'friend, though, could be a global function
<gonidelis[m]> still...
<hkaiser> SOmeIterType could be template?
<hkaiser> that is enable_id'ed for is_forward_iterator<>, for instance
Badhabits287 has left #ste||ar ["Leaving"]
<gonidelis[m]> great. That's what I tried. So then how would SomeIterΤype being specialized in an actual `if (FwdIter iter == 5){}` call?
<gonidelis[m]> been^
<hkaiser> template <typename Iter, typename Enable = std::enable_if_t<is_forward_iterator<Iter>>> bool operator==(Iter it, sentinel s) { ... }?
<hkaiser> template <typename Iter, typename Enable = std::enable_if_t<is_forward_iterator_v<Iter>>> bool operator==(Iter it, sentinel s) { return *it == s.get_stop_value(); }?
<gonidelis[m]> So just by calling `iter == 5`, the compiler will deduce iter's type and use it in the place of `typename Iter` ?
<hkaiser> iter == 5 is not valid
<gonidelis[m]> *iter == 5
<hkaiser> it has to be iter == sentinel(5)
<gonidelis[m]> ohh ok
<gonidelis[m]> hmmm.... so 5 is not a sentinel value on its own
<hkaiser> you compare an instance of an iterator with an instance of a sentinel
<hkaiser> 5 is not a sentinel
<gonidelis[m]> ok great
<gonidelis[m]> Thanks a lot
<hkaiser> let me repeat: a sentinel is a type that can be compared with an iterator
<hkaiser> '5' can't be compared with an iterator
<gonidelis[m]> because 5 does not satisfy the requirements of WeaklyEqualityComparable?
<hkaiser> if 'compared' with an iterator, that's true
<hkaiser> if compared with another integer, that's false
<hkaiser> gonidelis[m]: we should read this book once you have come over: https://www.amazon.com/Elements-Programming-Alexander-Stepanov/dp/0578222140/ref=sr_1_2
<gonidelis[m]> hkaiser: ok what's the motive?
<hkaiser> that will help clarifying the concepts
<gonidelis[m]> Do you mean "I" should read? or is it for both of us?
<hkaiser> gonidelis[m]: well, I have read it several times ;-) what we usually do is for the student to register for a 'special reading' course with myself (gives you normal credits), where the student reads the book over a semester and we meet once a week to talk about it
<gonidelis[m]> so is it like algorithmic programming 101?
<hkaiser> yah, that as well
<gonidelis[m]> ouch...
<hkaiser> feel free to peek: http://elementsofprogramming.com/eop.pdf
<hkaiser> note however, it's very hard to read and digest
<gonidelis[m]> i surely need that
<gonidelis[m]> in other news: with your hints the iter-sent test is finally complete
<gonidelis[m]> \o/
<hkaiser> nice
<gonidelis[m]> hkaiser: is it too hard to start it mid-internship?
<hkaiser> not at all
<hkaiser> ;-)
<gonidelis[m]> you got it
<gonidelis[m]> hkaiser: if last is of our custom Sentinel type would `algorithm_result::get()` be able to handle it ?
<hkaiser> gonidelis[m]: why shouldn't it?
<hkaiser> also paralle shouldn't expect the same types as first and last
<gonidelis[m]> hkaiser: that's the master branch... i have made the changes in minde but wow! you located the bogus line without even watching the actual code...
<zao> I hear that Hartmut is at least 60% wizard.
<gonidelis[m]> lol
<Yorlik> o/
<hkaiser> Yorlik: hey
<Yorlik> hkaiser: Heyo!
<hkaiser> how's life?
<Yorlik> Just saying a quick hello, since I wasn't on the last three months. I'm overtaking my fathers estate (he's still alive) and tehres tons of things to organize and plan.
<hkaiser> good luck!
<Yorlik> I just have this weeken at home - tomorrow I'm driving back.
<Yorlik> I'm really missing programming - after moving there I can continue my project.
<Yorlik> For now it unfortunately has to be on hold.
<Yorlik> I saw HPX 1.6 is out. Any groundbreaking changes or additions?
<hkaiser> Yorlik: nothing that should impact you
<hkaiser> if it does, it's a bug ;-)
<Yorlik> :D
<Yorlik> Can't wait to get back to it - I'm really missing it.
<Yorlik> I might start studying the book mentioned before here in my free time. (http://elementsofprogramming.com)
<hkaiser> Yorlik: ok, have fun - it's not for the faint of heart
<Yorlik> I guess I'm crazy enough to try it :)
<Yorlik> Alright - gotta run - see you next time. :)
* Yorlik waves and fades into a puff of types and concepts.
Yorlik has quit [Quit: Leaving]
<gonidelis[m]> hkaiser: since count is 0, first could be returned as well
<gonidelis[m]> isn't that right?
<hkaiser> gonidelis[m]: should it return an iterator anyways? and not the sentinel?
<gonidelis[m]> yes
<hkaiser> well, then it _has_ to return first