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/
tushar1997 has left #ste||ar ["The Lounge - https://thelounge.github.io"]
diehlpk_ has joined #ste||ar
diehlpk has joined #ste||ar
Anushi1998 has quit [Ping timeout: 276 seconds]
nanashi55 has quit [Ping timeout: 240 seconds]
nanashi55 has joined #ste||ar
diehlpk has quit [Ping timeout: 240 seconds]
diehlpk_ has quit [Ping timeout: 240 seconds]
Anushi1998 has joined #ste||ar
K-ballo has quit [Quit: K-ballo]
verganz has quit [Ping timeout: 260 seconds]
hkaiser has quit [Quit: bye]
gentryx has quit [Ping timeout: 245 seconds]
nanashi55 has quit [Ping timeout: 263 seconds]
nanashi55 has joined #ste||ar
gentryx has joined #ste||ar
Anushi1998 has quit [Ping timeout: 240 seconds]
mcopik has quit [Ping timeout: 240 seconds]
gentryx has quit [Ping timeout: 260 seconds]
gentryx has joined #ste||ar
parsa has quit [Quit: Zzzzzzzzzzzz]
parsa has joined #ste||ar
parsa has quit [Client Quit]
victor_ludorum has joined #ste||ar
mcopik has joined #ste||ar
victor_ludorum has quit [Ping timeout: 260 seconds]
mcopik has quit [Ping timeout: 248 seconds]
victor_ludorum has joined #ste||ar
victor_ludorum has quit [Ping timeout: 260 seconds]
nikunj has joined #ste||ar
victor_ludorum has joined #ste||ar
mcopik has joined #ste||ar
victor_ludorum has quit [Quit: Page closed]
Anushi1998 has joined #ste||ar
Anushi1998 has quit [Read error: Connection reset by peer]
Anushi1998 has joined #ste||ar
Anushi1998 has quit [Ping timeout: 240 seconds]
diehlpk has joined #ste||ar
diehlpk_ has joined #ste||ar
K-ballo has joined #ste||ar
hkaiser has joined #ste||ar
daissgr has quit [Ping timeout: 240 seconds]
jakub_golinowski has joined #ste||ar
verganz has joined #ste||ar
hkaiser has quit [Ping timeout: 256 seconds]
<github> [hpx] StellarBot pushed 1 new commit to gh-pages: https://git.io/vxR6B
<github> hpx/gh-pages 9626536 StellarBot: Updating docs
hkaiser has joined #ste||ar
anushi has joined #ste||ar
diehlpk has quit [Ping timeout: 256 seconds]
diehlpk_ has quit [Ping timeout: 276 seconds]
<nikunj> @hkaiser: The reason why many of hpx components disn't work in init_globally (even though main was registered as an hpx thread) is because get_self_ptr() is equal to nullptr
<nikunj> That was the reason why most hpx components gave null id error at runtime
<nikunj> @hkaiser: is there any hpx function which could assign the function a pointer and add it to the stack?
anushi has quit [Read error: Connection reset by peer]
anushi has joined #ste||ar
verganz has quit [Ping timeout: 260 seconds]
mcopik has quit [Ping timeout: 240 seconds]
<hkaiser> nikunj: if get_self_ptr() == nullptr, then the calling thread is not an HPX thread
<hkaiser> most of the functionality of HPX is available only to HPX threads
<nikunj> @hkaiser: Then what is actually happening to main in init_globally?
<hkaiser> nikunj: in HPX you have to distinguish between kernel threads (pthreads) and HP Xthreads
<hkaiser> the kernel threads are the ones that are used to actually execute things, HPX threads are not really threads (in terms of the OS)
<hkaiser> HPX threads are lightweight objects that behave semantically as if they were 'threads'
<hkaiser> you can think about HPX threads as functions invoked on their own stack
<nikunj> @hkaiser: so the main function is only registered as hpx thread in init_globally, right?
<hkaiser> the main (kernel-)thread is not an HPX thread, but it is known to the runtime
anushi has quit [Ping timeout: 240 seconds]
<hkaiser> non-HPX threads can invoke a select HPX functions if they are registered with the runtime
<hkaiser> for instance they can schedule an HPX thread
<nikunj> @hkaiser: ok
anushi has joined #ste||ar
<hkaiser> nikunj: have you heard about user-level threading?
<nikunj> @hkaiser: yes, but only superficially
<hkaiser> that is what HPX has implemented
<nikunj> @hkaiser: Now, I've understood
<nikunj> @hkaiser: So we could only register main with the runtime, but can't use it fully as an HPX thread in init_globally
anushi has quit [Ping timeout: 240 seconds]
<hkaiser> that is true for the thread that normally invokes the C-main function, but not for the function itself - that one could theoretically be executed by an HPX thread (and that is what you attempted to do)
anushi has joined #ste||ar
<hkaiser> in your case, main() actually gets executed twice, I believe, once as an HPX thread (through hpx::init) and once through the normal startup sequence as a non-HPX thread
<nikunj> @hkaiser: yes, that's exactly what I've done
<nikunj> In my case, I first run the main function as hpx thread
<hkaiser> yes
<nikunj> once all work is done, I simply call the std::exit with an EXIT_SUCCESS, this let's the destructors to be called before exiting
<nikunj> This way the C-main function is never executed
<nikunj> But with my way, there is a problem, if a user wishes to define it's own global initializations, it will never be executed
<hkaiser> nikunj: well, that's what you expected to happen
<hkaiser> however, hpx::finalize does not block, it only signals to the runtime that it is ok to exit
<hkaiser> so things move forward before your destructor is being called and main gets called again
<nikunj> @hkaiser: Oh, no. This is not what I do
<hkaiser> I think at least that's what happens, I have not run your example myself
<nikunj> After the hpx::finalize, I define another struct
<nikunj> In that struct's constructor I call std::exit
<hkaiser> I saw that
<nikunj> That's what signals the exit sequence after hps::finalize
<nikunj> and blocks compiler's execution of main
<nikunj> This way the compiler never get's a chance to execute main twice
<nikunj> It's like I'm forcing the compiler to exit before main is actually executed by it. This is to prevent the main execution twice
<hkaiser> ok
galabc has joined #ste||ar
<zao> Is this at global scope to leverage static initialization?
galabc has quit [Client Quit]
<nikunj> zao: yes
<hkaiser> nikunj: this still leaves that other global objects might never get initialized
<zao> Note that the order of such things is top-down per source file, but indeterminate between TUs.
<hkaiser> zao: nod, exactly
<nikunj> @hkaiser: yes, that's what I'm currently trying to tackle
<nikunj> But currently I'm able to run multiple examples with ease
<nikunj> I haven't received any errors as of now
<hkaiser> nikunj: lucky you
<nikunj> This includes factorial, sierpinski
<nikunj> and few I don't remember
<hkaiser> try creating a global object _after_ your manage_global_runtime to see that it breaks
<zao> I have a feeling that if you in another source file define something global like `std::string x = []{ return "hi"; }();` the contents of `x` may be quite surprising.
<zao> Or go with Hartmut's plan.
<zao> (probably more reliable)
<zao> (I'm trying to figure out how to write idiomatic Go)
<hkaiser> zao: don't, just don't
<hkaiser> ;-)
<zao> I'd consider HPX, but we all know no-one knows how to use it ;)
<hkaiser> zao: right
<github> [hpx] K-ballo force-pushed fmtlib from 62fac77 to 652ecba: https://git.io/vFHIw
<github> hpx/fmtlib 652ecba Agustin K-ballo Berge: Replace boost::format with custom sprintf-based implementation
<hkaiser> there is that...
<nikunj> @hkaiser: what should I do exactly to try to break it?
<zao> I'm hacking away on my test runners, trying to expose a bit of API.
<hkaiser> create another global object after the manage_global_init one and see whether it gets constructed or not
<K-ballo> "after"?
<nikunj> @hkaiser: if it's called in between the 2 structs (manage_global_runtime and detruct) then it will get executed
<nikunj> if it's after the 2nd struct, it won't be executed
<hkaiser> nikunj: I don't think so, it wouldn't even executed if it's between the two
<hkaiser> well, you might be right
<zao> Try it and see? :)
<hkaiser> I didn't run your code
<nikunj> @hkaiser: The one in my pr is the one I'm currently using (I've modified it a bit, you can check it there)
<nikunj> Btw, if you were to define global variables (like int x = 10) and then try to cout it. Then it outputs 10
<hkaiser> heller: may I ask you to have a look at #3254, please?
parsa has joined #ste||ar
<zao> Note that static initialization and dynamic initialization of globals happen in different phases.
<hkaiser> nikunj: yah, that's statically initialized, no code needs to be executed for that
<zao> If you want to test it properly, you should make it dynamic enough to be in the second phase.
<hkaiser> nikunj: btw, you could achieve the same as in your example by simply calling exit after hpx::init returned
<hkaiser> but that does not solve the global initialization problem
<nikunj> @hkaiser: yes
<nikunj> @hkaiser: creating another object of manage_global_runtime, runs properly
<zao> I'm not familiar with the proposal. Are you supposed to be able to use HPX functionality in globals pre-main, or is that out of scope?
<hkaiser> zao: the objective is to seamlessly run any C++ app on top of HPX without changes
<hkaiser> i.e. run the C-main as an hpx thread
<zao> Say I used to have a serial `std::for_each` in a global ctor, should I be able to say `hpx::for_each`?
<hkaiser> that's a very good question, indeed
<hkaiser> in theory, yes
<nikunj> global object after the 2nd struct is not executed (as expected)
<nikunj> It didn't break the code however
<hkaiser> heh
<zao> This project sounds like a fun and scary puzzle :)
<hkaiser> nikunj: if it's not a bug then let's call it a 'technology gap' ;-)
<nikunj> @hkaiser: lol
<hkaiser> zao: most likely it will require changes to the libc start-up
<nikunj> zao: Yes this was the most interesting project I found in the list. That's why I wanted to work on it
<zao> Time to go make a pot of coffee... just tried to tab-complete in a directory with 470'000 HPX log files.
<nikunj> @hkaiser: my way won't be able to execute any global objects
<nikunj> It may break the final code (that the user will create) if it relies on that global object
<zao> I get the feeling that before the project is done, you've tried several different approaches.
<nikunj> zao: I've currently tried 4 ways
<nikunj> I felt global initialization was apt
<github> [hpx] hkaiser pushed 1 new commit to select_direct_execution: https://git.io/vxRDs
<github> hpx/select_direct_execution b048edb Hartmut Kaiser: Remove unneeded captured variable...
anushi has quit [Remote host closed the connection]
<nikunj> @hkaiser: Did you look at my proposal?
anushi has joined #ste||ar
<K-ballo> quick sanity check: does --hpx:list-component-types work?
<nikunj> @K-ballo: yes it lists 36 components
<nikunj> No breaks here as well
<K-ballo> thanks nikunj
<nikunj> Well not 36, it lists from 15 to 36
<K-ballo> is blowing up for me here on windows, top of master.. holding locks during suspension
<nikunj> @K-ballo: that's odd
<nikunj> @K-ballo: Could you please share the error report?
anushi has quit [Ping timeout: 240 seconds]
EverYoung has joined #ste||ar
EverYoung has quit [Remote host closed the connection]
EverYoung has joined #ste||ar
EverYoung has quit [Read error: Connection reset by peer]
<K-ballo> > {what}: suspending thread while at least one lock is being held, stack backtrace: 54 frames:
<hkaiser> K-ballo: nice
<hkaiser> can you reproduce this?
<K-ballo> I think we are mixing things up here
<K-ballo> I'm just calling an hpx test with --hpx:list-component-types on master and it blows up
<K-ballo> unrelated to what nikunj is working on
<nikunj> @K-ballo: I see
<hkaiser> K-ballo: ok, it's definitely a bug on our end
<hkaiser> K-ballo: mind creating a ticket?
<hkaiser> nikunj: please make sure Patrick is aware of your proposal (Patrick Diehl <patrickdiehl1@gmail.com>)
<hkaiser> he's organizing GSoC this year
parsa has quit [Quit: Zzzzzzzzzzzz]
<nikunj> @hkaiser: ok, I will ask patrick then. Thanks
parsa has joined #ste||ar
<K-ballo> it's possible I'm mixing binaries or something
anushi has joined #ste||ar
<hkaiser> K-ballo: it very likely to be a problem in hpx, though
<hkaiser> we have touched that code recently
<K-ballo> hkaiser: can you reproduce? just pick any hpx executable and pass that cmd line arg
<K-ballo> I just switched boost versions and other stuff
parsa has quit [Ping timeout: 276 seconds]
<hkaiser> K-ballo: have to run now, will try later
<zao> K-ballo: Blows up on my ancient build of `hello_world.exe`
<zao> Prints first component and then does nada for a long while, eventually exploding with a traceback.
<zao> I don't know how many components I actually have built here, but explosions are unexpected.
<zao> In short - `{what}: suspending thread while at least one lock is being held, stack backtrace: 54 frames:`
<K-ballo> cool, I'll report then
<zao> Judging by the timestamps, I'm at some commit around early march.
<K-ballo> zao: windows?
<zao> Yeah, Win10.
<zao> From back when I tried provoking the hello_world problems.
<K-ballo> nikunj: you? linux?
<nikunj> yes
<nikunj> it didn't produce error in linux
<zao> Executes fine on my Linux runner.
<zao> `bin/bulk_async_test --hpx:list-component-types` f.ex.
<K-ballo> #3255
<K-ballo> seems to be fiber related
parsa has joined #ste||ar
<parsa> hkaiser: ping
<K-ballo> zao: notice that extra empty line in there?
<zao> Sure.
<K-ballo> thought it could be a lead, but it's just the code inserting an extra empty line
<K-ballo> in between
<zao> Guessed so.
Viraj has joined #ste||ar
Viraj has quit [Quit: viraj]
verganz has joined #ste||ar
<github> [hpx] K-ballo created performance_counter_parser (+1 new commit): https://git.io/vxRdG
<github> hpx/performance_counter_parser 0d3bed7 Agustin K-ballo Berge: Isolate performance counter parser into a separate TU
<zao> Heh, think I locked my containers down a bit too hard :D
<K-ballo> heh
katywilliams has joined #ste||ar
katywilliams has quit [Ping timeout: 248 seconds]
jakub_golinowski has quit [Quit: Ex-Chat]
jakub_golinowski has joined #ste||ar
diehlpk has joined #ste||ar
diehlpk_ has joined #ste||ar
diehlpk_ has quit [Ping timeout: 248 seconds]
diehlpk has quit [Ping timeout: 260 seconds]
mcopik has joined #ste||ar
katywilliams has joined #ste||ar
jakub_golinowski has quit [Quit: Ex-Chat]
mcopik has quit [Ping timeout: 256 seconds]
<hkaiser> parsa: here now
mcopik has joined #ste||ar
<parsa> hkaiser: can you test building Phylanx against Blaze's current master? i want to verify it's broken
<hkaiser> K-ballo: happens in debug only as release does not perform the check
<hkaiser> it's broken with msvc
<hkaiser> parsa: ^^
<hkaiser> clang works
<K-ballo> never use debug mode again, got it
katywilliams has quit [Ping timeout: 256 seconds]
katywilliams has joined #ste||ar
mcopik has quit [Remote host closed the connection]
mcopik has joined #ste||ar
mcopik has quit [Client Quit]
parsa has quit [Quit: Zzzzzzzzzzzz]
parsa has joined #ste||ar
parsa has quit [Ping timeout: 252 seconds]
parsa has joined #ste||ar
nikunj has quit [Quit: Page closed]
katywilliams has quit [Ping timeout: 240 seconds]
diehlpk has joined #ste||ar
diehlpk_ has joined #ste||ar
parsa has quit [Quit: Zzzzzzzzzzzz]
<K-ballo> circle is blowing when compiling partitioned_vector_exclusive_scan on my branch, clang killed, I imagine it runs out of memory
<K-ballo> is this a fluke? does it happen every now and then? happened two times in a row now
parsa has joined #ste||ar
diehlpk has quit [Ping timeout: 265 seconds]
diehlpk_ has quit [Ping timeout: 240 seconds]
Anushi1998 has joined #ste||ar
Smasher has quit [Remote host closed the connection]
anushi has quit [Ping timeout: 276 seconds]
Anushi1998 has quit [Ping timeout: 264 seconds]
Anushi1998 has joined #ste||ar
diehlpk has joined #ste||ar
diehlpk_ has joined #ste||ar
Anushi1998 has quit [Read error: Connection reset by peer]
daissgr has joined #ste||ar
diehlpk has quit [Ping timeout: 256 seconds]
diehlpk_ has quit [Ping timeout: 256 seconds]