diff --git a/tests/Benchmarks/ChameneosRedux/FairShare.hs b/tests/Benchmarks/ChameneosRedux/FairShare.hs index 2c39e393d254..e9b2a0a85c2c 100644 --- a/tests/Benchmarks/ChameneosRedux/FairShare.hs +++ b/tests/Benchmarks/ChameneosRedux/FairShare.hs @@ -221,7 +221,8 @@ fork task on kind = do sc <- getSCont; setSContSwitchReason sc Completed; switchToNext <- getYieldControlAction; - switchToNext + switchToNext; + return () } let makeSCont = case kind of Bound -> newBoundSCont diff --git a/tests/Benchmarks/ChameneosRedux/Makefile b/tests/Benchmarks/ChameneosRedux/Makefile index 03f659ecf9fa..677ca4fc9dcd 100644 --- a/tests/Benchmarks/ChameneosRedux/Makefile +++ b/tests/Benchmarks/ChameneosRedux/Makefile @@ -4,7 +4,7 @@ include ../../config.mk TOP := ../../../ EXTRA_LIBS=/scratch/chandras/install -GHC_OPTS_EXTRA=-O2 -threaded -XDeriveDataTypeable -XBangPatterns -XCPP -XGeneralizedNewtypeDeriving -funbox-strict-fields -optc-O3 -ipqueue-1.2.1 -debug +GHC_OPTS_EXTRA=-O2 -threaded -XDeriveDataTypeable -XBangPatterns -XCPP -XGeneralizedNewtypeDeriving -funbox-strict-fields -ipqueue-1.2.1 -optc-O3 PROFILE_FLAGS := -DPROFILE_ENABLED -prof -fprof-auto -auto -auto-all diff --git a/tests/Benchmarks/ChameneosRedux/chameneos-redux-lwc.hs b/tests/Benchmarks/ChameneosRedux/chameneos-redux-lwc.hs index 3d53ddc39c8d..415e6fa2290b 100644 --- a/tests/Benchmarks/ChameneosRedux/chameneos-redux-lwc.hs +++ b/tests/Benchmarks/ChameneosRedux/chameneos-redux-lwc.hs @@ -36,6 +36,7 @@ complement !a !b = case a of B -> case b of R -> Y; B -> B; _ -> R R -> case b of B -> Y; R -> R; _ -> B Y -> case b of B -> R; Y -> Y; _ -> B + _ -> error "complement: impossible" type Chameneous = Ptr Color data MP = Nobody !Int | Somebody !Int !Chameneous !(MVar Chameneous) @@ -94,11 +95,11 @@ initSched = do replicateM_ (n-1) newCapability main = do - initSched putStrLn . map toLower . unlines $ [unwords [show a, "+", show b, "->", show $ complement a b] | a <- [B..Y], b <- [B..Y]] n <- readIO . head =<< getArgs + initSched actions <- zipWithM (run n) [0..] [[B..Y],[B,R,Y,R,Y,B,R,Y,R,B]] sequence_ actions