Changes between Version 24 and Version 25 of Next-GenOpenMPTransformation


Ignore:
Timestamp:
05/20/19 20:08:04 (7 years ago)
Author:
ziqing
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Next-GenOpenMPTransformation

    v24 v25  
    153153  * The OpenMP simplifier sequentializes the program which will be checked by CIVL.  Any possible array out-of-bound error will be caught by CIVL.
    154154
    155 * Example 2 : ( `DRB014-outofbounds-orig-yes.c` from DataRaceBench v1.2.0 )
     155* Example 2 : ( `DRB014-outofbounds-orig-yes.c` from  [https://github.com/LLNL/dataracebench/releases/tag/v1.2.0 DataRaceBench v1.2.0] )
    156156{{{
    157157#include <stdio.h>
     
    180180int main()
    181181{
    182   int a[50],i;
    183 
    184   a[0] = 1;
     182  int a[10],i;
     183
    185184#pragma omp parallel for
    186   for(i=1; i<49; i++)
     185  for(i=0; i<10; i++)
    187186    {
    188187      int c;
    189188
    190       c = i + 10;
    191       a[i + c] = a[i + c];
     189      c = i % 2;
     190      a[i + c] = 0;
    192191    }
    193192}
     
    195194  * OpenMP Simplifier cannot prove data-race freedom for this program.
    196195  * OpenMP2CIVL Transformer will transform this program to a equivalent CIVL-C program for model checking
     196  * CIVL reports PROVABLE errors:
     197  {{{
     198Thread 1 can not safely write to memory location &<d5>a[0], because thread 0 has
     199written to that memory location and hasn't flushed yet.
     200
     201Violation 0 encountered at depth 64:
     202CIVL execution violation in p2 (kind: ASSERTION_VIOLATION, certainty: PROVEABLE)
     203at OpenMPTransformer "_omp_a_shared, &(_om" inserted by OpenMPTransformer.a_sharedWriteCall before civlc.cvh:105.14-20 "$malloc"
     204Assertion: false
     205 -> false
     206. . .
     207Call stacks:
     208process 0:
     209  main at OpenMPTransformer "$parfor (int _omp_ti" inserted by OpenMPTransformer.parallelPragma before civlc.cvh:105.14-20 "$malloc"
     210process 1:
     211  $barrier_exit at concurrency.cvl:58.2-6 "$when" called from
     212  $barrier_call at concurrency.cvl:63.2-14 "$barrier_exit" called from
     213  $omp_barrier_and_flush at civl-omp.cvl:322.2-14 "$barrier_call" called from
     214  _par_proc0 at OpenMPTransformer "_omp_team" inserted by OpenMPTransformer.barrierAndFlushCall before civlc.cvh:105.14-20 "$malloc"
     215process 2:
     216  $omp_write at civl-omp.cvl:247.4-10 "$assert" called from
     217  _par_proc0 at OpenMPTransformer "_omp_a_shared, &(_om" inserted by OpenMPTransformer.a_sharedWriteCall before civlc.cvh:105.14-20 "$malloc"
     218process 3:
     219  $omp_arrive_loop at civl-omp.cvl:405.2-8 "$atomic" called from
     220  _par_proc0 at OpenMPTransformer "_omp_team, 0, ($doma" inserted by OpenMPTransformer.myItersDeclaration before civlc.cvh:105.14-20 "$malloc"
     221
     222Logging new entry 0, writing trace to CIVLREP/testOmp5_0.trace
     223Terminating search after finding 1 violation.
     224
     225  }}}
    197226
    198227== Capture Read / Write at Runtime ==