[parsec-users] Question about a barrier in Black-Scholes with pThreads

Christian Bienia cbienia at CS.Princeton.EDU
Wed Apr 29 14:01:30 EDT 2009

Hi Alin,

The barrier can be safely removed. It was used by Intel to exclude the thread creation from the timing measurements: If you start measuring the execution time from the moment on the threads leave the barrier, you get a more accurate measurement of the execution time.

- Chris

-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu [mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Alin Jula
Sent: Wednesday, April 29, 2009 12:21 PM
To: parsec-users at lists.cs.princeton.edu
Subject: [parsec-users] Question about a barrier in Black-Scholes with pThreads

Hi all,

I noticed a barrier (pthread_barrier_wait) in the pThreads version on
	file:  blackscholes.c, line 243: BARRIER(barrier);

which seems to wait for all the threads that have just been
created (executing "bs_thread" function) to declare their *private*
variables. I was wondering if this barrier can be safely removed, since
the initialization of these private variables seems to use only
read-only global variables, e.g. "numOptions" and "nThreads"?

Alin Jula

SAP Research Labs
T: 1-(650)-461-1845
F: 1-(650)-847-2646
3412 Hillview, 
Palo Alto, Ca, 94304

parsec-users mailing list
parsec-users at lists.cs.princeton.edu

More information about the parsec-users mailing list