This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Integration of transactional memory support into a data-flow extension of OpenMP


Hi,

I am Ismail KURU, accepted by Google Summer of Code 2011.

My study mainly focuses on integration of transactional memory support
into data-flow extension of OpenMP that is 
aiming increased expressiveness and performance while preserving the
paradigms' properties.


My project combines development and research components and can be
decomposed into 5 phases.

1. Study the compatibility of the transactional memory and OpenMP
constructs in the
transmem development branch of GCC and propose solutions to the possible
technical
difficulties.

2. Study the desgin and implementation of both data-flow (streaming) and
transmem branches
of GCC, interacting with their maintainers.

3. Address the infrastructure limitations, software engineering and
version management issues
related to the integration of both code bases into a single experimental
branch.

4. Contribute to the design and implementation for a semantics of
transactions nested within
OpenMP tasks.

5. Write and rewrite relevant benchmarks leveraging the new programming
model, performing
systematic evaluations and detailed characterizations of the performance
behavior.


I have finished the research part of the project related 
with compatibility of the transactional memory and OpenMP constructs
with integrating the OpenMP constructs
and trans-mem constructs of GCC on LeeTM benchmark from University of
Manchester.

 

Note : Just an example code from LeeTM for compatibility research of
OpenMP and trans-mem .

#define MEMSET _ITM_memsetW
#define MEMCPY	_ITM_memcpyRtWt
#define BEGIN_TRANSACTION \
  _ITM_beginTransaction (pr_instrumentedCode |  pr_hasNoIrrevocable\
			 | pr_hasNoAbort)

#define END_TRANSACTION \
  _ITM_commitTransaction ()

void run_benchmark() {
	.....
	
         _ITM_Initialize(); 
	// create Lee benchmark
	Lee *lee = new Lee(cmdl_args.input_file_name, false, false, false);

	// initialize thread arguments
	for(unsigned i = 0;i < cmdl_args.thread_count;i++) {
		targs[i].lee = lee;
		targs[i].id = i;
		targs[i].commits = 0;
		targs[i].aborts = 0;
		targs[i].private_buffer= create_private_buffer(lee);
	}
	

        
	long start_time_ms;
	if(targs->id==0)
	start_time_ms = get_time_ms();
	
	omp_set_num_threads(cmdl_args.thread_count);
	
	#pragma omp parallel private(nthreads, thread_id)
	{
	

      /* Only master thread does this */
	if (thread_id == 0) 
	{
	  nthreads = omp_get_num_threads();
	  printf("Number of threads = %d\n", nthreads);
	}
	      
	      run_transactions(&targs[thread_id]);
	
	#pragma omp barrier
	}

	....................  	
	
}
void run_transactions(thread_args *targ) {
	Lee *lee = targ->lee;
	
  
	while(true) {
		WorkQueue *track = lee->getNextTrack();

		if(track == NULL) {
			break;
		}		
		
		// check for aborts
		if(!first) {
			targ->aborts++;
		} else {
			first = false;
		}
            		
		BEGIN_TRANSACTION;

#ifdef IRREGULAR_ACCESS_PATTERN
		// perform an update or read of contention object
		if(should_irregular_write(&targs->seed)) {
			lee->update_contention_object();
		} else if(should_irregular_read(&targs->seed)) {
			lee->read_contention_object();
		}
#endif // IRREGULAR_ACCESS_PATTERN

		// transaction body
		lee->layNextTrack(track, targ->private_buffer);

		
               END_TRANSACTION;
		targs->commits++;
	}

  
}

There is not a big performance difference between our approach (OpenMP +
trans-mem) and (pthreads + tinySTM).

I am trying to find out a pipeline (regarding data-flow) structure for
transactional region in LeeTM for benchmarking my study.

Also transaction's size, scaling contention on shared data are my other
issues.


More important thing is that I would like to ask whether you (GCC
developers) have your own suggestions and priorities  regarding the
proposed topic and the interaction between TM and OpenMP.  


Regards


Ismail KURU



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]