atomics in the labs

7 views
Skip to first unread message

Steven Hartung

unread,
Aug 4, 2010, 10:40:41 PM8/4/10
to VSCSE Many-core Processors 2010
General information for participants in this workshop: atomic
operations like atomicAdd are only supported by compatible hardware.
Thus to invoke these operations you must specify that you want to
compile for them with the appropriate architecture specification
parameter in nvcc. e.g. "nvcc ... -arch=sm_13 ..." which stipulates
compilation for version 1.3 of the SM hardware and above (actually I
believe atomics are available at 1.1 and above).

The current version of CUDA_WORKSHOP_UIUC1008.tgz parboil environment
does not support the compilation of atomic operations.

Xiao-Long and UofI TAs: at least some previous versions of the parboil
environment for the course did support atomics, but that seems to have
been inadvertently lost in the current version. Changing the flags in
common/platform/cuda.mk will allow compilation, but a link problem
remains.

Cheers,
Steve Hartung
LBNL

Xiao-Long Wu

unread,
Aug 5, 2010, 11:33:38 AM8/5/10
to vscse-many-core...@googlegroups.com
Hi Steve,

It's not clear to me for the necessity of having atomic operations supported in the labs. As in these labs, we are trying to provide the best performance tuning experience. Hence, using atomic operations is not suggested. Could you explain more regarding your issue?

Xiao-Long

John Stratton

unread,
Aug 5, 2010, 11:41:01 AM8/5/10
to vscse-many-core...@googlegroups.com
There is no fundamental limitation in parboil for atomics.  If you would like to use atomics in a particular benchmark, you should be able to change the Makefile for that benchmark (benchmarks/<app>/src/<cuda>/Makefile) and add the appropriate application-specific compiler flags to a EXTRA_CUDACFLAGS variable. 

--John
================
John Stratton
217-621-9501
507 W Green St Apt 10
Champaign, IL 61820

Steven Hartung

unread,
Aug 5, 2010, 12:32:48 PM8/5/10
to vscse-many-core...@googlegroups.com

I agree, I also don’t think that atomic operations are a requirement, but it is of possible utility in aggregating final results in some reductions. Since I noticed the issue with the current set of make files, I just wanted to let others know about it so as to avoid some potential frustration. To make atomics work requires more effort in reworking the compile and link parameters in the current make configuration (which goes a bit beyond the scope of the lab exercises). It did work in some earlier versions of the lab.

 

Cheers,

Steve.

Steven Hartung

unread,
Aug 5, 2010, 12:39:53 PM8/5/10
to vscse-many-core...@googlegroups.com

Understood. It did work in a previous version of the labs. It takes wading through the makefile tree to find all of the appropriate flag definitions. I believe that the issue arises from changes that to the common/platform makefiles. I was not able to get it to work just manipulating the local src makefiles.

 

Cheers,

Steve

 

From: vscse-many-core...@googlegroups.com [mailto:vscse-many-core...@googlegroups.com] On Behalf Of John Stratton
Sent: Thursday, August 05, 2010 8:41 AM
To: vscse-many-core...@googlegroups.com
Subject: Re: [Many-core Processors] atomics in the labs

 

There is no fundamental limitation in parboil for atomics.  If you would like to use atomics in a particular benchmark, you should be able to change the Makefile for that benchmark (benchmarks/<app>/src/<cuda>/Makefile) and add the appropriate application-specific compiler flags to a EXTRA_CUDACFLAGS variable. 

Reply all
Reply to author
Forward
0 new messages