[parsec-users] parallel execution of facesim

Christian Bienia cbienia at CS.Princeton.EDU
Tue Apr 7 15:00:03 EDT 2009


Hi Javier,

When I run facesim with 4 threads on a 4-way SMP system I get the following
CPU utilization (measured with top):


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

 9486 cbienia   18   0  491m 302m 2028 S  370  1.9   1:17.66 facesim

 9148 cbienia   15   0 10840 1088  756 R    1  0.0   0:00.45 top

    1 root      15   0 10332  312  280 S    0  0.0   0:01.38 init



You can see that facesim uses 370% of the CPU, which means it must run on at
least 4 CPUs. Hence it is running with multiple threads.

Facesim uses the Alamere thread pool, which is not part of the PhysBam
library. You can find its source in the TaskQ/ directory that is in the src/
directory of the facesim package. There might be left-over code of other
threading systems in the facesim code itself, don't get confused over this.

- Chris


-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Javier
Lira
Sent: Tuesday, April 07, 2009 7:38 AM
To: PARSEC Users
Subject: Re: [parsec-users] parallel execution of facesim

Hi list,

I would like to reopen this topic because I have some questions on that.
As Jiaqi, I found that the parallel execution on facesim seems to not
being executed because both, USE_REDUCTION_ROUTINES and
example.optimization is always NULL. They prevent THREAD_POOL to be
initialized, so if I understand the code, there is no parallelization
possible.

Then, I wonder if this is really an issue in facesim. If it is not I
would appreciate if someone can tell in which point of the facesim code
threads are created/used.

Many thanks in advance and best regards,

Javier Lira


On Thu, 2008-07-24 at 04:27 -0400, Christian Bienia wrote:
> Hi Jiaqi,
> 
> Facesim uses locks e.g. for the task queue. I wrote my own instrumentation
> tool to measure the number of locks, etc. It's a non-intrusive layer
between
> the pthread library and the host program and monitors all calls of the
> program to the pthreads library. I called it "pthreadw", a short form for
> pthread wrapper. I made it available for free on SourceForge:
> 
> 	http://sourceforge.net/projects/pthreadw/
> 
> - Chris
> 
> 
> -----Original Message-----
> From: parsec-users-bounces at lists.cs.princeton.edu
> [mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of jiaqi
> zhang
> Sent: Thursday, July 24, 2008 4:05 AM
> To: PARSEC Users
> Subject: Re: [parsec-users] parallel execution of facesim
> 
> Thanks Chirist.
> 
> But how did you count the lock numbers of Facesim on your technical
> report? If USE_REDUCTION_ROUTINES is undefined, there seems nowhere to
> utilize locks. And a test with PIN can neither find any "Lock"s.
> 
> Thank you for your help.
> 
> On Tue, Jul 22, 2008 at 11:12 PM, Christian Bienia
> <cbienia at cs.princeton.edu> wrote:
> > Hello JiaQi,
> >
> > PHYSBAM_THREADS is the environment variable that controls how many
threads
> > get used. Alternatively, you can also use the corresponding command line
> > flag. If you look in the initialization code of the benchmark you will
see
> > that it also sets the environment variables.
> >
> > I'm not sure what USE_REDUCTION_ROUTINES was used for. The PhysBAM
library
> > that ships with PARSEC is just a small fraction of the full version
(only
> > what is needed by facesim). The corresponding code has probably been
> > removed, and since it crashes if you enable it I recommend you leave it
as
> > it is. :-)
> >
> > - Chris
> >
> >
> > -----Original Message-----
> > From: parsec-users-bounces at lists.cs.princeton.edu
> > [mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of jiaqi
> > zhang
> > Sent: Monday, July 21, 2008 11:02 PM
> > To: parsec-users at lists.cs.princeton.edu
> > Subject: Re: [parsec-users] parallel execution of facesim
> >
> > And, I got segmentation fault when I defined
USE_REDUCTION_ROUTINES......
> >
> > On Tue, Jul 22, 2008 at 10:10 AM, jiaqi zhang <zation99 at gmail.com>
wrote:
> >> Hi,
> >>
> >> Due to my need, I have to manually build the facesim benchmark. I
> >> found the README says that I have to set PHYSBAM_THREADS to 1. Does it
> >> affect the parallel execution of the application? It seems to restrict
> >> the number of threads to 1 according to its name...
> >> Also, I found in the source file DIAGONALIZED_FINITE_VOLUME_3D.cpp
> >> that the file undefines USE_REDUCTION_ROUTINES, which controls the
> >> parallel behavior of the following methods. Could I turn it on? And
> >> what will happen then?
> >>
> >> Thanks very much.
> >>
> >> --
> >> Best regards
> >> JiaQi Zhang
> >>
> >
> >
> >
> > --
> > Best regards
> > JiaQi Zhang
> > _______________________________________________
> > parsec-users mailing list
> > parsec-users at lists.cs.princeton.edu
> > https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
> >
> > _______________________________________________
> > parsec-users mailing list
> > parsec-users at lists.cs.princeton.edu
> > https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
> >
> 
> 
> 

_______________________________________________
parsec-users mailing list
parsec-users at lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/parsec-users



More information about the parsec-users mailing list