Hi Hui - You might look at runtime/include/chpl-tasks.h, in particular chpl_task_startMovedTask and chpl_task_addToTaskList and friends.
If you're using CHPL_TASKS=fifo, a method that works with pthreads *should* work... -michael On 6/4/15, 1:25 PM, "Hui Zhang" <[email protected]> wrote: >Hello, Michael > > >No, I'm actually trying to do that with my own code...I've had success >with explicitly-created threads like pthread, but for Chapel, I don't >know exactly the way threads get spawned > since it's implicit... > > > >On Thu, Jun 4, 2015 at 12:39 PM, Michael Ferguson ><[email protected]> wrote: > >Hi Hui - > >Are you trying to use gprof? How are you monitoring the performance? > >AFAIK, gprof in particular just doesn't work with multiple threads... >I've heard that the profiler with gperftools works better, >but I don't have any experience with it myself. > >Cheers, > >-michael > >On 6/4/15, 12:13 PM, "Hui Zhang" <[email protected]> wrote: > >>Hello, >> >> >> >>I was trying to monitor the performance of a simple Chapel code, but even >>I don't use parallelism in the code(like forall, coforall...), just as >>simple as a single-thread C program, >> I found Chapel still creates a worker thread for the user code, and the >>master thread to initialize and finalize the program. Therefore, I want >>to know : >> >>1. When and how the worker thread is spawned ? >>2. What's your suggestion to monitor the worker thread since all I'm >>getting now is from the master thread, which isn't useful to me. >> >>3. Further, if parallelism is used(like forall,etc), is there any way to >>monitor all the threads ? >> >> >> >>Thanks >> >> >> >>-- >>Best regards >> >> >>Hui Zhang >> >> > > > > > > > > > >-- >Best regards > > >Hui Zhang > > ------------------------------------------------------------------------------ _______________________________________________ Chapel-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-developers
