STMBench7 implementation on ScalaSTM

64 views
Skip to first unread message

Lixing

unread,
Feb 2, 2013, 7:23:13 PM2/2/13
to scala-stm-e...@googlegroups.com
Hi,

I am try to implement STMBench7 on ScalaSTM, I am using the codes that you provided https://github.com/nbronson/scala-stm/tree/master/src/test/scala/stmbench7/scalastm.

 And the command I typed is as follow: 

scala -cp lib/stmbench7-VELOX-1.2.jar:target/scala-2.10/classes:target/scala-2.10/test-classes stmbench7.Benchmark -s stmbench7.scalastm.ScalaSTMInitializer -t 16 -l 60 -w r --no-traversals -g stm

However, I got some error messages when I ran it.

-------------------------Here is the error message I got.-------------------------------------------------
MacBook-Air:scala-stm user$ JAVA_OPTS="-Xmx2059M" scala -cp lib/stmbench7-VELOX-1.2.jar:target/scala-2.10/classes:target/scala-2.10/test-classes stmbench7.Benchmark -s stmbench7.scalastm.ScalaSTMInitializer -t 16 -l 60 -w r --no-traversals -g stm
===============================================================================
The STMBench7 Benchmark (Java version)
A benchmark for comparing synchronization techniques
Version: 1.0(15.02.2011)
More information: http://lpd.epfl.ch/site/research/tmeval
Copyright (C) 2006-2008 LPD, I&C, EPFL (http://lpd.epfl.ch)
Implemented by Michal Kapalka (http://kapalka.eu)
Updated by Vincent Gramoli for compliance with the VELOX stack
===============================================================================

-------------------------------------------------------------------------------
Benchmark parameters
-------------------------------------------------------------------------------
Number of threads: 16
Length: 60 s
Workload: READ_DOMINATED
Synchronization method: STM
Long traversals disabled
Structural modification operations enabled
DesignObjFactory: stmbench7.scalastm.ScalaSTMInitializer$$anon$4
BackendFactory: stmbench7.scalastm.ScalaSTMInitializer$$anon$3
OperationExecutorFactory: stmbench7.scalastm.ScalaSTMInitializer$$anon$1
ThreadFactory: stmbench7.scalastm.ScalaSTMInitializer$$anon$5
Sequential replay disabled
STM-specific parameters: none

Operation ratios [%]:
              TRAVERSAL: 0.00
           TRAVERSAL_RO: 0.00
        SHORT_TRAVERSAL: 4.65
     SHORT_TRAVERSAL_RO: 41.86
              OPERATION: 5.23
           OPERATION_RO: 47.09
STRUCTURAL_MODIFICATION: 1.16

Setup start...
Setting up the design library:
Component 500 of 500
Setting up the module:
Exception in thread "Thread-1" java.lang.ClassCastException: scala.collection.immutable.RedBlackTree$BlackTree cannot be cast to scala.collection.immutable.RedBlack$Tree
	at stmbench7.scalastm.IndexImpl$BoxedImmutable.stmbench7$scalastm$IndexImpl$BoxedImmutable$$makeValuesIterator(IndexImpl.scala:45)
	at stmbench7.scalastm.IndexImpl$BoxedImmutable.iterator(IndexImpl.scala:33)
	at stmbench7.operations.SetupDataStructure.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.OperationExecutorFactory$1.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Setup completed.

Benchmark started.
Exception in thread "Thread-2" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-3" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-8" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-7" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-6" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-5" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-14" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-4" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-13" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-12" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-11" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-10" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-9" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-17" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-16" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Thread-15" java.lang.NullPointerException
	at stmbench7.operations.ShortTraversal1.traverse(Unknown Source)
	at stmbench7.operations.ShortTraversal1.performOperation(Unknown Source)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:21)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2$$anonfun$execute$1.apply(ScalaSTMInitializer.scala:20)
	at scala.concurrent.stm.ccstm.InTxnImpl.runBlock(InTxnImpl.scala:560)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAttempt(InTxnImpl.scala:516)
	at scala.concurrent.stm.ccstm.InTxnImpl.topLevelAtomicImpl(InTxnImpl.scala:387)
	at scala.concurrent.stm.ccstm.InTxnImpl.atomic(InTxnImpl.scala:248)
	at scala.concurrent.stm.ccstm.CCSTMExecutor.apply(CCSTMExecutor.scala:24)
	at stmbench7.scalastm.ScalaSTMInitializer$$anon$1$$anon$2.execute(ScalaSTMInitializer.scala:20)
	at stmbench7.BenchThread.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Benchmark completed.

-------------------------------------------------------------------------------
Detailed results
-------------------------------------------------------------------------------
Operation   T1:   successful = 0	maxttc = 0	failed = 0
Operation  T2a:   successful = 0	maxttc = 0	failed = 0
Operation  T2b:   successful = 0	maxttc = 0update	failed = 0
Operation  T2c:   successful = 0	maxttc = 0	failed = 0
Operation  T3a:   successful = 0	maxttc = 0	failed = 0
Operation  T3b:   successful = 0	maxttc = 0	failed = 0
Operation  T3c:   successful = 0	maxttc = 0	failed = 0
Operation   T4:   successful = 0	maxttc = 0	failed = 0
Operation   T5:   successful = 0	maxttc = 0	failed = 0
Operation   T6:   successful = 0	maxttc = 0	failed = 0
Operation   Q6:   successful = 0	maxttc = 0	failed = 0
Operation   Q7:   successful = 0	maxttc = 0	failed = 0
Operation  ST1:   successful = 0	maxttc = 0	failed = 0
Operation  ST2:   successful = 0	maxttc = 0	failed = 0
Operation  ST3:   successful = 0	maxttc = 0	failed = 0
Operation  ST4:   successful = 0	maxttc = 0	failed = 0
Operation  ST5:   successful = 0	maxttc = 0	failed = 0
Operation  ST6:   successful = 0	maxttc = 0	failed = 0
Operation  ST7:   successful = 0	maxttc = 0	failed = 0
Operation  ST8:   successful = 0	maxttc = 0	failed = 0
Operation  ST9:   successful = 0	maxttc = 0	failed = 0
Operation ST10:   successful = 0	maxttc = 0	failed = 0
Operation  OP1:   successful = 0	maxttc = 0	failed = 0
Operation  OP2:   successful = 0	maxttc = 0	failed = 0
Operation  OP3:   successful = 0	maxttc = 0	failed = 0
Operation  OP4:   successful = 0	maxttc = 0	failed = 0
Operation  OP5:   successful = 16	maxttc = 1	failed = 0
Operation  OP6:   successful = 0	maxttc = 0	failed = 0
Operation  OP7:   successful = 0	maxttc = 0	failed = 0
Operation  OP8:   successful = 0	maxttc = 0	failed = 0
Operation  OP9:   successful = 0	maxttc = 0	failed = 0
Operation OP10:   successful = 0	maxttc = 0	failed = 0
Operation OP11:   successful = 0	maxttc = 0	failed = 0
Operation OP12:   successful = 0	maxttc = 0	failed = 0
Operation OP13:   successful = 0	maxttc = 0	failed = 0
Operation OP14:   successful = 0	maxttc = 0	failed = 0
Operation OP15:   successful = 0	maxttc = 0	failed = 0
Operation  SM1:   successful = 0	maxttc = 0	failed = 0
Operation  SM2:   successful = 0	maxttc = 0	failed = 0
Operation  SM3:   successful = 0	maxttc = 0	failed = 0
Operation  SM4:   successful = 0	maxttc = 0	failed = 0
Operation  SM5:   successful = 0	maxttc = 0	failed = 0
Operation  SM6:   successful = 0	maxttc = 0	failed = 0
Operation  SM7:   successful = 0	maxttc = 0	failed = 0
Operation  SM8:   successful = 0	maxttc = 0	failed = 0

-------------------------------------------------------------------------------
Sample errors (operation ratios [%])
-------------------------------------------------------------------------------
              TRAVERSAL:  expected = 0.00	successful = 0.00	error = 0.00	(total = 0.00	error = 0.00)
           TRAVERSAL_RO:  expected = 0.00	successful = 0.00	error = 0.00	(total = 0.00	error = 0.00)
        SHORT_TRAVERSAL:  expected = 4.65	successful = 0.00	error = 4.65	(total = 0.00	error = 4.65)
     SHORT_TRAVERSAL_RO:  expected = 41.86	successful = 0.00	error = 41.86	(total = 0.00	error = 41.86)
              OPERATION:  expected = 5.23	successful = 0.00	error = 5.23	(total = 0.00	error = 5.23)
           OPERATION_RO:  expected = 47.09	successful = 100.00	error = 52.91	(total = 100.00	error = 52.91)
STRUCTURAL_MODIFICATION:  expected = 1.16	successful = 0.00	error = 1.16	(total = 0.00	error = 1.16)

-------------------------------------------------------------------------------
Summary results
-------------------------------------------------------------------------------
              TRAVERSAL:  successful = 0	maxttc = 0	failed = 0	total = 0
           TRAVERSAL_RO:  successful = 0	maxttc = 0	failed = 0	total = 0
        SHORT_TRAVERSAL:  successful = 0	maxttc = 0	failed = 0	total = 0
     SHORT_TRAVERSAL_RO:  successful = 0	maxttc = 0	failed = 0	total = 0
              OPERATION:  successful = 0	maxttc = 0	failed = 0	total = 0
           OPERATION_RO:  successful = 16	maxttc = 1	failed = 0	total = 16
STRUCTURAL_MODIFICATION:  successful = 0	maxttc = 0	failed = 0	total = 0

Total sample error: 105.81% (105.81% including failed)
Total throughput: 0.27 op/s (0.27 op/s including failed)
Elapsed time: 60.01 s

Can you tell me how to solve this problem? Thanks.

-Lixing

Nathan Bronson

unread,
Feb 2, 2013, 10:41:00 PM2/2/13
to scala-stm-e...@googlegroups.com
In Scala < 2.10 the immutable.TreeMap's iterator produced a lot of garbage, which substantially impacted the STMBench7 results. I hacked in an array-based iterator sufficient for the benchmark's one use case, but to do that I operated on the internal tree representation (see the ugliness starting at https://github.com/nbronson/scala-stm/blob/master/src/test/scala/stmbench7/scalastm/IndexImpl.scala#L44 ).

Scala 2.10 fixed the perf bug and changed the internal implementation, so the hack now throws an exception.

I've pushed a fix and published a new 0.8-SNAPSHOT release to oss.sonatype.org.

You will probably also need to prefix your command with JAVA_OPTS=-Xmx... to avoid out-of-memory problems. I'm not sure the smallest sufficient value, but -Xmx1500m is enough.

Thanks,
  Nathan




--
 
---
You received this message because you are subscribed to the Google Groups "Scala STM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-stm-expert-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Nathan Grasso Bronson
ngbr...@gmail.com
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages