Hi,

your answer surprises me a little. Up until now I thought that 
Runtime.probe() unloads the current task (activity) from a thread, so 
another task  (activity) can use this thread and therefore I expected, 
that the inner at (Place(0)) async {...} would be executed at some 
point, even if this place has only one thread. What exactly does 
Runtime.probe() do then?

Cheers,
Marco

Am 10.03.2015 um 13:47 schrieb David P Grove:
> Marco Bungart <m.bung...@gmx.net> wrote on 03/10/2015 05:11:27 AM:
>  >
>  > the appended program shows nondeterministic behaviour. Sometimes it
>  > finishes, most times it runs into an endless loop. It happends with both
>  > native and managed X10. I am using the repository revision 29129 of X10,
>  > java 1.8.0_40 and gcc 4.8.2.
>  > With an older version of X10 (2.4.3.2), the program terminates just fine.
>  > One observation I was able to make: the program terminated only, if
>  > X10_RESILIENT_MODE was set to 1. If it was unset, I was not able to
>  > observe termination (but this could be pure coincidence...).
>  >
>  > Environment variables and compile-command used (command line parameter
>  > only prevents flooding your console):
>  >
>  > $ >export X10_NPLACES=2 X10_NTHREADS=1
>  > $ >x10c++ ../src/Hello.x10 -o Hello && ./Hello 5000000
>  >
>  > Could someone explain to me, what is going wrong or what changed?
>  >
>
> Hi Marco,
>
> We'll take a look.  But at first glance at your code and without running
> it, I would expect it to get into an infinite loop almost all the time.
>   You have asked for 1 thread per place and you have the one thread in
> Place(0) spinning executing a busy wait loop.   I suspect what has
> changed since 2.4.3.2 is that the runtime has gotten better at not
> having extra active threads, which in older versions may have provided
> the surplus execution resources in Place(0) to make this program not get
> stuck in the busy wait loop.
>
> The proper way to write this program would be to have the waiting
> activity be blocked on a when(plh().finished) and have the releasing
> activity do atomic plh().finished = true;
>
> --dave
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
>
>
>
> _______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to