diff -r ba258b11845a GPUVerify.py
--- a/GPUVerify.py	Thu Nov 21 17:25:05 2013 +0000
+++ b/GPUVerify.py	Thu Nov 21 17:41:22 2013 +0000
@@ -264,6 +264,8 @@
     self.callSiteAnalysis = False
     self.warpSync = False
     self.warpSize = 32
+    self.noWarp = False
+    self.onlyWarp = False
     self.atomic = "rw"
     self.noRefinedAtomics = False
     self.solver = "z3"
@@ -473,6 +475,8 @@
     --vcgen-opt=...         Specify option to be passed to be passed to VC generation
                             engine
     --warp-sync=X           Synchronize threads within warps, sized X, defaulting to 32
+    --no-warp               Only check inter-warp. Requires --warp-sync
+    --only-warp             Only check intra-warp. Requires --warp-sync
     --atomic=X              Check atomics as racy against reads (r), writes(w), both(rw), or none(none)
                             (default is --atomic=rw)
     --no-refined-atomics    Don't do abstraction refinement on the return values from atomics
@@ -696,6 +700,10 @@
         CommandLineOptions.warpSize = int(a)
       except ValueError:
         raise GPUVerifyException(ErrorCodes.COMMAND_LINE_ERROR, "non integer value '" + a + "' provided as argument to --warp-sync")
+    if o == "--no-warp":
+      CommandLineOptions.noWarp = True
+    if o == "--only-warp":
+      CommandLineOptions.onlyWarp = True
     if o == "--atomic":
       if a.lower() in ("r","w","rw","none"):
         CommandLineOptions.atomic = a.lower()
@@ -828,7 +836,7 @@
               'boogie-file=', 'infer-config-file=',
               'staged-inference', 'parallel-inference',
               'dynamic-analysis', 'scheduling=', 'infer-info', 'debug-houdini',
-              'warp-sync=', 'atomic=', 'no-refined-atomics',
+              'warp-sync=', 'atomic=', 'no-refined-atomics', 'no-warp', 'only-warp',
               'solver=', 'logic='
              ])
   except getopt.GetoptError as getoptError:
@@ -917,6 +925,10 @@
   CommandLineOptions.gpuVerifyVCGenOptions += [ "/atomics:" + CommandLineOptions.atomic ]
   if CommandLineOptions.warpSync:
     CommandLineOptions.gpuVerifyVCGenOptions += [ "/doWarpSync:" + str(CommandLineOptions.warpSize) ]
+    if CommandLineOptions.noWarp:
+      CommandLineOptions.gpuVerifyVCGenOptions += [ "/noWarp" ]
+    if CommandLineOptions.onlyWarp:
+      CommandLineOptions.gpuVerifyVCGenOptions += [ "/onlyWarp" ]
   if CommandLineOptions.noRefinedAtomics:
     CommandLineOptions.gpuVerifyVCGenOptions += [ "/noRefinedAtomics" ]
   if CommandLineOptions.adversarialAbstraction:
diff -r ba258b11845a GPUVerifyVCGen/GPUVerifier.cs
--- a/GPUVerifyVCGen/GPUVerifier.cs	Thu Nov 21 17:25:05 2013 +0000
+++ b/GPUVerifyVCGen/GPUVerifier.cs	Thu Nov 21 17:41:22 2013 +0000
@@ -542,7 +542,11 @@
 
             if (GPUVerifyVCGenCommandLineOptions.WarpSync)
             {
-              AddWarpSyncs();
+              switch (GPUVerifyVCGenCommandLineOptions.WarpMethod)
+              {
+                case "resync"  : AddWarpSyncs();break;
+                case "twopass" : if (GPUVerifyVCGenCommandLineOptions.NoWarp) DoNoWarp(); else DoOnlyWarp() ;break;
+              }
             }
 
             EmitProgram(outputFilename);
@@ -1992,6 +1996,7 @@
             }
           }
 
+
           List<BigBlock> thenblocks = new List<BigBlock>();
           thenblocks.Add(new BigBlock(Token.NoToken, "reset_warps", then, null, null));
 
@@ -2028,6 +2033,42 @@
           method.AddAttribute("inline", new object[] { new LiteralExpr(Token.NoToken, BigNum.FromInt(1))});
           Program.TopLevelDeclarations.Add(method);
         }
+
+        private void DoOnlyWarp()
+        {
+          // gid$1 == gid$1 && wid$1 == wid$2
+          Expr group_guard = (new string[] {"X","Y","Z"}).Select(d => (Expr) Expr.Eq(Expr.Ident(MakeGroupId(d,1)),Expr.Ident(MakeGroupId(d,2)))).Aggregate(Expr.And);
+          Expr warpsize = Expr.Ident(GPUVerifyVCGenCommandLineOptions.WarpSize + "bv32", new BvType(32));
+          Expr[] tids = (new int[] {1,2}).Select(x =>
+              IntRep.MakeAdd(Expr.Ident(MakeThreadId("X",x)),IntRep.MakeAdd(
+              IntRep.MakeMul(Expr.Ident(MakeThreadId("Y",x)),Expr.Ident(GetGroupSize("X"))),
+              IntRep.MakeMul(Expr.Ident(MakeThreadId("Z",x)),IntRep.MakeMul(Expr.Ident(GetGroupSize("X")),Expr.Ident(GetGroupSize("Y"))))))).ToArray();
+
+          // sides = {lhs,rhs};
+          Expr[] sides = tids.Select(x => IntRep.MakeDiv(x,warpsize)).ToArray();
+
+          Expr condition = Expr.And(group_guard, Expr.Eq(sides[0],sides[1]));
+
+          Program.TopLevelDeclarations.Add(new Axiom(Token.NoToken, condition));
+        }
+
+        private void DoNoWarp()
+        {
+          // gid$1 == gid$2 ==> wid$1 != wid$2
+          Expr group_guard = (new string[] {"X","Y","Z"}).Select(d => (Expr) Expr.Eq(Expr.Ident(MakeGroupId(d,1)),Expr.Ident(MakeGroupId(d,2)))).Aggregate(Expr.And);
+          Expr warpsize = Expr.Ident(GPUVerifyVCGenCommandLineOptions.WarpSize + "bv32", new BvType(32));
+          Expr[] tids = (new int[] {1,2}).Select(x =>
+              IntRep.MakeAdd(Expr.Ident(MakeThreadId("X",x)),IntRep.MakeAdd(
+              IntRep.MakeMul(Expr.Ident(MakeThreadId("Y",x)),Expr.Ident(GetGroupSize("X"))),
+              IntRep.MakeMul(Expr.Ident(MakeThreadId("Z",x)),IntRep.MakeMul(Expr.Ident(GetGroupSize("X")),Expr.Ident(GetGroupSize("Y"))))))).ToArray();
+
+          // sides = {lhs,rhs};
+          Expr[] sides = tids.Select(x => IntRep.MakeDiv(x,warpsize)).ToArray();
+
+          Expr condition = Expr.Imp(group_guard, Expr.Neq(sides[0],sides[1]));
+
+          Program.TopLevelDeclarations.Add(new Axiom(Token.NoToken, condition));
+        }
 
         internal bool TryGetArrayFromPrefixedString(string s, string prefix, out Variable v) {
           v = null;
diff -r ba258b11845a GPUVerifyVCGen/GPUVerifyVCGenCommandLineOptions.cs
--- a/GPUVerifyVCGen/GPUVerifyVCGenCommandLineOptions.cs	Thu Nov 21 17:25:05 2013 +0000
+++ b/GPUVerifyVCGen/GPUVerifyVCGenCommandLineOptions.cs	Thu Nov 21 17:41:22 2013 +0000
@@ -43,6 +43,9 @@
     public static bool AbstractHoudini = false;
     public static bool WarpSync = false;
     public static int WarpSize = 32;
+    public static string WarpMethod = "resync";
+    public static bool NoWarp = false;
+    public static bool OnlyWarp = false;
     public static bool AtomicVsRead = true;
     public static bool AtomicVsWrite = true;
     public static bool RefinedAtomics = true;
@@ -192,6 +195,20 @@
             WarpSize = int.Parse(afterColon);
           break;
 
+          case "-noWarp":
+          case "/noWarp":
+          //WarpSync = true;
+          WarpMethod = "twopass";
+          OnlyWarp = false; NoWarp = true;
+          break;
+
+          case "-onlyWarp":
+          case "/onlyWarp":
+          //WarpSync = true;
+          WarpMethod = "twopass";
+          OnlyWarp = true; NoWarp = false;
+          break;
+
           case "-atomics":
           case "/atomics":
           if (hasColonArgument)
diff -r ba258b11845a GPUVerifyVCGen/RaceInstrumenter.cs
--- a/GPUVerifyVCGen/RaceInstrumenter.cs	Thu Nov 21 17:25:05 2013 +0000
+++ b/GPUVerifyVCGen/RaceInstrumenter.cs	Thu Nov 21 17:41:22 2013 +0000
@@ -457,8 +457,11 @@
           if (QKeyValue.FindBoolAttribute(call.Attributes,"atomic"))
           {
             AddLogAndCheckCalls(result,new AccessRecord((call.Ins[0] as IdentifierExpr).Decl,call.Ins[1]),AccessType.ATOMIC,null);
-            (result[result.Count() - 1] as CallCmd).Attributes.AddLast((QKeyValue) call.Attributes.Clone()); // Magic numbers ahoy! -1 should be the check
-            (result[result.Count() - 3] as CallCmd).Attributes.AddLast((QKeyValue) call.Attributes.Clone()); // And -3 should be the log
+            if (!GPUVerifyVCGenCommandLineOptions.OnlyWarp)
+            {
+							(result[result.Count() - 1] as CallCmd).Attributes.AddLast((QKeyValue) call.Attributes.Clone()); // Magic numbers ahoy! -1 should be the check
+							(result[result.Count() - 3] as CallCmd).Attributes.AddLast((QKeyValue) call.Attributes.Clone()); // And -3 should be the log
+            }
             Debug.Assert(call.Outs.Count() == 2); // The receiving variable and the array should be assigned to
             result.Add(new HavocCmd(Token.NoToken, new List<IdentifierExpr> { call.Outs[0] })); // We havoc the receiving variable.  We do not need to havoc the array, because it *must* be the case that this array is modelled adversarially
             continue;
@@ -496,12 +499,14 @@
     }
 
     private void AddLogAndCheckCalls(List<Cmd> result, AccessRecord ar, AccessType Access, Expr Value) {
-      result.Add(MakeLogCall(ar, Access, Value));
+      if (!GPUVerifyVCGenCommandLineOptions.OnlyWarp || Access == AccessType.WRITE)
+        result.Add(MakeLogCall(ar, Access, Value));
       if (!GPUVerifyVCGenCommandLineOptions.NoBenign && Access == AccessType.WRITE) {
         result.Add(MakeUpdateBenignFlagCall(ar));
       }
       if (!GPUVerifyVCGenCommandLineOptions.OnlyLog) {
-        result.Add(MakeCheckCall(result, ar, Access, Value));
+        if (!GPUVerifyVCGenCommandLineOptions.OnlyWarp || Access == AccessType.WRITE)
+          result.Add(MakeCheckCall(result, ar, Access, Value));
       }
       CurrStmtNo++;
     }
@@ -777,7 +782,10 @@
 
       List<Cmd> simpleCmds = new List<Cmd>();
 
-      simpleCmds.Add(new HavocCmd(v.tok, new List<IdentifierExpr>(new IdentifierExpr[] { new IdentifierExpr(v.tok, TrackVariable) })));
+      if (GPUVerifyVCGenCommandLineOptions.OnlyWarp)
+        simpleCmds.Add(new AssignCmd(v.tok, new List<AssignLhs>(new AssignLhs[] { new SimpleAssignLhs(v.tok, new IdentifierExpr(v.tok, TrackVariable)) }), new List<Expr>(new Expr[] {new LiteralExpr(Token.NoToken,true)})));
+      else
+        simpleCmds.Add(new HavocCmd(v.tok, new List<IdentifierExpr>(new IdentifierExpr[] { new IdentifierExpr(v.tok, TrackVariable) })));
 
       Expr Condition = Expr.And(new IdentifierExpr(v.tok, VariableForThread(1, PredicateParameter)), new IdentifierExpr(v.tok, TrackVariable));
 
