Changes between Version 15 and Version 16 of Next-GenOpenMPTransformation


Ignore:
Timestamp:
05/15/19 16:19:31 (7 years ago)
Author:
ziqing
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Next-GenOpenMPTransformation

    v15 v16  
    144144  * The OpenMP simplifier can determine that no data race will happen in the parallel region as long as no array out-of-bound error happens in it.
    145145  * The OpenMP simplifier sequentializes the program which will be checked by CIVL.  Any possible array out-of-bound error will be caught by CIVL.
     146
     147== Capture Read / Write at Runtime ==
     148* If the OpenMP Simplifier fails to sequentialize a program,  transform the OpenMP program to the following form for model checking:
     149{{{
     150$mem writes[nthreads], reads[nthreads];
     151$parfor (int tid:0..nthreads-1) {
     152  $write_set_push();
     153  $read_set_push();
     154  block1;
     155  // barrier
     156  writes[tid] = $write_set_pop();                                                                                                               
     157  reads[tid] = $read_set_pop();
     158  // check for dataraces (collective operation)                                                                           
     159  $write_set_push();
     160  $read_set_push();
     161  // barrier                                                                                                                 
     162  stmt2;
     163  // barrier
     164  writes[tid] = $write_set_pop();                                                                                                               
     165  reads[tid] = $read_set_pop();                                                                                                                 
     166  // check for dataraces (collective operation)
     167}
     168}}}